summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2019-02-03 18:41:18 -0800
committerIgor Babaev <igor@askmonty.org>2019-02-03 18:41:18 -0800
commit37deed3f37561f264f65e162146bbc2ad35fb1a2 (patch)
treec1cfb6c0995bfcc4ac3fb335f518a8b404413e32 /mysql-test
parent658128af43b4d7c6db445164f8ed25ed4d1e3109 (diff)
parent5b996782be6b752ce50a0ecaa222b0688aa9e75d (diff)
downloadmariadb-git-37deed3f37561f264f65e162146bbc2ad35fb1a2.tar.gz
Merge branch '10.4' into bb-10.4-mdev16188
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/add_anonymous_users.inc2
-rw-r--r--mysql-test/include/check-testcase.test51
-rw-r--r--mysql-test/include/check_ftwrl_incompatible.inc6
-rw-r--r--mysql-test/include/default_mysqld.cnf1
-rw-r--r--mysql-test/include/galera_cluster.inc6
-rw-r--r--mysql-test/include/galera_have_debug_sync.inc (renamed from mysql-test/suite/galera/include/galera_have_debug_sync.inc)0
-rw-r--r--mysql-test/include/galera_wait_sync_point.inc11
-rw-r--r--mysql-test/include/have_aria_used_for_temp_tables.inc4
-rw-r--r--mysql-test/include/have_auth_named_pipe.inc13
-rw-r--r--mysql-test/include/have_openssl.inc7
-rw-r--r--mysql-test/include/have_wsrep_enabled.inc1
-rw-r--r--mysql-test/include/innodb_encrypt_tables.combinations14
-rw-r--r--mysql-test/include/innodb_encrypt_tables.inc4
-rw-r--r--mysql-test/include/kill_galera.inc20
-rw-r--r--mysql-test/include/mtr_check.sql2
-rw-r--r--mysql-test/include/switch_to_mysql_global_priv.inc6
-rw-r--r--mysql-test/include/switch_to_mysql_user.inc56
-rw-r--r--mysql-test/include/system_db_struct.inc1
-rw-r--r--mysql-test/include/wait_until_connected_again.inc19
-rw-r--r--mysql-test/include/wsrep_wait_disconnect.inc20
-rwxr-xr-xmysql-test/lib/generate-ssl-certs.sh37
-rw-r--r--mysql-test/lib/mtr_cases.pm1
-rw-r--r--mysql-test/main/1st.result1
-rw-r--r--mysql-test/main/alter_table.result28
-rw-r--r--mysql-test/main/alter_table.test19
-rw-r--r--mysql-test/main/alter_table_errors.result19
-rw-r--r--mysql-test/main/alter_table_errors.test11
-rw-r--r--mysql-test/main/alter_user.result19
-rw-r--r--mysql-test/main/alter_user.test4
-rw-r--r--mysql-test/main/analyze.result7
-rw-r--r--mysql-test/main/auth_rpl.result2
-rw-r--r--mysql-test/main/backup_aria.result158
-rw-r--r--mysql-test/main/backup_aria.test157
-rw-r--r--mysql-test/main/backup_interaction.result520
-rw-r--r--mysql-test/main/backup_interaction.test503
-rw-r--r--mysql-test/main/backup_lock.result219
-rw-r--r--mysql-test/main/backup_lock.test284
-rw-r--r--mysql-test/main/backup_lock_debug.result28
-rw-r--r--mysql-test/main/backup_lock_debug.test40
-rw-r--r--mysql-test/main/backup_locks.result46
-rw-r--r--mysql-test/main/backup_locks.test50
-rw-r--r--mysql-test/main/backup_priv.result40
-rw-r--r--mysql-test/main/backup_priv.test52
-rw-r--r--mysql-test/main/backup_stages.result335
-rw-r--r--mysql-test/main/backup_stages.test385
-rw-r--r--mysql-test/main/backup_syntax.result163
-rw-r--r--mysql-test/main/backup_syntax.test181
-rw-r--r--mysql-test/main/bigint.result11
-rw-r--r--mysql-test/main/bigint.test9
-rw-r--r--mysql-test/main/check.result10
-rw-r--r--mysql-test/main/check.test12
-rw-r--r--mysql-test/main/column_compression_parts.result1
-rw-r--r--mysql-test/main/column_compression_parts.test2
-rw-r--r--mysql-test/main/connect.result19
-rw-r--r--mysql-test/main/connect.test29
-rw-r--r--mysql-test/main/create-big.result12
-rw-r--r--mysql-test/main/create-big.test12
-rw-r--r--mysql-test/main/create.result101
-rw-r--r--mysql-test/main/create.test91
-rw-r--r--mysql-test/main/create_drop_binlog.result4
-rw-r--r--mysql-test/main/create_or_replace.result51
-rw-r--r--mysql-test/main/create_or_replace.test22
-rw-r--r--mysql-test/main/create_user.result16
-rw-r--r--mysql-test/main/create_utf8.result89
-rw-r--r--mysql-test/main/create_utf8.test80
-rw-r--r--mysql-test/main/cte_recursive.result86
-rw-r--r--mysql-test/main/cte_recursive.test73
-rw-r--r--mysql-test/main/ctype_big5.result128
-rw-r--r--mysql-test/main/ctype_cp932_binlog_stm.result128
-rw-r--r--mysql-test/main/ctype_eucjpms.result128
-rw-r--r--mysql-test/main/ctype_euckr.result140
-rw-r--r--mysql-test/main/ctype_gb2312.result128
-rw-r--r--mysql-test/main/ctype_gbk.result454
-rw-r--r--mysql-test/main/ctype_latin1.result8
-rw-r--r--mysql-test/main/ctype_many.result4
-rw-r--r--mysql-test/main/ctype_recoding.result4
-rw-r--r--mysql-test/main/ctype_sjis.result128
-rw-r--r--mysql-test/main/ctype_uca.result40
-rw-r--r--mysql-test/main/ctype_uca_innodb.result28
-rw-r--r--mysql-test/main/ctype_ucs.result14
-rw-r--r--mysql-test/main/ctype_ucs.test15
-rw-r--r--mysql-test/main/ctype_ujis.result128
-rw-r--r--mysql-test/main/ctype_ujis_ucs2.result150
-rw-r--r--mysql-test/main/ctype_upgrade.result6
-rw-r--r--mysql-test/main/ctype_utf16.result4
-rw-r--r--mysql-test/main/ctype_utf16le.result4
-rw-r--r--mysql-test/main/ctype_utf32.result18
-rw-r--r--mysql-test/main/ctype_utf8.result86
-rw-r--r--mysql-test/main/ctype_utf8mb4.result52
-rw-r--r--mysql-test/main/ctype_utf8mb4_heap.result14
-rw-r--r--mysql-test/main/ctype_utf8mb4_innodb.result16
-rw-r--r--mysql-test/main/ctype_utf8mb4_myisam.result16
-rw-r--r--mysql-test/main/custom_aggregate_functions.result2
-rw-r--r--mysql-test/main/delayed.result4
-rw-r--r--mysql-test/main/delete_use_source.result9
-rw-r--r--mysql-test/main/deprecated_features.result2
-rw-r--r--mysql-test/main/derived_cond_pushdown.result251
-rw-r--r--mysql-test/main/derived_cond_pushdown.test27
-rw-r--r--mysql-test/main/derived_split_innodb.result1
-rw-r--r--mysql-test/main/derived_view.result8
-rw-r--r--mysql-test/main/disabled.def7
-rw-r--r--mysql-test/main/distinct.result24
-rw-r--r--mysql-test/main/distinct.test18
-rw-r--r--mysql-test/main/empty_user_table.result11
-rw-r--r--mysql-test/main/empty_user_table.test22
-rw-r--r--mysql-test/main/events_bugs.result2
-rw-r--r--mysql-test/main/explain_json.result1
-rw-r--r--mysql-test/main/explain_non_select.result2
-rw-r--r--mysql-test/main/failed_auth_3909.result25
-rw-r--r--mysql-test/main/failed_auth_3909.test18
-rw-r--r--mysql-test/main/failed_auth_unixsocket.result4
-rw-r--r--mysql-test/main/failed_auth_unixsocket.test4
-rw-r--r--mysql-test/main/flush.result21
-rw-r--r--mysql-test/main/flush.test48
-rw-r--r--mysql-test/main/flush_block_commit.test2
-rw-r--r--mysql-test/main/flush_block_commit_notembedded.test2
-rw-r--r--mysql-test/main/flush_read_lock.result58
-rw-r--r--mysql-test/main/flush_read_lock.test115
-rw-r--r--mysql-test/main/flush_read_lock_kill.test2
-rw-r--r--mysql-test/main/flush_ssl.result26
-rw-r--r--mysql-test/main/flush_ssl.test61
-rw-r--r--mysql-test/main/fulltext.result8
-rw-r--r--mysql-test/main/func_default.result10
-rw-r--r--mysql-test/main/func_default.test5
-rw-r--r--mysql-test/main/func_extract.result592
-rw-r--r--mysql-test/main/func_extract.test257
-rw-r--r--mysql-test/main/func_group_innodb.result26
-rw-r--r--mysql-test/main/func_group_innodb.test19
-rw-r--r--mysql-test/main/func_hybrid_type.result18
-rw-r--r--mysql-test/main/func_hybrid_type.test16
-rw-r--r--mysql-test/main/func_json.result20
-rw-r--r--mysql-test/main/func_json.test18
-rw-r--r--mysql-test/main/func_math.result40
-rw-r--r--mysql-test/main/func_math.test33
-rw-r--r--mysql-test/main/func_set.result4
-rw-r--r--mysql-test/main/func_str.result12
-rw-r--r--mysql-test/main/func_str.test16
-rw-r--r--mysql-test/main/func_time.result77
-rw-r--r--mysql-test/main/func_time.test40
-rw-r--r--mysql-test/main/func_time_round.result1374
-rw-r--r--mysql-test/main/func_time_round.test461
-rw-r--r--mysql-test/main/gis-rtree.result1
-rw-r--r--mysql-test/main/gis.result2
-rw-r--r--mysql-test/main/gis2.result4
-rw-r--r--mysql-test/main/grant.result42
-rw-r--r--mysql-test/main/grant.test43
-rw-r--r--mysql-test/main/grant2.result65
-rw-r--r--mysql-test/main/grant2.test25
-rw-r--r--mysql-test/main/grant3.result24
-rw-r--r--mysql-test/main/grant4.result18
-rw-r--r--mysql-test/main/grant5.result35
-rw-r--r--mysql-test/main/grant5.test19
-rw-r--r--mysql-test/main/grant_4332.result6
-rw-r--r--mysql-test/main/grant_4332.test8
-rw-r--r--mysql-test/main/group_by.result22
-rw-r--r--mysql-test/main/group_by.test13
-rw-r--r--mysql-test/main/group_by_innodb.result1
-rw-r--r--mysql-test/main/group_min_max.result116
-rw-r--r--mysql-test/main/group_min_max_innodb.result1
-rw-r--r--mysql-test/main/handlersocket.result2
-rw-r--r--mysql-test/main/having.result1
-rw-r--r--mysql-test/main/huge_frm-6224.result5
-rw-r--r--mysql-test/main/huge_frm-6224.test11
-rw-r--r--mysql-test/main/index_merge_innodb.result6
-rw-r--r--mysql-test/main/index_merge_innodb.test1
-rw-r--r--mysql-test/main/index_merge_myisam.result4
-rw-r--r--mysql-test/main/information_schema.result21
-rw-r--r--mysql-test/main/information_schema.test13
-rw-r--r--mysql-test/main/information_schema_all_engines.result2
-rw-r--r--mysql-test/main/init_file_set_password-7656.result6
-rw-r--r--mysql-test/main/innodb_ext_key.result7
-rw-r--r--mysql-test/main/innodb_ext_key.test1
-rw-r--r--mysql-test/main/innodb_icp.result8
-rw-r--r--mysql-test/main/innodb_mysql_sync.result4
-rw-r--r--mysql-test/main/innodb_mysql_sync.test2
-rw-r--r--mysql-test/main/insert.result32
-rw-r--r--mysql-test/main/invisible_field.result4
-rw-r--r--mysql-test/main/invisible_field_debug.result2
-rw-r--r--mysql-test/main/invisible_field_debug.test2
-rw-r--r--mysql-test/main/join.result10
-rw-r--r--mysql-test/main/join.test2
-rw-r--r--mysql-test/main/join_cache.result208
-rw-r--r--mysql-test/main/join_cache.test4
-rw-r--r--mysql-test/main/join_outer.result7
-rw-r--r--mysql-test/main/join_outer_innodb.result12
-rw-r--r--mysql-test/main/join_outer_jcl6.result7
-rw-r--r--mysql-test/main/kill.result2
-rw-r--r--mysql-test/main/kill.test8
-rw-r--r--mysql-test/main/limit_rows_examined.result11
-rw-r--r--mysql-test/main/loaddata.result6
-rw-r--r--mysql-test/main/lock.result3
-rw-r--r--mysql-test/main/lock.test2
-rw-r--r--mysql-test/main/lock_multi.result17
-rw-r--r--mysql-test/main/lock_multi.test68
-rw-r--r--mysql-test/main/lock_sync.result2
-rw-r--r--mysql-test/main/lock_sync.test4
-rw-r--r--mysql-test/main/log_tables_upgrade.result3
-rw-r--r--mysql-test/main/lowercase_fs_off.result3
-rw-r--r--mysql-test/main/max_password_errors.result45
-rw-r--r--mysql-test/main/max_password_errors.test64
-rw-r--r--mysql-test/main/mdev-504.result3
-rw-r--r--mysql-test/main/mdev-504.test4
-rw-r--r--mysql-test/main/mdev13607.result3
-rw-r--r--mysql-test/main/mdl.result74
-rw-r--r--mysql-test/main/mdl.test64
-rw-r--r--mysql-test/main/mdl_sync.result63
-rw-r--r--mysql-test/main/mdl_sync.test95
-rw-r--r--mysql-test/main/merge.result5
-rw-r--r--mysql-test/main/mix2_myisam.result1
-rw-r--r--mysql-test/main/multi_update.result4
-rw-r--r--mysql-test/main/myisam.result8
-rw-r--r--mysql-test/main/myisam_explain_non_select_all.result238
-rw-r--r--mysql-test/main/myisam_icp.result2
-rw-r--r--mysql-test/main/mysql_install_db_win.result13
-rw-r--r--mysql-test/main/mysql_install_db_win.test24
-rw-r--r--mysql-test/main/mysql_upgrade-6984.result7
-rw-r--r--mysql-test/main/mysql_upgrade-6984.test4
-rw-r--r--mysql-test/main/mysql_upgrade.result35
-rw-r--r--mysql-test/main/mysql_upgrade.test5
-rw-r--r--mysql-test/main/mysql_upgrade_no_innodb.result2
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.result12
-rw-r--r--mysql-test/main/mysql_upgrade_noengine.test16
-rw-r--r--mysql-test/main/mysql_upgrade_ssl.result3
-rw-r--r--mysql-test/main/mysql_upgrade_view.result13
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.result16
-rw-r--r--mysql-test/main/mysqlbinlog_row_minimal.result16
-rw-r--r--mysql-test/main/mysqlcheck.result10
-rw-r--r--mysql-test/main/mysqld--help.result29
-rw-r--r--mysql-test/main/mysqld_option_err.test2
-rw-r--r--mysql-test/main/mysqldump.result6
-rw-r--r--mysql-test/main/mysqldump.test2
-rw-r--r--mysql-test/main/not_embedded_server.result4
-rw-r--r--mysql-test/main/not_embedded_server.test2
-rw-r--r--mysql-test/main/null_key.result3
-rw-r--r--mysql-test/main/old-mode.result41
-rw-r--r--mysql-test/main/old-mode.test29
-rw-r--r--mysql-test/main/openssl_1.result72
-rw-r--r--mysql-test/main/openssl_1.test91
-rw-r--r--mysql-test/main/order_by.result37
-rw-r--r--mysql-test/main/order_by.test37
-rw-r--r--mysql-test/main/outfile_loaddata.result4
-rw-r--r--mysql-test/main/parser.result65
-rw-r--r--mysql-test/main/parser.test74
-rw-r--r--mysql-test/main/partition.result104
-rw-r--r--mysql-test/main/partition.test62
-rw-r--r--mysql-test/main/partition_alter.test2
-rw-r--r--mysql-test/main/partition_binlog.result1
-rw-r--r--mysql-test/main/partition_explicit_prune.result6
-rw-r--r--mysql-test/main/partition_innodb.result64
-rw-r--r--mysql-test/main/partition_innodb.test66
-rw-r--r--mysql-test/main/perror-win.result4
-rw-r--r--mysql-test/main/perror.result8
-rw-r--r--mysql-test/main/plugin.result6
-rw-r--r--mysql-test/main/plugin_auth.result3
-rw-r--r--mysql-test/main/plugin_auth.test8
-rw-r--r--mysql-test/main/plugin_auth_qa.result90
-rw-r--r--mysql-test/main/plugin_auth_qa_1.result44
-rw-r--r--mysql-test/main/plugin_auth_qa_1.test14
-rw-r--r--mysql-test/main/plugin_auth_qa_2.result26
-rw-r--r--mysql-test/main/processlist.result2
-rw-r--r--mysql-test/main/ps.result50
-rw-r--r--mysql-test/main/ps_ddl.result8
-rw-r--r--mysql-test/main/ps_ddl.test2
-rw-r--r--mysql-test/main/ps_error.result73
-rw-r--r--mysql-test/main/ps_error.test66
-rw-r--r--mysql-test/main/range.result87
-rw-r--r--mysql-test/main/range_innodb.result43
-rw-r--r--mysql-test/main/range_innodb.test42
-rw-r--r--mysql-test/main/range_mrr_icp.result121
-rw-r--r--mysql-test/main/range_vs_index_merge.result136
-rw-r--r--mysql-test/main/range_vs_index_merge.test17
-rw-r--r--mysql-test/main/range_vs_index_merge_innodb.result36
-rw-r--r--mysql-test/main/read_only.result16
-rw-r--r--mysql-test/main/read_only.test23
-rw-r--r--mysql-test/main/row.result2
-rw-r--r--mysql-test/main/select.result3
-rw-r--r--mysql-test/main/select_jcl6.result3
-rw-r--r--mysql-test/main/select_pkeycache.result3
-rw-r--r--mysql-test/main/select_safe.result9
-rw-r--r--mysql-test/main/selectivity_innodb.result1
-rw-r--r--mysql-test/main/session_tracker_last_gtid.result6
-rw-r--r--mysql-test/main/set_password.result28
-rw-r--r--mysql-test/main/set_password.test2
-rw-r--r--mysql-test/main/show_check.result6
-rw-r--r--mysql-test/main/show_grants_with_plugin-7985.result197
-rw-r--r--mysql-test/main/show_grants_with_plugin-7985.test160
-rw-r--r--mysql-test/main/sp-code.result12
-rw-r--r--mysql-test/main/sp-cursor.result26
-rw-r--r--mysql-test/main/sp-cursor.test21
-rw-r--r--mysql-test/main/sp-error.result2
-rw-r--r--mysql-test/main/sp-for-loop.result2
-rw-r--r--mysql-test/main/sp-for-loop.test2
-rw-r--r--mysql-test/main/sp-security.result24
-rw-r--r--mysql-test/main/sp-security.test9
-rw-r--r--mysql-test/main/sp-vars.result8
-rw-r--r--mysql-test/main/sp.result60
-rw-r--r--mysql-test/main/sp.test36
-rw-r--r--mysql-test/main/sp_notembedded.result2
-rw-r--r--mysql-test/main/sp_notembedded.test8
-rw-r--r--mysql-test/main/sql_mode.result8
-rw-r--r--mysql-test/main/sql_mode.test4
-rw-r--r--mysql-test/main/ssl-crl-revoked-crl.result1
-rw-r--r--mysql-test/main/ssl.result9
-rw-r--r--mysql-test/main/ssl.test5
-rw-r--r--mysql-test/main/ssl_cert_verify.result5
-rw-r--r--mysql-test/main/ssl_cert_verify.test43
-rw-r--r--mysql-test/main/ssl_cipher-master.opt1
-rw-r--r--mysql-test/main/ssl_cipher.result63
-rw-r--r--mysql-test/main/ssl_cipher.test110
-rw-r--r--mysql-test/main/ssl_crl-master.opt4
-rw-r--r--mysql-test/main/ssl_crl.combinations5
-rw-r--r--mysql-test/main/ssl_crl.result24
-rw-r--r--mysql-test/main/ssl_crl.test15
-rw-r--r--mysql-test/main/ssl_crl_clients-master.opt4
-rw-r--r--mysql-test/main/ssl_crl_clients-valid.result24
-rw-r--r--mysql-test/main/ssl_crl_clients.result6
-rw-r--r--mysql-test/main/ssl_crl_clients.test31
-rw-r--r--mysql-test/main/ssl_crl_clients_valid-master.opt4
-rw-r--r--mysql-test/main/ssl_crl_clients_valid.result16
-rw-r--r--mysql-test/main/ssl_crl_clients_valid.test23
-rw-r--r--mysql-test/main/ssl_crl_clrpath-master.opt4
-rw-r--r--mysql-test/main/ssl_crl_clrpath.result23
-rw-r--r--mysql-test/main/ssl_crl_clrpath.test16
-rw-r--r--mysql-test/main/stat_tables.result113
-rw-r--r--mysql-test/main/stat_tables.test59
-rw-r--r--mysql-test/main/stat_tables_disabled.result4
-rw-r--r--mysql-test/main/stat_tables_innodb.result113
-rw-r--r--mysql-test/main/stat_tables_rbr.result4
-rw-r--r--mysql-test/main/stat_tables_rbr.test5
-rw-r--r--mysql-test/main/statistics.result10
-rw-r--r--mysql-test/main/status.result8
-rw-r--r--mysql-test/main/str_to_datetime_457.result5
-rw-r--r--mysql-test/main/strict.result184
-rw-r--r--mysql-test/main/subselect.result16
-rw-r--r--mysql-test/main/subselect_exists2in.result7
-rw-r--r--mysql-test/main/subselect_exists2in_costmat.result2
-rw-r--r--mysql-test/main/subselect_extra.result4
-rw-r--r--mysql-test/main/subselect_extra_no_semijoin.result4
-rw-r--r--mysql-test/main/subselect_innodb.result1
-rw-r--r--mysql-test/main/subselect_mat.result6
-rw-r--r--mysql-test/main/subselect_mat_cost.result22
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.result1
-rw-r--r--mysql-test/main/subselect_no_exists_to_in.result14
-rw-r--r--mysql-test/main/subselect_no_mat.result12
-rw-r--r--mysql-test/main/subselect_no_opts.result6
-rw-r--r--mysql-test/main/subselect_no_scache.result16
-rw-r--r--mysql-test/main/subselect_no_semijoin.result4
-rw-r--r--mysql-test/main/subselect_sj.result2
-rw-r--r--mysql-test/main/subselect_sj2_mat.result36
-rw-r--r--mysql-test/main/subselect_sj2_mat.test4
-rw-r--r--mysql-test/main/subselect_sj_jcl6.result2
-rw-r--r--mysql-test/main/subselect_sj_mat.result22
-rw-r--r--mysql-test/main/system_mysql_db.result66
-rw-r--r--mysql-test/main/system_mysql_db_507.result (renamed from mysql-test/main/no_password_column-mdev-11170.result)12
-rw-r--r--mysql-test/main/system_mysql_db_507.test (renamed from mysql-test/main/no_password_column-mdev-11170.test)17
-rw-r--r--mysql-test/main/system_mysql_db_fix40123.result13
-rw-r--r--mysql-test/main/system_mysql_db_fix40123.test2
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.result13
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.test2
-rw-r--r--mysql-test/main/system_mysql_db_fix50117.result13
-rw-r--r--mysql-test/main/system_mysql_db_fix50117.test2
-rw-r--r--mysql-test/main/temp_table_frm.result6
-rw-r--r--mysql-test/main/temp_table_frm.test9
-rw-r--r--mysql-test/main/temporal_literal.result12
-rw-r--r--mysql-test/main/timezone2.result202
-rw-r--r--mysql-test/main/timezone2.test179
-rw-r--r--mysql-test/main/trigger.result4
-rw-r--r--mysql-test/main/trigger_notembedded.test2
-rw-r--r--mysql-test/main/truncate_coverage.result2
-rw-r--r--mysql-test/main/truncate_coverage.test4
-rw-r--r--mysql-test/main/type_date.result22
-rw-r--r--mysql-test/main/type_date_round.result174
-rw-r--r--mysql-test/main/type_date_round.test113
-rw-r--r--mysql-test/main/type_datetime.result8
-rw-r--r--mysql-test/main/type_datetime_round.result205
-rw-r--r--mysql-test/main/type_datetime_round.test147
-rw-r--r--mysql-test/main/type_decimal.result4
-rw-r--r--mysql-test/main/type_float.result2
-rw-r--r--mysql-test/main/type_interval.result83
-rw-r--r--mysql-test/main/type_interval.test54
-rw-r--r--mysql-test/main/type_newdecimal.result2
-rw-r--r--mysql-test/main/type_newdecimal.test1
-rw-r--r--mysql-test/main/type_num.result168
-rw-r--r--mysql-test/main/type_time.result40
-rw-r--r--mysql-test/main/type_time.test21
-rw-r--r--mysql-test/main/type_time_round.result260
-rw-r--r--mysql-test/main/type_time_round.test184
-rw-r--r--mysql-test/main/type_timestamp.result135
-rw-r--r--mysql-test/main/type_timestamp.test136
-rw-r--r--mysql-test/main/type_timestamp_round.result191
-rw-r--r--mysql-test/main/type_timestamp_round.test160
-rw-r--r--mysql-test/main/udf.result119
-rw-r--r--mysql-test/main/udf.test79
-rw-r--r--mysql-test/main/union.result40
-rw-r--r--mysql-test/main/union.test35
-rw-r--r--mysql-test/main/update.result4
-rw-r--r--mysql-test/main/update_use_source.result1
-rw-r--r--mysql-test/main/userstat.result4
-rw-r--r--mysql-test/main/view.result9
-rw-r--r--mysql-test/main/view_grant.result8
-rw-r--r--mysql-test/main/view_grant.test16
-rw-r--r--mysql-test/main/warnings.result68
-rw-r--r--mysql-test/main/win.result132
-rw-r--r--mysql-test/main/win.test127
-rw-r--r--mysql-test/main/win_big-mdev-11697.result2
-rwxr-xr-xmysql-test/mysql-test-run.pl167
-rw-r--r--mysql-test/std_data/ca-cert-verify.pem20
-rw-r--r--mysql-test/std_data/cacert.pem110
-rw-r--r--mysql-test/std_data/cakey.pem52
-rw-r--r--mysql-test/std_data/client-cert.crl12
-rw-r--r--mysql-test/std_data/client-cert.pem102
-rw-r--r--mysql-test/std_data/client-key.pem38
-rw-r--r--mysql-test/std_data/crl-ca-cert.pem63
-rw-r--r--mysql-test/std_data/crl-client-cert.pem62
-rw-r--r--mysql-test/std_data/crl-client-key.pem15
-rw-r--r--mysql-test/std_data/crl-client-revoked.crl10
-rw-r--r--mysql-test/std_data/crl-server-cert.pem62
-rw-r--r--mysql-test/std_data/crl-server-key.pem15
-rw-r--r--mysql-test/std_data/crldir/ed1f42db.r012
-rw-r--r--mysql-test/std_data/crldir/fc725416.r010
-rw-r--r--mysql-test/std_data/galera-cert.pem26
-rw-r--r--mysql-test/std_data/galera-key.pem28
-rw-r--r--mysql-test/std_data/galera-upgrade-ca-cert.pem40
-rw-r--r--mysql-test/std_data/galera-upgrade-server-cert.pem20
-rw-r--r--mysql-test/std_data/galera-upgrade-server-key.pem28
-rw-r--r--mysql-test/std_data/mdev17909#P#p20181029.MYD0
-rw-r--r--mysql-test/std_data/mdev17909#P#p20181029.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/mdev17909#P#p20181128.MYD0
-rw-r--r--mysql-test/std_data/mdev17909#P#p20181128.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/mdev17909.frmbin0 -> 3284 bytes
-rw-r--r--mysql-test/std_data/mdev17909.parbin0 -> 48 bytes
-rw-r--r--mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001bin0 -> 514 bytes
-rw-r--r--mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001bin0 -> 892 bytes
-rw-r--r--mysql-test/std_data/server-cert-verify-fail.pem19
-rw-r--r--mysql-test/std_data/server-cert-verify-pass.pem19
-rw-r--r--mysql-test/std_data/server-cert.crl12
-rw-r--r--mysql-test/std_data/server-cert.pem100
-rw-r--r--mysql-test/std_data/server-key-verify-fail.pem27
-rw-r--r--mysql-test/std_data/server-key-verify-pass.pem27
-rw-r--r--mysql-test/std_data/server-key.pem38
-rw-r--r--mysql-test/std_data/server-new-cert.pem81
-rw-r--r--mysql-test/std_data/server-new-key.pem27
-rw-r--r--mysql-test/std_data/server8k-cert.pem246
-rw-r--r--mysql-test/std_data/server8k-key.pem194
-rw-r--r--mysql-test/std_data/serversan-cert.pem92
-rw-r--r--mysql-test/std_data/serversan-key.pem40
-rw-r--r--mysql-test/suite.pm5
-rw-r--r--mysql-test/suite/archive/disabled.def13
-rw-r--r--mysql-test/suite/archive/flush.result18
-rw-r--r--mysql-test/suite/archive/flush.test25
-rw-r--r--mysql-test/suite/archive/rnd_pos.result56
-rw-r--r--mysql-test/suite/archive/rnd_pos.test27
-rw-r--r--mysql-test/suite/binlog/include/binlog.test8
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_binlog.result18
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result16
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_binlog.test4
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel.result1
-rw-r--r--mysql-test/suite/compat/oracle/r/parser.result110
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-code.result42
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result25
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-cursor.result30
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package-mdl.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package.result48
-rw-r--r--mysql-test/suite/compat/oracle/r/sp.result60
-rw-r--r--mysql-test/suite/compat/oracle/r/versioning.result8
-rw-r--r--mysql-test/suite/compat/oracle/t/parser.test154
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-code.test2
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test23
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-cursor.test35
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-package.test57
-rw-r--r--mysql-test/suite/compat/oracle/t/sp.test45
-rw-r--r--mysql-test/suite/compat/oracle/t/versioning.test10
-rw-r--r--mysql-test/suite/csv/flush.result25
-rw-r--r--mysql-test/suite/csv/flush.test30
-rw-r--r--mysql-test/suite/encryption/disabled.def1
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-checksum-algorithm.result225
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-alter.result28
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-force-corrupt.result3
-rw-r--r--mysql-test/suite/encryption/r/innodb-missing-key.result1
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-checksum-algorithm.test9
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-alter.test38
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-force-corrupt.test9
-rw-r--r--mysql-test/suite/encryption/t/innodb-missing-key.test1
-rw-r--r--mysql-test/suite/engines/funcs/r/an_calendar.result4
-rw-r--r--mysql-test/suite/engines/funcs/r/an_number.result14
-rw-r--r--mysql-test/suite/engines/funcs/r/an_string.result10
-rw-r--r--mysql-test/suite/engines/funcs/r/in_number_boundary_error.result12
-rw-r--r--mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result8
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_partition_analyze.result1
-rw-r--r--mysql-test/suite/engines/iuds/r/insert_decimal.result12
-rw-r--r--mysql-test/suite/engines/iuds/r/insert_number.result304
-rw-r--r--mysql-test/suite/engines/iuds/r/insert_year.result16
-rw-r--r--mysql-test/suite/engines/iuds/r/update_decimal.result4
-rw-r--r--mysql-test/suite/engines/iuds/r/update_delete_number.result17
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result72
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraint.result121
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result36
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_innodb.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql.result197
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result197
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_routines_embedded.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result3
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result3
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql.result39
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result78
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result1839
-rw-r--r--mysql-test/suite/funcs_1/r/is_views.result1
-rw-r--r--mysql-test/suite/funcs_1/r/is_views_embedded.result1
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result72
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result72
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result6
-rw-r--r--mysql-test/suite/funcs_1/t/is_check_constraint.test92
-rw-r--r--mysql-test/suite/funcs_1/t/is_user_privileges.test11
-rw-r--r--mysql-test/suite/galera/disabled.def28
-rw-r--r--mysql-test/suite/galera/galera_2nodes.cnf26
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_master.cnf18
-rw-r--r--mysql-test/suite/galera/galera_2nodes_as_slave.cnf51
-rw-r--r--mysql-test/suite/galera/galera_3nodes_as_slave.cnf62
-rw-r--r--mysql-test/suite/galera/galera_4nodes.cnf30
-rw-r--r--mysql-test/suite/galera/include/galera_base_port.inc8
-rw-r--r--mysql-test/suite/galera/include/galera_concurrent_test.inc90
-rw-r--r--mysql-test/suite/galera/include/galera_dump_sr_table.inc28
-rw-r--r--mysql-test/suite/galera/include/galera_load_provider.inc68
-rw-r--r--mysql-test/suite/galera/include/galera_sst_restore.inc2
-rw-r--r--mysql-test/suite/galera/include/galera_st_disconnect_slave.inc8
-rw-r--r--mysql-test/suite/galera/include/galera_unload_provider.inc8
-rw-r--r--mysql-test/suite/galera/include/have_filekeymanagement.inc3
-rw-r--r--mysql-test/suite/galera/r/GAL-382.result2
-rw-r--r--mysql-test/suite/galera/r/GAL-401.result2
-rw-r--r--mysql-test/suite/galera/r/GAL-480.result2
-rw-r--r--mysql-test/suite/galera/r/GCF-1081.result47
-rw-r--r--mysql-test/suite/galera/r/GCF-939.result13
-rw-r--r--mysql-test/suite/galera/r/MDEV-15443.result2
-rw-r--r--mysql-test/suite/galera/r/MW-252.result2
-rw-r--r--mysql-test/suite/galera/r/MW-258.result2
-rw-r--r--mysql-test/suite/galera/r/MW-259.result2
-rw-r--r--mysql-test/suite/galera/r/MW-284.result4
-rw-r--r--mysql-test/suite/galera/r/MW-285.result2
-rw-r--r--mysql-test/suite/galera/r/MW-286.result21
-rw-r--r--mysql-test/suite/galera/r/MW-292.result27
-rw-r--r--mysql-test/suite/galera/r/MW-309.result2
-rw-r--r--mysql-test/suite/galera/r/MW-313.result2
-rw-r--r--mysql-test/suite/galera/r/MW-328A.result25
-rw-r--r--mysql-test/suite/galera/r/MW-328B.result2
-rw-r--r--mysql-test/suite/galera/r/MW-328C.result2
-rw-r--r--mysql-test/suite/galera/r/MW-328D.result2
-rw-r--r--mysql-test/suite/galera/r/MW-328E.result2
-rw-r--r--mysql-test/suite/galera/r/MW-329.result9
-rw-r--r--mysql-test/suite/galera/r/MW-336.result2
-rw-r--r--mysql-test/suite/galera/r/MW-357.result2
-rw-r--r--mysql-test/suite/galera/r/MW-360.result41
-rw-r--r--mysql-test/suite/galera/r/MW-369.result149
-rw-r--r--mysql-test/suite/galera/r/MW-388.result6
-rw-r--r--mysql-test/suite/galera/r/MW-402.result76
-rw-r--r--mysql-test/suite/galera/r/MW-416.result5
-rw-r--r--mysql-test/suite/galera/r/MW-86-wait1.result17
-rw-r--r--mysql-test/suite/galera/r/MW-86-wait8.result16
-rw-r--r--mysql-test/suite/galera/r/MW-86.result78
-rw-r--r--mysql-test/suite/galera/r/basic.result2
-rw-r--r--mysql-test/suite/galera/r/binlog_checksum.result2
-rw-r--r--mysql-test/suite/galera/r/create.result2
-rw-r--r--mysql-test/suite/galera/r/enforce_storage_engine.result2
-rw-r--r--mysql-test/suite/galera/r/enforce_storage_engine2.result2
-rw-r--r--mysql-test/suite/galera/r/ev51914.result2
-rw-r--r--mysql-test/suite/galera/r/fk.result2
-rw-r--r--mysql-test/suite/galera/r/galera#414.result2
-rw-r--r--mysql-test/suite/galera/r/galera#500.result8
-rw-r--r--mysql-test/suite/galera/r/galera#505.result2
-rw-r--r--mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result382
-rw-r--r--mysql-test/suite/galera/r/galera_admin.result4
-rw-r--r--mysql-test/suite/galera/r/galera_alter_engine_innodb.result2
-rw-r--r--mysql-test/suite/galera/r/galera_alter_engine_myisam.result2
-rw-r--r--mysql-test/suite/galera/r/galera_alter_table_force.result2
-rw-r--r--mysql-test/suite/galera/r/galera_applier_ftwrl_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result2
-rw-r--r--mysql-test/suite/galera/r/galera_as_master.result4
-rw-r--r--mysql-test/suite/galera/r/galera_as_master_gtid.result44
-rw-r--r--mysql-test/suite/galera/r/galera_as_master_large.result2
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave.result12
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_autoinc.result12
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid.result12
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result159
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result315
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_nonprim.result16
-rw-r--r--mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result (renamed from mysql-test/suite/galera/r/galera_autoinc_sst_xtrabackup.result)4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_for_update.result6
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_get_lock.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_group_commit.result685
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_shutdown.result12
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_sleep.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_background_statistics.result4
-rw-r--r--mysql-test/suite/galera/r/galera_bf_lock_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_cache_size.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_checksum.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result2
-rw-r--r--mysql-test/suite/galera/r/galera_binlog_row_image.result2
-rw-r--r--mysql-test/suite/galera/r/galera_commit_empty.result15
-rw-r--r--mysql-test/suite/galera/r/galera_concurrent_ctas.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_function.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_procedure.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_table_as_select.result103
-rw-r--r--mysql-test/suite/galera/r/galera_create_table_like.result2
-rw-r--r--mysql-test/suite/galera/r/galera_create_trigger.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ddl_multiline.result2
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result13
-rw-r--r--mysql-test/suite/galera/r/galera_delete_limit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_desync_overlapped.result2
-rw-r--r--mysql-test/suite/galera/r/galera_drop_database.result8
-rw-r--r--mysql-test/suite/galera/r/galera_drop_multi.result2
-rw-r--r--mysql-test/suite/galera/r/galera_encrypt_tmp_files.result2
-rw-r--r--mysql-test/suite/galera/r/galera_enum.result4
-rw-r--r--mysql-test/suite/galera/r/galera_events.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_cascade_delete.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_cascade_update.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_conflict.result4
-rw-r--r--mysql-test/suite/galera/r/galera_fk_mismatch.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_multicolumn.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_multitable.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_no_pk.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_selfreferential.result2
-rw-r--r--mysql-test/suite/galera/r/galera_fk_setnull.result2
-rw-r--r--mysql-test/suite/galera/r/galera_flush_local.result6
-rw-r--r--mysql-test/suite/galera/r/galera_forced_binlog_format.result20
-rw-r--r--mysql-test/suite/galera/r/galera_ftwrl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ftwrl_drain.result4
-rw-r--r--mysql-test/suite/galera/r/galera_fulltext.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcache_recover.result9
-rw-r--r--mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result11
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_fc_limit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_fragment.result15
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_max_packet_size.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gra_log.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gtid.result2
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave.result26
-rw-r--r--mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result107
-rw-r--r--mysql-test/suite/galera/r/galera_insert_ignore.result2
-rw-r--r--mysql-test/suite/galera/r/galera_insert_multi.result4
-rw-r--r--mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,release.rdiff114
-rw-r--r--mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result118
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff (renamed from mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,debug.rdiff)17
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup.result (renamed from mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result)31
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff (renamed from mysql-test/suite/galera/r/galera_ist_xtrabackup-v2,debug.rdiff)17
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result98
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff19
-rw-r--r--mysql-test/suite/galera/r/galera_ist_mysqldump.result3
-rw-r--r--mysql-test/suite/galera/r/galera_ist_progress.result9
-rw-r--r--mysql-test/suite/galera/r/galera_ist_recv_bind.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ist_restart_joiner.result3
-rw-r--r--mysql-test/suite/galera/r/galera_ist_rsync.result5
-rw-r--r--mysql-test/suite/galera/r/galera_kill_ddl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_kill_largechanges.result2
-rw-r--r--mysql-test/suite/galera/r/galera_kill_smallchanges.result2
-rw-r--r--mysql-test/suite/galera/r/galera_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin.result4
-rw-r--r--mysql-test/suite/galera/r/galera_log_output_csv.result2
-rw-r--r--mysql-test/suite/galera/r/galera_many_columns.result4
-rw-r--r--mysql-test/suite/galera/r/galera_many_indexes.result6
-rw-r--r--mysql-test/suite/galera/r/galera_many_rows.result6
-rw-r--r--mysql-test/suite/galera/r/galera_many_tables_nopk.result4
-rw-r--r--mysql-test/suite/galera/r/galera_many_tables_pk.result4
-rw-r--r--mysql-test/suite/galera/r/galera_mdev_10812.result2
-rw-r--r--mysql-test/suite/galera/r/galera_mdev_13787.result2
-rw-r--r--mysql-test/suite/galera/r/galera_mdev_15611.result2
-rw-r--r--mysql-test/suite/galera/r/galera_mdl_race.result4
-rw-r--r--mysql-test/suite/galera/r/galera_multi_database.result2
-rw-r--r--mysql-test/suite/galera/r/galera_myisam_autocommit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_myisam_transactions.result2
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_bit.result4
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_blob.result4
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_large_varchar.result4
-rw-r--r--mysql-test/suite/galera/r/galera_nopk_unicode.result4
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result8
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result20
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result4
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_simple.result2
-rw-r--r--mysql-test/suite/galera/r/galera_pc_recovery.result37
-rw-r--r--mysql-test/suite/galera/r/galera_pk_bigint_signed.result4
-rw-r--r--mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result4
-rw-r--r--mysql-test/suite/galera/r/galera_prepared_statement.result4
-rw-r--r--mysql-test/suite/galera/r/galera_query_cache.result2
-rw-r--r--mysql-test/suite/galera/r/galera_query_cache_sync_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_read_only.result2
-rw-r--r--mysql-test/suite/galera/r/galera_repl_key_format_flat16.result2
-rw-r--r--mysql-test/suite/galera/r/galera_repl_max_ws_size.result4
-rw-r--r--mysql-test/suite/galera/r/galera_restart_nochanges.result2
-rw-r--r--mysql-test/suite/galera/r/galera_restart_on_unknown_option.result2
-rw-r--r--mysql-test/suite/galera/r/galera_roles.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_add_pk.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_drop_pk.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_error.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_simple.result2
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sbr.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sbr_binlog.result2
-rw-r--r--mysql-test/suite/galera/r/galera_schema_dirty_reads.result2
-rw-r--r--mysql-test/suite/galera/r/galera_serializable.result8
-rw-r--r--mysql-test/suite/galera/r/galera_server.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sql_log_bin_zero.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ssl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ssl_compression.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff4
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff (renamed from mysql-test/suite/galera/r/galera_sst_xtrabackup-v2,debug.rdiff)4
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result (renamed from mysql-test/suite/galera/r/galera_sst_xtrabackup-v2.result)2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result5
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result999
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff22
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump,release.rdiff18
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump.result1
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff106
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result97
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff12
-rw-r--r--mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_xtrabackup-v2-options.result3
-rw-r--r--mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result262
-rw-r--r--mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_encrypt_with_key.result3
-rw-r--r--mysql-test/suite/galera/r/galera_status_cluster.result2
-rw-r--r--mysql-test/suite/galera/r/galera_status_local_index.result2
-rw-r--r--mysql-test/suite/galera/r/galera_status_local_state.result2
-rw-r--r--mysql-test/suite/galera/r/galera_suspend_slave.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_show.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_error.result5
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_locking.result33
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_sequential.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_drop_database.result6
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ftwrl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_lock_exclusive.result4
-rw-r--r--mysql-test/suite/galera/r/galera_toi_lock_shared.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_truncate.result4
-rw-r--r--mysql-test/suite/galera/r/galera_transaction_read_only.result2
-rw-r--r--mysql-test/suite/galera/r/galera_transaction_replay.result96
-rw-r--r--mysql-test/suite/galera/r/galera_truncate.result2
-rw-r--r--mysql-test/suite/galera/r/galera_truncate_temporary.result2
-rw-r--r--mysql-test/suite/galera/r/galera_unicode_identifiers.result2
-rw-r--r--mysql-test/suite/galera/r/galera_unicode_pk.result6
-rw-r--r--mysql-test/suite/galera/r/galera_update_limit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_v1_row_events.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_OSU_method.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_OSU_method2.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_cluster_address.result8
-rw-r--r--mysql-test/suite/galera/r/galera_var_desync_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_dirty_reads.result5
-rw-r--r--mysql-test/suite/galera/r/galera_var_fkchecks.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_gtid_domain_id.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result186
-rw-r--r--mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_load_data_splitting.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_log_bin.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_max_ws_rows.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_max_ws_size.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_node_address.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_reject_queries.result3
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_retry_autocommit.result28
-rw-r--r--mysql-test/suite/galera/r/galera_var_slave_threads.result60
-rw-r--r--mysql-test/suite/galera/r/galera_var_sst_auth.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_sync_wait.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_wsrep_on_off.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wan.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wan_restart_ist.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wan_restart_sst.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_log_conficts.result4
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_new_cluster.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result2
-rw-r--r--mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result2
-rw-r--r--mysql-test/suite/galera/r/galera_zero_length_column.result2
-rw-r--r--mysql-test/suite/galera/r/grant.result4
-rw-r--r--mysql-test/suite/galera/r/lp1276424.result2
-rw-r--r--mysql-test/suite/galera/r/lp1347768.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747-2.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747-3.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747-4.result2
-rw-r--r--mysql-test/suite/galera/r/lp1376747.result2
-rw-r--r--mysql-test/suite/galera/r/lp1438990.result2
-rw-r--r--mysql-test/suite/galera/r/lp959512.result2
-rw-r--r--mysql-test/suite/galera/r/mdev_10518.result2
-rw-r--r--mysql-test/suite/galera/r/mdev_9290.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#110.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#198.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#201.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#216.result11
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#237.result4
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#247.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#31.result2
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#33.result6
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#332.result42
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#90.result2
-rw-r--r--mysql-test/suite/galera/r/partition.result24
-rw-r--r--mysql-test/suite/galera/r/pxc-421.result2
-rw-r--r--mysql-test/suite/galera/r/query_cache.result2
-rw-r--r--mysql-test/suite/galera/r/rename.result2
-rw-r--r--mysql-test/suite/galera/r/rpl_row_annotate.result8
-rw-r--r--mysql-test/suite/galera/r/sql_log_bin.result2
-rw-r--r--mysql-test/suite/galera/r/unique_key.result2
-rw-r--r--mysql-test/suite/galera/r/versioning_trx_id.result2
-rw-r--r--mysql-test/suite/galera/r/view.result2
-rw-r--r--mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result15
-rw-r--r--mysql-test/suite/galera/suite.pm12
-rw-r--r--mysql-test/suite/galera/t/GAL-419.test4
-rw-r--r--mysql-test/suite/galera/t/GCF-1081.test72
-rw-r--r--mysql-test/suite/galera/t/GCF-939.test31
-rw-r--r--mysql-test/suite/galera/t/MW-284.test2
-rw-r--r--mysql-test/suite/galera/t/MW-286.test50
-rw-r--r--mysql-test/suite/galera/t/MW-292.test50
-rw-r--r--mysql-test/suite/galera/t/MW-328A.test40
-rw-r--r--mysql-test/suite/galera/t/MW-329.test28
-rw-r--r--mysql-test/suite/galera/t/MW-336.test9
-rw-r--r--mysql-test/suite/galera/t/MW-360-master.opt2
-rw-r--r--mysql-test/suite/galera/t/MW-360.test100
-rw-r--r--mysql-test/suite/galera/t/MW-369.inc7
-rw-r--r--mysql-test/suite/galera/t/MW-369.test100
-rw-r--r--mysql-test/suite/galera/t/MW-388.test5
-rw-r--r--mysql-test/suite/galera/t/MW-402.test56
-rw-r--r--mysql-test/suite/galera/t/MW-416.test8
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait1.test13
-rw-r--r--mysql-test/suite/galera/t/MW-86-wait8.test11
-rw-r--r--mysql-test/suite/galera/t/galera#500.test6
-rw-r--r--mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test161
-rw-r--r--mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt2
-rw-r--r--mysql-test/suite/galera/t/galera_as_master.test2
-rw-r--r--mysql-test/suite/galera/t/galera_as_master_gtid.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_as_master_gtid.test24
-rw-r--r--mysql-test/suite/galera/t/galera_as_master_gtid_change_master.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_as_master_gtid_change_master.test2
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave.test17
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_autoinc.test18
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid.test21
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf17
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test150
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test176
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_nonprim.test26
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_preordered.test19
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test13
-rw-r--r--mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf (renamed from mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf)7
-rw-r--r--mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test (renamed from mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test)13
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf15
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_group_commit.test77
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_shutdown.test33
-rw-r--r--mysql-test/suite/galera/t/galera_commit_empty.test35
-rw-r--r--mysql-test/suite/galera/t/galera_create_table_as_select.test145
-rw-r--r--mysql-test/suite/galera/t/galera_defaults.test25
-rw-r--r--mysql-test/suite/galera/t/galera_drop_database.test26
-rw-r--r--mysql-test/suite/galera/t/galera_forced_binlog_format.test5
-rw-r--r--mysql-test/suite/galera/t/galera_ftwrl_drain.test4
-rw-r--r--mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test12
-rw-r--r--mysql-test/suite/galera/t/galera_gcs_fragment.test4
-rw-r--r--mysql-test/suite/galera/t/galera_gtid-master.opt2
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave.test33
-rw-r--r--mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test110
-rw-r--r--mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.cnf3
-rw-r--r--mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.test1
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup.cnf (renamed from mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf)2
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup.test (renamed from mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test)3
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf14
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test13
-rw-r--r--mysql-test/suite/galera/t/galera_ist_progress.test4
-rw-r--r--mysql-test/suite/galera/t/galera_ist_restart_joiner.test4
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.test1
-rw-r--r--mysql-test/suite/galera/t/galera_log_bin.test2
-rw-r--r--mysql-test/suite/galera/t/galera_many_rows.cnf10
-rw-r--r--mysql-test/suite/galera/t/galera_many_rows.test7
-rw-r--r--mysql-test/suite/galera/t/galera_migrate.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test6
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test11
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_simple.test2
-rw-r--r--mysql-test/suite/galera/t/galera_pc_recovery.test102
-rw-r--r--mysql-test/suite/galera/t/galera_split_brain.test6
-rw-r--r--mysql-test/suite/galera/t/galera_ssl.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_ssl_compression.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_ssl_upgrade.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_ssl_upgrade.test6
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf (renamed from mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf)5
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.test (renamed from mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.test)4
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf12
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.test (renamed from mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.test)6
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf (renamed from mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf)3
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test229
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump.test2
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf4
-rw-r--r--mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf25
-rw-r--r--mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.test13
-rw-r--r--mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test20
-rw-r--r--mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf12
-rw-r--r--mysql-test/suite/galera/t/galera_toi_ddl_error.test5
-rw-r--r--mysql-test/suite/galera/t/galera_toi_ddl_locking.test54
-rw-r--r--mysql-test/suite/galera/t/galera_transaction_replay.test201
-rw-r--r--mysql-test/suite/galera/t/galera_var_cluster_address.test11
-rw-r--r--mysql-test/suite/galera/t/galera_var_dirty_reads.test12
-rw-r--r--mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test235
-rw-r--r--mysql-test/suite/galera/t/galera_var_log_bin.cnf5
-rw-r--r--mysql-test/suite/galera/t/galera_var_reject_queries.test7
-rw-r--r--mysql-test/suite/galera/t/galera_var_retry_autocommit.test24
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.cnf7
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.test139
-rw-r--r--mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_new_cluster.test1
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#198-master.opt1
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#237.test4
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#332.test2
-rw-r--r--mysql-test/suite/galera/t/partition.test30
-rw-r--r--mysql-test/suite/galera/t/rpl_row_annotate.test5
-rw-r--r--mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test22
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def1
-rw-r--r--mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf34
-rw-r--r--mysql-test/suite/galera_3nodes/galera_3nodes.cnf20
-rw-r--r--mysql-test/suite/galera_3nodes/include/galera_resume.inc (renamed from mysql-test/suite/galera/include/galera_resume.inc)2
-rw-r--r--mysql-test/suite/galera_3nodes/include/galera_suspend.inc2
-rw-r--r--mysql-test/suite/galera_3nodes/include/have_ipv6.inc15
-rw-r--r--mysql-test/suite/galera_3nodes/include/have_mariabackup.inc (renamed from mysql-test/suite/galera/include/have_xtrabackup.inc)0
-rw-r--r--mysql-test/suite/galera_3nodes/r/GAL-501.result6
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result5
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result8
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_garbd.result14
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result11
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result (renamed from mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result)8
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result24
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result5
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result2
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result4
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result13
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_weight.result24
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result23
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result7
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result82
-rw-r--r--mysql-test/suite/galera_3nodes/suite.pm48
-rw-r--r--mysql-test/suite/galera_3nodes/t/GAL-501.opt1
-rw-r--r--mysql-test/suite/galera_3nodes/t/GAL-501.test8
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test6
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_garbd.test22
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.cnf4
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test58
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf (renamed from mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf)10
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.opt1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test (renamed from mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test)22
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf10
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test48
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf10
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf8
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.test9
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test26
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test3
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test83
-rw-r--r--mysql-test/suite/galera_3nodes_sr/disabled.def7
-rw-r--r--mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf1
-rw-r--r--mysql-test/suite/galera_3nodes_sr/my.cnf1
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-336.result26
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-582.result23
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-606.result38
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-609.result20
-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/GCF-817.result54
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-832.result26
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result39
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result33
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result53
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result58
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result31
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result44
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result117
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-336.test47
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-582.test39
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-606.test80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-609.test30
-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/GCF-817.test109
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-832.test43
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test127
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test59
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test58
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test81
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test80
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test56
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test73
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test177
-rw-r--r--mysql-test/suite/galera_sr/disabled.def3
-rw-r--r--mysql-test/suite/galera_sr/galera_2nodes.cnf1
-rw-r--r--mysql-test/suite/galera_sr/my.cnf1
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1008.result70
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1018.result24
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1018B.result12
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1043A.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1043B.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1051.result46
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-1060.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-437.result12
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-561.result50
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-571.result67
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-572.result37
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-574.result11
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-580.result13
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-585.result28
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-597.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-620.result18
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-623.result29
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-627.result26
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-845.result21
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-851.result30
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-867.result4
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-889.result25
-rw-r--r--mysql-test/suite/galera_sr/r/GCF-900.result21
-rw-r--r--mysql-test/suite/galera_sr/r/galera-features#56.result32
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result555
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_blob.result23
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_cc_master.result65
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result59
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_concurrent.result36
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict.result21
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result31
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result28
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result29
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result48
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result23
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result50
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result42
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result46
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result39
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_gtid.result57
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_insert_select.result18
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result29
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result30
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result30
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result32
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_query.result31
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result53
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result33
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_load_data.result13
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result9
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_log_bin.result124
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result33
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_myisam.result16
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result58
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result37
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback.result42
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result33
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result42
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result22
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_sbr.result16
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result31
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result43
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result15
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_table_contents.result198
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result121
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result54
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result20
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ws_size.result36
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result34
-rw-r--r--mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result29
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep#215.result137
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result65
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result24
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result12
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result42
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result11
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result752
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result35
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result23
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result14
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result27
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result41
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result39
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result20
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result18
-rw-r--r--mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result33
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1008.inc36
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1008.test18
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1018.test38
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1018B.test40
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1043A.test13
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1043B.test13
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1051.test51
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-1060.test9
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-437.test21
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-561.test65
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-571.test54
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-572.test54
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-574.test27
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-580.test27
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-585.test44
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-597.test29
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-620.test22
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-623.test31
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-627.test30
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-845.test30
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-851.test24
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-867.test42
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-889.test29
-rw-r--r--mysql-test/suite/galera_sr/t/GCF-900.test28
-rw-r--r--mysql-test/suite/galera_sr/t/galera-features#56.test55
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc145
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test50
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_blob.test38
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_cc_master.test98
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test97
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_concurrent.test45
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict.test45
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test45
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test46
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test44
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test63
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test43
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test65
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test62
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_gtid.test46
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_insert_select.test33
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test52
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf4
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test54
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_query.test48
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf4
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test80
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test58
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_load_data.test39
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test50
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_log_bin.test70
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_myisam.test29
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf11
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test79
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test59
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback.test76
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test55
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test51
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test61
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_sbr.test31
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test53
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test63
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf6
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test21
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_table_contents.test49
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test260
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test54
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test27
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ws_size.test70
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test62
-rw-r--r--mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test38
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep#215.test175
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test41
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test25
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test21
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test60
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test17
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc104
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test41
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test47
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test29
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test23
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt1
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test44
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test48
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test63
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test44
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test29
-rw-r--r--mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test45
-rw-r--r--mysql-test/suite/gcol/r/gcol_bugfixes.result2
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_innodb.result8
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_myisam.result6
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_innodb.result7
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_myisam.result11
-rw-r--r--mysql-test/suite/gcol/r/gcol_view_innodb.result1
-rw-r--r--mysql-test/suite/gcol/r/gcol_view_myisam.result1
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result9
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_index.result22
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test9
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_index.test19
-rw-r--r--mysql-test/suite/handler/aria.result4
-rw-r--r--mysql-test/suite/handler/heap.result5
-rw-r--r--mysql-test/suite/handler/innodb.result4
-rw-r--r--mysql-test/suite/handler/interface.result6
-rw-r--r--mysql-test/suite/handler/interface.test6
-rw-r--r--mysql-test/suite/handler/myisam.result4
-rw-r--r--mysql-test/suite/innodb/include/alter_instant.inc33
-rw-r--r--mysql-test/suite/innodb/include/crc32.pl33
-rw-r--r--mysql-test/suite/innodb/r/alter_candidate_key.result114
-rw-r--r--mysql-test/suite/innodb/r/alter_inplace_perfschema.result9
-rw-r--r--mysql-test/suite/innodb/r/analyze_table.result1
-rw-r--r--mysql-test/suite/innodb/r/data_types.result23
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff11
-rw-r--r--mysql-test/suite/innodb/r/default_row_format_create.result22
-rw-r--r--mysql-test/suite/innodb/r/innochecksum.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-debug.result23
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-table.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result35
-rw-r--r--mysql-test/suite/innodb/r/innodb-index-online.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb-index.result48
-rw-r--r--mysql-test/suite/innodb/r/innodb-online-alter-gis.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-table-online.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb-update-insert.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns.result13
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_28867993.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14676111.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30423.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53046.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug57252.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result15
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_drop_locked.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_persistent.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_zip_innochecksum.result91
-rw-r--r--mysql-test/suite/innodb/r/innodb_zip_innochecksum2.result160
-rw-r--r--mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result227
-rw-r--r--mysql-test/suite/innodb/r/instant_alter.result635
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result130
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_crash.result30
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug.result40
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_null.result56
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff18
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_purge.result46
-rw-r--r--mysql-test/suite/innodb/r/instant_drop.result27
-rw-r--r--mysql-test/suite/innodb/r/instant_varchar_enlarge.result9
-rw-r--r--mysql-test/suite/innodb/r/monitor.result1
-rw-r--r--mysql-test/suite/innodb/r/purge_secondary.result1
-rw-r--r--mysql-test/suite/innodb/r/table_flags.result5
-rw-r--r--mysql-test/suite/innodb/r/truncate.result33
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate_recover.result1
-rw-r--r--mysql-test/suite/innodb/t/alter_candidate_key.test72
-rw-r--r--mysql-test/suite/innodb/t/alter_inplace_perfschema.test8
-rw-r--r--mysql-test/suite/innodb/t/data_types.test22
-rw-r--r--mysql-test/suite/innodb/t/default_row_format_create.test20
-rw-r--r--mysql-test/suite/innodb/t/innochecksum.test32
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-debug.test32
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test18
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test55
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-virtual-columns.test11
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb_28867993.test12
-rw-r--r--mysql-test/suite/innodb/t/innodb_zip_innochecksum.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_zip_innochecksum.test239
-rw-r--r--mysql-test/suite/innodb/t/innodb_zip_innochecksum2.opt3
-rw-r--r--mysql-test/suite/innodb/t/innodb_zip_innochecksum2.test118
-rw-r--r--mysql-test/suite/innodb/t/innodb_zip_innochecksum3.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_zip_innochecksum3.test406
-rw-r--r--mysql-test/suite/innodb/t/instant_alter.test236
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_bugs.test138
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_crash.test10
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_debug.test40
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_null.test57
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_purge.test75
-rw-r--r--mysql-test/suite/innodb/t/instant_drop.test14
-rw-r--r--mysql-test/suite/innodb/t/instant_varchar_enlarge.test8
-rw-r--r--mysql-test/suite/innodb/t/log_file_name_debug.test4
-rw-r--r--mysql-test/suite/innodb/t/purge_thread_shutdown.test4
-rw-r--r--mysql-test/suite/innodb/t/recovery_shutdown.test6
-rw-r--r--mysql-test/suite/innodb/t/table_flags.test6
-rw-r--r--mysql-test/suite/innodb/t/truncate.test35
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate_recover.test4
-rw-r--r--mysql-test/suite/innodb_fts/r/create.result20
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result11
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-fic.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result4
-rw-r--r--mysql-test/suite/innodb_fts/t/create.test16
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test10
-rw-r--r--mysql-test/suite/innodb_gis/r/1.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/alter_spatial_index.result9
-rw-r--r--mysql-test/suite/innodb_gis/r/create_spatial_index.result3
-rw-r--r--mysql-test/suite/innodb_gis/r/gis.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result1
-rw-r--r--mysql-test/suite/innodb_gis/r/rt_precise.result1
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree.result2
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_estimate.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-zip.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result6
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum.test4
-rw-r--r--mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test14
-rw-r--r--mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result4
-rw-r--r--mysql-test/suite/maria/icp.result2
-rw-r--r--mysql-test/suite/maria/maria-autozerofill.result1
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.result1
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.result1
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.result1
-rw-r--r--mysql-test/suite/maria/maria.result9
-rw-r--r--mysql-test/suite/maria/maria3.result2
-rw-r--r--mysql-test/suite/maria/system_tables.result1
-rw-r--r--mysql-test/suite/maria/system_tables.test4
-rw-r--r--mysql-test/suite/mariabackup/backup_grants.result5
-rw-r--r--mysql-test/suite/mariabackup/backup_grants.test30
-rw-r--r--mysql-test/suite/mariabackup/drop_table_during_backup.result5
-rw-r--r--mysql-test/suite/mariabackup/drop_table_during_backup.test9
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_compressed.opt6
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_compressed.result7
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_compressed.test48
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.opt6
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.result8
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.test70
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.opt4
-rw-r--r--mysql-test/suite/mariabackup/partition_partial.opt1
-rw-r--r--mysql-test/suite/mariabackup/partition_partial.result31
-rw-r--r--mysql-test/suite/mariabackup/partition_partial.test44
-rw-r--r--mysql-test/suite/mariabackup/rename_during_backup.result9
-rw-r--r--mysql-test/suite/mariabackup/rename_during_backup.test7
-rw-r--r--mysql-test/suite/mariabackup/unencrypted_page_compressed.result11
-rw-r--r--mysql-test/suite/mariabackup/unencrypted_page_compressed.test50
-rw-r--r--mysql-test/suite/mariabackup/xb_aws_key_management.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result56
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result16
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_innodb.result32
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_myisam.result16
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_innodb.result80
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_myisam.result32
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_maria.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_myisam.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result40
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_maria.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_myisam.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result216
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result216
-rw-r--r--mysql-test/suite/parts/r/partition_basic_innodb.result64
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result32
-rw-r--r--mysql-test/suite/parts/r/partition_basic_symlink_myisam.result39
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result11
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result11
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_memory.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_memory.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc2_memory.result1
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result1
-rw-r--r--mysql-test/suite/parts/r/partition_repair_myisam.result3
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result4
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate.result412
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a.result344
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result268
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result272
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result196
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_h.result336
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u.result340
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result264
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result12
-rw-r--r--mysql-test/suite/perfschema/r/setup_instruments_defaults.result1
-rw-r--r--mysql-test/suite/perfschema/r/socket_connect.result13
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result2
-rw-r--r--mysql-test/suite/perfschema/t/socket_connect.test9
-rw-r--r--mysql-test/suite/perfschema/t/stage_mdl_global.test4
-rw-r--r--mysql-test/suite/plugins/r/audit_null.result6
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result2
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result2
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result2
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result2
-rw-r--r--mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result12
-rw-r--r--mysql-test/suite/plugins/r/max_password_errors_auth_socket.result12
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result22
-rw-r--r--mysql-test/suite/plugins/r/show_all_plugins.result4
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result4
-rw-r--r--mysql-test/suite/plugins/r/sql_error_log.result4
-rw-r--r--mysql-test/suite/plugins/r/thread_pool_server_audit.result22
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_load.test4
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt1
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test22
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt1
-rw-r--r--mysql-test/suite/plugins/t/max_password_errors_auth_socket.test23
-rw-r--r--mysql-test/suite/plugins/t/simple_password_check.test2
-rw-r--r--mysql-test/suite/roles/create_and_drop_role.result6
-rw-r--r--mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result1
-rw-r--r--mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test7
-rw-r--r--mysql-test/suite/roles/default_create_user_not_role.result2
-rw-r--r--mysql-test/suite/roles/flush_roles-17898.result9
-rw-r--r--mysql-test/suite/roles/flush_roles-17898.test12
-rw-r--r--mysql-test/suite/roles/grant_revoke_current.result3
-rw-r--r--mysql-test/suite/roles/grant_revoke_current.test5
-rw-r--r--mysql-test/suite/roles/grant_role_auto_create_user.result2
-rw-r--r--mysql-test/suite/roles/i_s_applicable_roles_is_default.result1
-rw-r--r--mysql-test/suite/roles/i_s_applicable_roles_is_default.test2
-rw-r--r--mysql-test/suite/roles/none_public.result12
-rw-r--r--mysql-test/suite/roles/none_public.test6
-rw-r--r--mysql-test/suite/roles/prepare_stmt_with_role.result6
-rw-r--r--mysql-test/suite/roles/rename_user.result2
-rw-r--r--mysql-test/suite/roles/role_case_sensitive-10744.result2
-rw-r--r--mysql-test/suite/roles/set_default_role_clear.result8
-rw-r--r--mysql-test/suite/roles/set_default_role_for.result13
-rw-r--r--mysql-test/suite/roles/set_default_role_for.test3
-rw-r--r--mysql-test/suite/roles/set_default_role_invalid.result6
-rw-r--r--mysql-test/suite/roles/set_default_role_new_connection.result10
-rw-r--r--mysql-test/suite/roles/set_default_role_ps-6960.result3
-rw-r--r--mysql-test/suite/roles/set_default_role_ps-6960.test7
-rw-r--r--mysql-test/suite/roles/set_role-database-recursive.result2
-rw-r--r--mysql-test/suite/roles/set_role-database-simple.result2
-rw-r--r--mysql-test/suite/roles/set_role-recursive.result2
-rw-r--r--mysql-test/suite/roles/set_role-routine-simple.result2
-rw-r--r--mysql-test/suite/roles/set_role-simple.result2
-rw-r--r--mysql-test/suite/roles/set_role-table-column-priv.result2
-rw-r--r--mysql-test/suite/roles/set_role-table-simple.result2
-rw-r--r--mysql-test/suite/roles/show_grants.result2
-rw-r--r--mysql-test/suite/roles/show_grants_replicated.result2
-rw-r--r--mysql-test/suite/rpl/disabled.def1
-rw-r--r--mysql-test/suite/rpl/include/rpl_EE_err.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_001.test96
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_annotate.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_row_delayed_ins.test2
-rw-r--r--mysql-test/suite/rpl/r/rpl_EE_err.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug31076.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_drop_user.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_if_not_exists.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_ddl.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result24
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_grant.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result40
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_stop_start.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_idempotency.result17
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_revoke.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_table.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result45
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic.result16
-rw-r--r--mysql-test/suite/rpl/r/rpl_rewrt_db.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_001.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_annotate_do.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_annotate_dont.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff31
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_big_table_id.result46
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_delayed_ins.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_000001.result33
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_round.result50
-rw-r--r--mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_user.result11
-rw-r--r--mysql-test/suite/rpl/t/rpl_do_grant.test30
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test68
-rw-r--r--mysql-test/suite/rpl/t/rpl_idempotency.test21
-rw-r--r--mysql-test/suite/rpl/t/rpl_ignore_table.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test58
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test62
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test42
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_001.test48
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_big_table_id.test57
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_000001.test21
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporal_round.test35
-rw-r--r--mysql-test/suite/rpl/t/rpl_user.test11
-rw-r--r--mysql-test/suite/storage_engine/type_bool.result4
-rw-r--r--mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result1
-rw-r--r--mysql-test/suite/sys_vars/r/myisam_stats_method_func.result6
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result20
-rw-r--r--mysql-test/suite/sys_vars/r/sql_mode_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result44
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result58
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result58
-rw-r--r--mysql-test/suite/sys_vars/r/table_definition_cache_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/use_stat_tables_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_sst_method_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/sql_mode_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_aria.test1
-rw-r--r--mysql-test/suite/sys_vars/t/table_definition_cache_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test2
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test16
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_sst_method_basic.test5
-rw-r--r--mysql-test/suite/vcol/r/update.result4
-rw-r--r--mysql-test/suite/vcol/r/update_binlog.result8
-rw-r--r--mysql-test/suite/vcol/r/upgrade.result16
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result1
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result28
-rw-r--r--mysql-test/suite/vcol/t/update.test4
-rw-r--r--mysql-test/suite/vcol/t/upgrade.test15
-rw-r--r--mysql-test/suite/vcol/t/vcol_misc.test27
-rw-r--r--mysql-test/suite/versioning/r/alter.result2
-rw-r--r--mysql-test/suite/versioning/r/cte.result2
-rw-r--r--mysql-test/suite/versioning/r/foreign.result9
-rw-r--r--mysql-test/suite/versioning/r/online.result28
-rw-r--r--mysql-test/suite/versioning/r/sysvars.result15
-rw-r--r--mysql-test/suite/versioning/t/alter.test2
-rw-r--r--mysql-test/suite/versioning/t/foreign.test14
-rw-r--r--mysql-test/suite/versioning/t/online.test44
-rw-r--r--mysql-test/suite/versioning/t/sysvars.test10
-rw-r--r--mysql-test/suite/wsrep/disabled.def3
-rw-r--r--mysql-test/suite/wsrep/my.cnf4
-rw-r--r--mysql-test/suite/wsrep/r/variables.result3
-rw-r--r--mysql-test/suite/wsrep/r/wsrep-recover,binlogon.rdiff28
-rw-r--r--mysql-test/suite/wsrep/r/wsrep-recover.result66
-rw-r--r--mysql-test/suite/wsrep/suite.pm4
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.opt1
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.test1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.cnf6
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.opt1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.test1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_6832.cnf7
-rw-r--r--mysql-test/suite/wsrep/t/mdev_6832.opt1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_6832.test1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_7798.cnf7
-rw-r--r--mysql-test/suite/wsrep/t/mdev_7798.opt1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_7798.test1
-rw-r--r--mysql-test/suite/wsrep/t/pool_of_threads.cnf8
-rw-r--r--mysql-test/suite/wsrep/t/pool_of_threads.opt1
-rw-r--r--mysql-test/suite/wsrep/t/variables.test6
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover-step.inc41
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover.cnf9
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover.combinations4
-rw-r--r--mysql-test/suite/wsrep/t/wsrep-recover.test204
1564 files changed, 44824 insertions, 11644 deletions
diff --git a/mysql-test/include/add_anonymous_users.inc b/mysql-test/include/add_anonymous_users.inc
index 635a80e3dee..86ce529d1e2 100644
--- a/mysql-test/include/add_anonymous_users.inc
+++ b/mysql-test/include/add_anonymous_users.inc
@@ -1,7 +1,7 @@
# Allow anonymous users to connect
disable_warnings;
disable_query_log;
-INSERT IGNORE INTO mysql.user (host, user) VALUES ('localhost','');
+INSERT IGNORE INTO mysql.global_priv (host, user) VALUES ('localhost','');
FLUSH PRIVILEGES;
enable_query_log;
enable_warnings;
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test
index a9c8e13fa7c..39aa3d49d68 100644
--- a/mysql-test/include/check-testcase.test
+++ b/mysql-test/include/check-testcase.test
@@ -103,5 +103,56 @@ cat_file $datadir.tempfiles.txt;
remove_file $datadir.tempfiles.txt;
list_files $datadir/mysql #sql*;
+#
+# Check that SHOW ENGINE INNODB STATUS does not show any active transactions
+# We do this only if wsrep provider is loaded, to avoid disturbing any non-Galera MTR tests
+#
+if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) {
+ if (`SELECT @@wsrep_on`) {
+ if (`SELECT COUNT(*) FROM information_schema.innodb_trx WHERE trx_mysql_thread_id != 0`) {
+ if ($before) {
+ --echo Before test start.
+ }
+ if (!$before) {
+ --echo After test end.
+ }
+ --echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics.
+
+ --let $status_locks = `SELECT @@innodb_status_output_locks`
+ --let $status_output = `SELECT @@innodb_status_output`
+ --enable_query_log
+ SET GLOBAL innodb_status_output_locks=ON;
+ SHOW ENGINE INNODB STATUS;
+ --disable_query_log
+ --eval SET GLOBAL innodb_status_output_locks=$status_locks;
+ --eval SET GLOBAL innodb_status_output=$status_output;
+ --enable_query_log
+
+ --vertical_results
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.processlist;
+
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.innodb_trx;
+
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.innodb_locks;
+
+ if ($before) {
+ --replace_regex /$/ /
+ }
+ SELECT * FROM information_schema.innodb_lock_waits;
+ --horizontal_results
+ --disable_query_log
+ }
+ }
+}
+
--enable_query_log
diff --git a/mysql-test/include/check_ftwrl_incompatible.inc b/mysql-test/include/check_ftwrl_incompatible.inc
index 4787a69ea9c..a7e87c3750b 100644
--- a/mysql-test/include/check_ftwrl_incompatible.inc
+++ b/mysql-test/include/check_ftwrl_incompatible.inc
@@ -68,8 +68,7 @@ connection $con_aux1;
--enable_query_log
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where (state = "Waiting for global read lock" or
- state = "Waiting for commit lock") and
+ where state = "Waiting for backup lock" and
info = "$statement";
--source include/wait_condition.inc
--disable_result_log
@@ -116,8 +115,7 @@ connection $con_aux2;
--enable_query_log
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where (state = "Waiting for global read lock" or
- state = "Waiting for commit lock") and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
--disable_result_log
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 69a2b58288b..edae06ee7be 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -107,6 +107,7 @@ loose-performance-schema-consumer-thread-instrumentation=ON
binlog-direct-non-transactional-updates
default-storage-engine=myisam
+use_stat_tables=preferably
loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
diff --git a/mysql-test/include/galera_cluster.inc b/mysql-test/include/galera_cluster.inc
index c1834c3c26f..7f76ea59c7f 100644
--- a/mysql-test/include/galera_cluster.inc
+++ b/mysql-test/include/galera_cluster.inc
@@ -8,5 +8,11 @@
--let $galera_cluster_size = 2
--source include/galera_init.inc
+--source include/have_innodb.inc
+--source include/galera_wait_ready.inc
+--connection node_2
+--source include/galera_wait_ready.inc
--source include/have_innodb.inc
+
+--connection node_1
diff --git a/mysql-test/suite/galera/include/galera_have_debug_sync.inc b/mysql-test/include/galera_have_debug_sync.inc
index 7c0156052d8..7c0156052d8 100644
--- a/mysql-test/suite/galera/include/galera_have_debug_sync.inc
+++ b/mysql-test/include/galera_have_debug_sync.inc
diff --git a/mysql-test/include/galera_wait_sync_point.inc b/mysql-test/include/galera_wait_sync_point.inc
index cf3a4980186..c0951b220b4 100644
--- a/mysql-test/include/galera_wait_sync_point.inc
+++ b/mysql-test/include/galera_wait_sync_point.inc
@@ -1,6 +1,17 @@
--let $wait_timeout = 10
--let $wsrep_on_orig = `SELECT @@wsrep_on`
SET SESSION wsrep_on = 0;
+
+#
+# following is only for debugging purposes
+# should be commented out when test wporks as planned
+#
+#--sleep 1
+# SHOW PROCESSLIST;
+#SHOW STATUS LIKE 'wsrep_%';
+#--echo $galera_sync_point
+
--let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = '$galera_sync_point'
--source include/wait_condition.inc
--eval SET SESSION wsrep_on = $wsrep_on_orig
+
diff --git a/mysql-test/include/have_aria_used_for_temp_tables.inc b/mysql-test/include/have_aria_used_for_temp_tables.inc
new file mode 100644
index 00000000000..c921ba91d22
--- /dev/null
+++ b/mysql-test/include/have_aria_used_for_temp_tables.inc
@@ -0,0 +1,4 @@
+if (!`SELECT @@aria_used_for_temp_tables`)
+{
+ skip Need Aria to be used for temporary tables;
+}
diff --git a/mysql-test/include/have_auth_named_pipe.inc b/mysql-test/include/have_auth_named_pipe.inc
new file mode 100644
index 00000000000..4f4bf37f11e
--- /dev/null
+++ b/mysql-test/include/have_auth_named_pipe.inc
@@ -0,0 +1,13 @@
+--source include/not_embedded.inc
+
+if (!$AUTH_NAMED_PIPE_SO) {
+ skip No auth_named_pipe plugin;
+}
+
+if (!$USERNAME) {
+ skip USER variable is undefined;
+}
+
+if (`SELECT count(*) <> 0 FROM mysql.user WHERE user = '$USERNAME'`) {
+ skip %USERNAME%=$USER which exists in mysql.user;
+}
diff --git a/mysql-test/include/have_openssl.inc b/mysql-test/include/have_openssl.inc
index c9260123f9d..ee51ee4527a 100644
--- a/mysql-test/include/have_openssl.inc
+++ b/mysql-test/include/have_openssl.inc
@@ -1,7 +1,4 @@
--- source include/have_ssl_communication.inc
-let $crllen=`select length(trim(coalesce(@@ssl_crl, ''))) + length(trim(coalesce(@@ssl_crlpath, '')))`;
-if (!$crllen)
-{
+if (`SELECT count(*) = 0 FROM information_schema.GLOBAL_VARIABLES WHERE
+ VARIABLE_NAME = 'have_openssl' AND VARIABLE_VALUE = 'YES'`){
skip Needs OpenSSL;
}
-
diff --git a/mysql-test/include/have_wsrep_enabled.inc b/mysql-test/include/have_wsrep_enabled.inc
index 9287369c87c..7eb8b4372cf 100644
--- a/mysql-test/include/have_wsrep_enabled.inc
+++ b/mysql-test/include/have_wsrep_enabled.inc
@@ -1,7 +1,6 @@
# To be used in a test which requires wsrep plugin to be ACTIVE and enabled
# (i.e. wsrep_on=ON). It includes have_wsrep.inc.
---source include/have_wsrep.inc
--source include/have_innodb.inc
if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_on' AND VARIABLE_VALUE='ON'`)
diff --git a/mysql-test/include/innodb_encrypt_tables.combinations b/mysql-test/include/innodb_encrypt_tables.combinations
new file mode 100644
index 00000000000..4ca9b672119
--- /dev/null
+++ b/mysql-test/include/innodb_encrypt_tables.combinations
@@ -0,0 +1,14 @@
+[crypt]
+innodb_encrypt_tables=ON
+plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+loose-file-key-management
+loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
+file-key-management-encryption-algorithm=aes_cbc
+
+[clear]
+innodb_encrypt_tables=OFF
+plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+loose-file-key-management
+loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
+file-key-management-encryption-algorithm=aes_cbc
+
diff --git a/mysql-test/include/innodb_encrypt_tables.inc b/mysql-test/include/innodb_encrypt_tables.inc
new file mode 100644
index 00000000000..31ab7999aef
--- /dev/null
+++ b/mysql-test/include/innodb_encrypt_tables.inc
@@ -0,0 +1,4 @@
+# The goal of including this file is to enable innodb_encrypt_tables combinations
+# (see include/innodb_encrypt_tables.combinations)
+
+--source include/have_innodb.inc
diff --git a/mysql-test/include/kill_galera.inc b/mysql-test/include/kill_galera.inc
new file mode 100644
index 00000000000..d7f665df6c7
--- /dev/null
+++ b/mysql-test/include/kill_galera.inc
@@ -0,0 +1,20 @@
+--echo Killing server ...
+
+# Write file to make mysql-test-run.pl expect the crash, but don't start it
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+--exec echo "wait" > $_expect_file_name
+
+# Kill the connected server
+--disable_reconnect
+--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
+
+--perl
+ my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
+ my $mysqld_pid = `cat $pid_filename`;
+ chomp($mysqld_pid);
+ system("kill -9 $mysqld_pid");
+ exit(0);
+EOF
+
+--source include/wait_until_disconnected.inc
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql
index 8548200f437..b5673b2a313 100644
--- a/mysql-test/include/mtr_check.sql
+++ b/mysql-test/include/mtr_check.sql
@@ -95,7 +95,7 @@ BEGIN
mysql.time_zone_name,
mysql.time_zone_transition,
mysql.time_zone_transition_type,
- mysql.user;
+ mysql.global_priv;
-- verify that no plugin changed its disabled/enabled state
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
diff --git a/mysql-test/include/switch_to_mysql_global_priv.inc b/mysql-test/include/switch_to_mysql_global_priv.inc
new file mode 100644
index 00000000000..78df6642760
--- /dev/null
+++ b/mysql-test/include/switch_to_mysql_global_priv.inc
@@ -0,0 +1,6 @@
+disable_query_log;
+drop table mysql.user;
+rename table mysql.user_bak to mysql.user;
+rename table mysql.global_priv_bak to mysql.global_priv;
+flush privileges;
+enable_query_log;
diff --git a/mysql-test/include/switch_to_mysql_user.inc b/mysql-test/include/switch_to_mysql_user.inc
new file mode 100644
index 00000000000..f5801db6114
--- /dev/null
+++ b/mysql-test/include/switch_to_mysql_user.inc
@@ -0,0 +1,56 @@
+disable_query_log;
+rename table mysql.user to mysql.user_bak;
+CREATE TABLE mysql.user (
+ Host char(60) binary DEFAULT '' NOT NULL,
+ User char(80) binary DEFAULT '' NOT NULL,
+ Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL,
+ Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ Delete_history_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ ssl_type enum('','ANY','X509','SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ ssl_cipher BLOB NOT NULL,
+ x509_issuer BLOB NOT NULL,
+ x509_subject BLOB NOT NULL,
+ max_questions int(11) unsigned DEFAULT 0 NOT NULL,
+ max_updates int(11) unsigned DEFAULT 0 NOT NULL,
+ max_connections int(11) unsigned DEFAULT 0 NOT NULL,
+ max_user_connections int(11) DEFAULT 0 NOT NULL,
+ plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
+ authentication_string TEXT NOT NULL,
+ password_expired ENUM('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ is_role enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
+ default_role char(80) binary DEFAULT '' NOT NULL,
+ max_statement_time decimal(12,6) DEFAULT 0 NOT NULL,
+ PRIMARY KEY Host (Host,User)
+) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+insert mysql.user select * from mysql.user_bak;
+rename table mysql.global_priv to mysql.global_priv_bak;
+flush privileges;
+enable_query_log;
diff --git a/mysql-test/include/system_db_struct.inc b/mysql-test/include/system_db_struct.inc
index 7dd7746459e..d043d209850 100644
--- a/mysql-test/include/system_db_struct.inc
+++ b/mysql-test/include/system_db_struct.inc
@@ -7,6 +7,7 @@ show tables;
show create table db;
show create table user;
show create table func;
+show create table global_priv;
show create table tables_priv;
show create table columns_priv;
show create table procs_priv;
diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc
index 26168d10558..15a1e5bf847 100644
--- a/mysql-test/include/wait_until_connected_again.inc
+++ b/mysql-test/include/wait_until_connected_again.inc
@@ -11,7 +11,7 @@ let $counter= 5000;
let $mysql_errno= 9999;
while ($mysql_errno)
{
- --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
+ --error 0,ER_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
show status;
dec $counter;
@@ -19,13 +19,18 @@ while ($mysql_errno)
{
--die Server failed to restart
}
+ if (!$mysql_errno)
+ {
+ # WSREP: SHOW STATUS queries are allowed even if wsrep
+ # is not ready. Make sure wsrep is ready before
+ # returning from this script
+ source include/wait_wsrep_ready.inc;
+ }
+ if ($mysql_errno == 1045)
+ {
+ let $mysql_errno=0;
+ }
--sleep 0.1
}
--enable_query_log
--enable_result_log
-
-# WSREP: SHOW STATUS queries are allowed even if wsrep
-# is not ready. Make sure wsrep is ready before
-# returning from this script
-
---source include/wait_wsrep_ready.inc
diff --git a/mysql-test/include/wsrep_wait_disconnect.inc b/mysql-test/include/wsrep_wait_disconnect.inc
new file mode 100644
index 00000000000..740fc0d9426
--- /dev/null
+++ b/mysql-test/include/wsrep_wait_disconnect.inc
@@ -0,0 +1,20 @@
+let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' AND VARIABLE_VALUE = 'OFF';
+# since this is called until AFTER provider disconnects,we need to allow
+# queries in non-prim
+#
+# We are also forced to use a hard-coded value for wsrep_sync_wait here because
+# we can not issue a SELECT query to obtain the original value and then restore
+# it
+disable_query_log;
+SET SESSION wsrep_sync_wait = 7;
+--let $restore_wsrep_on = `SHOW VARIABLES WHERE Variable_name = 'wsrep_on' AND Value = 'ON'`
+SET SESSION wsrep_on = OFF;
+
+--source include/wait_condition.inc
+
+if ($restore_wsrep_on != "")
+{
+ --eval SET SESSION wsrep_on = ON
+}
+SET SESSION wsrep_sync_wait = 15;
+enable_query_log;
diff --git a/mysql-test/lib/generate-ssl-certs.sh b/mysql-test/lib/generate-ssl-certs.sh
index 8f15ba9d521..0894be3a299 100755
--- a/mysql-test/lib/generate-ssl-certs.sh
+++ b/mysql-test/lib/generate-ssl-certs.sh
@@ -10,30 +10,49 @@ rm -rf demoCA
mkdir demoCA demoCA/newcerts
touch demoCA/index.txt
echo 01 > demoCA/serial
+echo 01 > demoCA/crlnumber
# CA certificate, self-signed
openssl req -x509 -newkey rsa:2048 -keyout cakey.pem -out cacert.pem -days 7300 -nodes -subj '/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB' -text
# server certificate signing request and private key. Note the very long subject (for MDEV-7859)
-openssl req -newkey rsa:1024 -keyout server-key.pem -out demoCA/server-req.pem -days 7300 -nodes -subj '/CN=localhost/C=FI/ST=state or province within country, in other certificates in this file it is the same as L/L=location, usually an address but often ambiguously used/OU=organizational unit name, a division name within an organization/O=organization name, typically a company name'
+openssl req -newkey rsa:2048 -keyout server-key.pem -out demoCA/server-req.pem -days 7300 -nodes -subj '/CN=localhost/C=FI/ST=state or province within country, in other certificates in this file it is the same as L/L=location, usually an address but often ambiguously used/OU=organizational unit name, a division name within an organization/O=organization name, typically a company name'
# convert the key to yassl compatible format
openssl rsa -in server-key.pem -out server-key.pem
# sign the server certificate with CA certificate
-openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server-cert.pem -infiles demoCA/server-req.pem
+openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server-cert.pem -in demoCA/server-req.pem
+# server certificate with different validity period (MDEV-7598)
+openssl req -newkey rsa:2048 -keyout server-new-key.pem -out demoCA/server-new-req.pem -days 7301 -nodes -subj '/CN=server-new/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
+openssl rsa -in server-new-key.pem -out server-new-key.pem
+openssl ca -keyfile cakey.pem -days 7301 -batch -cert cacert.pem -policy policy_anything -out server-new-cert.pem -in demoCA/server-new-req.pem
+
+# 8K cert
openssl req -newkey rsa:8192 -keyout server8k-key.pem -out demoCA/server8k-req.pem -days 7300 -nodes -subj '/CN=server8k/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl rsa -in server8k-key.pem -out server8k-key.pem
-openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server8k-cert.pem -infiles demoCA/server8k-req.pem
-
-openssl req -newkey rsa:1024 -keyout client-key.pem -out demoCA/client-req.pem -days 7300 -nodes -subj '/CN=client/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
-openssl rsa -in client-key.pem -out client-key.pem
-openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out client-cert.pem -infiles demoCA/client-req.pem
+openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server8k-cert.pem -in demoCA/server8k-req.pem
# with SubjectAltName, only for OpenSSL 1.0.2+
cat > demoCA/sanext.conf <<EOF
subjectAltName=DNS:localhost
EOF
-openssl req -newkey rsa:1024 -keyout serversan-key.pem -out demoCA/serversan-req.pem -days 7300 -nodes -subj '/CN=server/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
-openssl ca -keyfile cakey.pem -extfile demoCA/sanext.conf -days 7300 -batch -cert cacert.pem -policy policy_anything -out serversan-cert.pem -infiles demoCA/serversan-req.pem
+openssl req -newkey rsa:2048 -keyout serversan-key.pem -out demoCA/serversan-req.pem -days 7300 -nodes -subj '/CN=server/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
+openssl ca -keyfile cakey.pem -extfile demoCA/sanext.conf -days 7300 -batch -cert cacert.pem -policy policy_anything -out serversan-cert.pem -in demoCA/serversan-req.pem
+
+# client cert
+openssl req -newkey rsa:2048 -keyout client-key.pem -out demoCA/client-req.pem -days 7300 -nodes -subj '/CN=client/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
+openssl rsa -in client-key.pem -out client-key.pem
+openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out client-cert.pem -in demoCA/client-req.pem
+
+# generate crls
+openssl ca -revoke server-cert.pem -keyfile cakey.pem -batch -cert cacert.pem
+openssl ca -gencrl -keyfile cakey.pem -crldays 7300 -batch -cert cacert.pem -out server-cert.crl
+# we only want to have one certificate per CRL. Un-revoke server-cert.crl
+cp demoCA/index.txt.old demoCA/index.txt
+openssl ca -revoke client-cert.pem -keyfile cakey.pem -batch -cert cacert.pem
+openssl ca -gencrl -keyfile cakey.pem -crldays 7300 -batch -cert cacert.pem -out client-cert.crl
+
+rm -fv crldir/*
+cp -v client-cert.crl crldir/`openssl x509 -in client-cert.pem -noout -issuer_hash`.r0
rm -rf demoCA
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 61ce88f9a5a..3fe57987713 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -291,6 +291,7 @@ sub combinations_from_file($$)
@combs = ({ skip => $skip_combinations{$filename} });
} else {
return () if @::opt_combinations or not -f $filename;
+ return () if ::using_extern();
# Read combinations file in my.cnf format
mtr_verbose("Read combinations file $filename");
my $config= My::Config->new($filename);
diff --git a/mysql-test/main/1st.result b/mysql-test/main/1st.result
index 2d49726c5f6..c630be1d61c 100644
--- a/mysql-test/main/1st.result
+++ b/mysql-test/main/1st.result
@@ -13,6 +13,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result
index 49c42479516..92946b65e66 100644
--- a/mysql-test/main/alter_table.result
+++ b/mysql-test/main/alter_table.result
@@ -181,6 +181,7 @@ t1 0 a 2 b A 300 NULL NULL YES BTREE
t1 1 b 1 b A 100 NULL NULL YES BTREE
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -751,12 +752,12 @@ create table t1(f1 int);
alter table t1 add column f2 datetime not null, add column f21 date not null;
insert into t1 values(1,'2000-01-01','2000-01-01');
alter table t1 add column f3 datetime not null;
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'f3' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`f3` at row 1
alter table t1 add column f3 date not null;
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'f3' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`f3` at row 1
alter table t1 add column f4 datetime not null default '2002-02-02',
add column f41 date not null;
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'f41' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`f41` at row 1
alter table t1 add column f4 datetime not null default '2002-02-02',
add column f41 date not null default '2002-02-02';
select * from t1;
@@ -2469,3 +2470,24 @@ DROP TABLE t1;
#
# End of 10.2 tests
#
+#
+# MDEV-17778: Alter table leads to a truncation warning with ANALYZE command
+#
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=4;
+set @@use_stat_tables=PREFERABLY;
+create table t1 (a int)engine=InnoDB;
+insert into t1 values (1),(1),(2),(3);
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+alter table t1 change a b int;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+drop table t1;
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index dfa8e2e148b..829f4013cb3 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -2021,3 +2021,22 @@ DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-17778: Alter table leads to a truncation warning with ANALYZE command
+--echo #
+
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=4;
+set @@use_stat_tables=PREFERABLY;
+
+create table t1 (a int)engine=InnoDB;
+insert into t1 values (1),(1),(2),(3);
+
+analyze table t1;
+alter table t1 change a b int;
+analyze table t1;
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+drop table t1;
diff --git a/mysql-test/main/alter_table_errors.result b/mysql-test/main/alter_table_errors.result
index 020a30304d0..b26409e3d05 100644
--- a/mysql-test/main/alter_table_errors.result
+++ b/mysql-test/main/alter_table_errors.result
@@ -8,3 +8,22 @@ t CREATE TABLE `t` (
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t;
+create temporary table t1 (a int, v int as (a));
+alter table t1 change column a b int, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create temporary table t2 (a int, v int as (a));
+lock table t2 write;
+alter table t2 change column a b int, algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+show create table t2;
+Table Create Table
+t2 CREATE TEMPORARY TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/main/alter_table_errors.test b/mysql-test/main/alter_table_errors.test
index d9982ac26f4..8fa65b0f330 100644
--- a/mysql-test/main/alter_table_errors.test
+++ b/mysql-test/main/alter_table_errors.test
@@ -8,3 +8,14 @@ create table t (a int, v int as (a)) engine=innodb;
alter table t change column a b tinyint, algorithm=inplace;
show create table t;
drop table t;
+
+create temporary table t1 (a int, v int as (a));
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 change column a b int, algorithm=inplace;
+show create table t1;
+
+create temporary table t2 (a int, v int as (a));
+lock table t2 write;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t2 change column a b int, algorithm=inplace;
+show create table t2;
diff --git a/mysql-test/main/alter_user.result b/mysql-test/main/alter_user.result
index 68720b6d6c7..cc3c4a43ffe 100644
--- a/mysql-test/main/alter_user.result
+++ b/mysql-test/main/alter_user.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
select * from mysql.user where user = 'root' and host = 'localhost';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
localhost root Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0 N N 0.000000
@@ -51,15 +52,15 @@ Note 1396 Operation ALTER USER failed for 'boo'
alter user foo identified by 'something';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something2';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *9CD58369E930E28C8996A89DB18B63294E6DC10C N N 0.000000
+% foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *9CD58369E930E28C8996A89DB18B63294E6DC10C N N 0.000000
alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified with 'somecoolplugin';
ERROR HY000: Operation ALTER USER failed for 'foo'@'%'
show warnings;
@@ -73,21 +74,21 @@ Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv D
alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password 0123456789ABCDEF N N 0.000000
+% foo 0123456789ABCDEF N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password 0123456789ABCDEF N N 0.000000
# Test ssl related altering.
alter user foo identified by 'something' require SSL;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something' require X509;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
alter user foo identified by 'something'
require cipher 'text' issuer 'foo_issuer' subject 'foo_subject';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
# Test resource limits altering.
alter user foo with MAX_QUERIES_PER_HOUR 10
MAX_UPDATES_PER_HOUR 20
@@ -95,6 +96,6 @@ MAX_CONNECTIONS_PER_HOUR 30
MAX_USER_CONNECTIONS 40;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
+% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000
drop user foo;
-update mysql.user set plugin='';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/alter_user.test b/mysql-test/main/alter_user.test
index ef20f79a554..9ea98615272 100644
--- a/mysql-test/main/alter_user.test
+++ b/mysql-test/main/alter_user.test
@@ -1,5 +1,7 @@
--source include/not_embedded.inc
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
+
select * from mysql.user where user = 'root' and host = 'localhost';
--echo # Test syntax
--echo #
@@ -82,4 +84,4 @@ alter user foo with MAX_QUERIES_PER_HOUR 10
select * from mysql.user where user = 'foo';
drop user foo;
-update mysql.user set plugin='';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/analyze.result b/mysql-test/main/analyze.result
index 9dff94ab08c..dd785abcd42 100644
--- a/mysql-test/main/analyze.result
+++ b/mysql-test/main/analyze.result
@@ -3,6 +3,7 @@ lock tables t1 write;
insert into t1 values(0);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
unlock tables;
check table t1;
@@ -15,6 +16,7 @@ lock tables t1 write;
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
unlock tables;
check table t1;
@@ -25,6 +27,7 @@ create table t1 (a bigint);
insert into t1 values(0);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
check table t1;
Table Op Msg_type Msg_text
@@ -34,9 +37,13 @@ create table t1 (a mediumtext, fulltext key key1(a)) charset utf8 collate utf8_g
insert into t1 values ('hello');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'a'
test.t1 analyze status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'a'
test.t1 analyze status Table is already up to date
drop table t1;
CREATE TABLE t1 (a int);
diff --git a/mysql-test/main/auth_rpl.result b/mysql-test/main/auth_rpl.result
index a3da7985da1..56f5f5e8f2b 100644
--- a/mysql-test/main/auth_rpl.result
+++ b/mysql-test/main/auth_rpl.result
@@ -15,7 +15,7 @@ connection master;
connection slave;
# Slave in-sync with master now.
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
-user plugin authentication_string
+User plugin authentication_string
plug_user test_plugin_server plug_user
# Cleanup (on slave).
include/stop_slave.inc
diff --git a/mysql-test/main/backup_aria.result b/mysql-test/main/backup_aria.result
new file mode 100644
index 00000000000..d537711404f
--- /dev/null
+++ b/mysql-test/main/backup_aria.result
@@ -0,0 +1,158 @@
+connect con1,localhost,root,,;
+SET SESSION lock_wait_timeout = 1;
+#-----------------------------------------------------------------------
+# Single-threaded tests
+#-----------------------------------------------------------------------
+# Show the fate and impact of some SELECT /HANDLER ... READ
+# sliding through the sequence.
+CREATE TABLE t_permanent_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+INSERT INTO t_permanent_aria SET col1 = 1;
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t_permanent_aria;
+COUNT(*)
+1
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+col1
+1
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE END;
+# In case the backup lock is taken by the current connection than
+# - DML modifying some permanent table is not allowed
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+INSERT INTO t_permanent_aria SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+SET AUTOCOMMIT = 1;
+INSERT INTO t_permanent_aria SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+# - DDL creating or renaming a permanent table or a procedure is not
+# allowed.
+# The latter tries to modify a permanent system table.
+CREATE TABLE throw_away (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+RENAME TABLE t_permanent_aria To throw_away;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+# - DDL creating a temporary table is allowed.
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+# - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_aria SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_aria;
+COUNT(*)
+1
+BACKUP STAGE END;
+# Show the fate and impact of some auto committed INSERT into temporary
+# table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_aria;
+COUNT(*)
+5
+# Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+# through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE END;
+# Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_aria;
+ALTER TABLE t_temporary_aria ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_aria ADD KEY idx(col2);
+BACKUP STAGE END;
+DROP TABLE t_permanent_aria;
+#-----------------------------------------------------------------------
+# Show that non transactional tables locks with BACKUP STAGE FLUSH
+#-----------------------------------------------------------------------
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=0;
+insert into t1 values (1), (2);
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+select * from t1;
+a
+1
+2
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (3);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 values (4);
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+a
+1
+2
+4
+drop table t1;
+#-----------------------------------------------------------------------
+# Show that transactional tables doesn't lock with BACKUP STAGE FLUSH
+#-----------------------------------------------------------------------
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=1 page_checksum=1;
+insert into t1 values (1), (2);
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+INSERT INTO t1 values (4);
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+a
+1
+2
+4
+drop table t1;
+#
+# Cleanup
+#
+disconnect con1;
diff --git a/mysql-test/main/backup_aria.test b/mysql-test/main/backup_aria.test
new file mode 100644
index 00000000000..7b741b829a1
--- /dev/null
+++ b/mysql-test/main/backup_aria.test
@@ -0,0 +1,157 @@
+########################################################################
+# Tests for Implement LOCK FOR BACKUP (MDEV-5336)
+########################################################################
+# Check a non transactional table per ENGINE = Aria TRANSACTIONAL = 0.
+#
+
+--source include/not_embedded.inc
+# As non transactional engine we use Aria with TRANSACTIONAL = 0
+--source include/have_aria.inc
+
+# Following connections are used in a few of the following tests
+connect (con1,localhost,root,,);
+
+SET SESSION lock_wait_timeout = 1;
+
+--echo #-----------------------------------------------------------------------
+--echo # Single-threaded tests
+--echo #-----------------------------------------------------------------------
+
+--echo # Show the fate and impact of some SELECT /HANDLER ... READ
+--echo # sliding through the sequence.
+CREATE TABLE t_permanent_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+INSERT INTO t_permanent_aria SET col1 = 1;
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t_permanent_aria;
+HANDLER t_permanent_aria OPEN;
+HANDLER t_permanent_aria READ FIRST;
+HANDLER t_permanent_aria CLOSE;
+BACKUP STAGE END;
+
+--echo # In case the backup lock is taken by the current connection than
+--echo # - DML modifying some permanent table is not allowed
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t_permanent_aria SET col1 = 1;
+SET AUTOCOMMIT = 1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t_permanent_aria SET col1 = 1;
+
+--echo # - DDL creating or renaming a permanent table or a procedure is not
+--echo # allowed.
+--echo # The latter tries to modify a permanent system table.
+
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE TABLE throw_away (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+RENAME TABLE t_permanent_aria To throw_away;
+--echo # - DDL creating a temporary table is allowed.
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+--echo # - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_aria SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_aria;
+BACKUP STAGE END;
+
+--echo # Show the fate and impact of some auto committed INSERT into temporary
+--echo # table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_aria SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_aria;
+
+--echo # Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+--echo # through the sequence.
+
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_aria;
+CREATE TEMPORARY TABLE t_temporary_aria (col1 INT) ENGINE = Aria TRANSACTIONAL = 0;
+BACKUP STAGE END;
+--echo # Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_aria;
+ALTER TABLE t_temporary_aria ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_aria ADD KEY idx(col2);
+BACKUP STAGE END;
+
+DROP TABLE t_permanent_aria;
+
+--echo #-----------------------------------------------------------------------
+--echo # Show that non transactional tables locks with BACKUP STAGE FLUSH
+--echo #-----------------------------------------------------------------------
+
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=0;
+insert into t1 values (1), (2);
+
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+select * from t1;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (3);
+--send INSERT INTO t1 values (4)
+connection con1;
+backup stage end;
+connection default;
+--reap # send
+select * from t1;
+drop table t1;
+
+--echo #-----------------------------------------------------------------------
+--echo # Show that transactional tables doesn't lock with BACKUP STAGE FLUSH
+--echo #-----------------------------------------------------------------------
+
+set session lock_wait_timeout=default;
+create table t1 (a int) engine=aria transactional=1 page_checksum=1;
+insert into t1 values (1), (2);
+
+connection con1;
+backup stage start;
+backup stage flush;
+connection default;
+INSERT INTO t1 values (4);
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+drop table t1;
+
+--echo #
+--echo # Cleanup
+--echo #
+
+disconnect con1;
diff --git a/mysql-test/main/backup_interaction.result b/mysql-test/main/backup_interaction.result
new file mode 100644
index 00000000000..20ba8fa0811
--- /dev/null
+++ b/mysql-test/main/backup_interaction.result
@@ -0,0 +1,520 @@
+#
+# Check backup and FTWRL
+#
+flush tables with read lock;
+backup stage start;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+backup stage start;
+flush tables with read lock;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+backup stage end;
+#
+# Check backup and FLUSH TABLES
+#
+flush tables;
+backup stage start;
+flush tables;
+backup stage end;
+#
+# Check BACKUP STAGE under lock tables
+#
+create table t1 (a int);
+lock table t1 write;
+backup stage start;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+unlock tables;
+lock table t1 read;
+backup stage start;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+unlock tables;
+#
+# Check lock tables under BACKUP STAGE
+#
+backup stage start;
+unlock tables;
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_BACKUP_START
+lock table t1 write;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+lock table t1 read;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+unlock tables;
+backup stage end;
+drop table t1;
+#
+# Check setting readonly under BACKUP STAGE
+#
+backup stage start;
+set @@global.read_only=1;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+# also make sure going back from read-only mode is not allowed
+set @@global.read_only=1;
+backup stage start;
+set @@global.read_only=0;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+backup stage end;
+set @@global.read_only=0;
+#
+# Check BACKUP STAGE under read_only
+#
+set @@global.read_only=1;
+backup stage start;
+backup stage end;
+set @@global.read_only=0;
+#
+# Check that we can't create tables during backup
+#
+backup stage start;
+create table t1 (a int);
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+backup stage end;
+# also make sure we can't write to a table during backup
+create table t1(a INT);
+backup stage start;
+insert into t1 values(1);
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+insert delayed into t1 values(1);
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+update t1 set a=1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+delete from t1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+truncate table t1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+drop table t1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+backup stage end;
+drop table t1;
+#
+# BACKUP STAGE performs implicit commits
+#
+create table t1(a int) engine=InnoDB;
+begin;
+insert into t1 values(1);
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_SHARED_WRITE
+backup stage start;
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_BACKUP_START
+backup stage block_commit;
+commit;
+backup stage end;
+drop table t1;
+# Ensure that BACKUP STAGE ... does AUTOCOMMIT like most DDL.
+# Sideeffect:
+# Show the impact of not yet committed INSERT before sequence start
+# and ROLLBACK sliding through the sequence.
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+ROLLBACK;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+ROLLBACK;
+SELECT COUNT(*) = 5 AS expect_1 FROM t1;
+expect_1
+1
+# Show the impact of not yet committed INSERT before sequence start
+# and a COMMIT sliding through the sequence.
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+COMMIT;
+BACKUP STAGE END;
+#----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+COMMIT;
+SELECT COUNT(*) = 10 AS expect_1 FROM t1;
+expect_1
+1
+DELETE FROM t1;
+COMMIT;
+drop table t1;
+#
+# CHECK: RO transaction under BACKUP STAGE is a potential deadlock
+# OTOH we most probably allow them under FTWRL as well
+#
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+insert into t1 values (1);
+backup stage start;
+backup stage block_commit;
+begin;
+select * from t1;
+col1
+1
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+MDL_BACKUP_WAIT_COMMIT
+MDL_SHARED_READ
+backup stage end;
+select lock_mode from information_schema.metadata_lock_info;
+lock_mode
+drop table t1;
+#
+# Check that handler are closed by backup stage block_ddl
+#
+create table t1 (a int, key a (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+handler t1 open;
+handler t1 read a prev;
+a
+5
+backup stage start;
+handler t1 read a prev;
+a
+4
+backup stage flush;
+backup stage block_ddl;
+handler t1 read a prev;
+a
+5
+backup stage block_commit;
+handler t1 read a prev;
+a
+4
+backup stage end;
+handler t1 close;
+drop table t1;
+# Show the fate and impact of some SELECT /HANDLER ... READ
+# sliding through the sequence.
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t1_innodb values (1),(2),(3);
+COMMIT;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t1_myisam values (1),(2),(3);
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+SELECT * FROM t1_innodb;
+col1
+1
+2
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t1_innodb;
+COUNT(*)
+3
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+col1
+1
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+COUNT(*)
+3
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+col1
+1
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE END;
+drop table t1_innodb,t1_myisam;
+# Show the fate and impact of some SET GLOBAL tx_read_only = 1/0
+# sliding through the sequence.
+BACKUP STAGE START;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE FLUSH;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_DDL;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE END;
+# Show the fate and impact of some SET SESSION sql_log_bin = 0/1
+# sliding through the sequence.
+COMMIT;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE END;
+#----
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE END;
+SET SESSION sql_log_bin = 1;
+#-----------------------------------------------------------------------
+# BACKUP STAGE statements are not allowed in stored routines
+#-----------------------------------------------------------------------
+CREATE TABLE t1 (col1 INT);
+CREATE PROCEDURE p1()
+BEGIN
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+END|
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
+CREATE FUNCTION f1 (s CHAR(20)) RETURNS INT DETERMINISTIC
+BEGIN
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+RETURN 1;
+END|
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+END|
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
+DROP TABLE t1;
+#-----------------------------------------------------------------------
+# Check BACKUP status variables
+#-----------------------------------------------------------------------
+SET SESSION lock_wait_timeout = 1;
+FLUSH STATUS;
+# Show how the status variable 'Com_backup' changes after BACKUP STAGE ..
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 0
+BACKUP STAGE START;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 1
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'START'
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 2
+BACKUP STAGE FLUSH;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 3
+BACKUP STAGE BLOCK_DDL;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 4
+BACKUP STAGE BLOCK_COMMIT;
+SHOW STATUS LIKE 'Com_backup';
+Variable_name Value
+Com_backup 5
+BACKUP STAGE END;
+# In case the backup lock is taken by the current connection than
+# - DML modifying some permanent table is not allowed
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1_innodb SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+SET AUTOCOMMIT = 1;
+INSERT INTO t1_innodb SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+INSERT INTO t1_myisam SET col1 = 1;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+# - DDL creating or renaming a permanent table or a procedure etc.
+# is not allowed.
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+RENAME TABLE t1_innodb To throw_away;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+CREATE PROCEDURE p1() SELECT 13;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+CREATE PROCEDURE p1() SELECT 13;
+ERROR HY000: Can't execute the command as you have a BACKUP STAGE active
+BACKUP STAGE END;
+DROP TABLE t1_innodb;
+DROP TABLE t1_myisam;
+#
+# Creating and modifying TEMPORARY TABLES are allowed
+#
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+CREATE TEMPORARY TABLE tmp (col1 INT);
+DROP TEMPORARY TABLE tmp;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TEMPORARY TABLE t_temporary_myisam (col1 INT) ENGINE = MyISAM;
+# - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_innodb SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_innodb;
+COUNT(*)
+1
+INSERT INTO t_temporary_myisam SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_myisam;
+COUNT(*)
+1
+BACKUP STAGE END;
+# Show the fate and impact of some auto committed INSERT into temporary
+# table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_innodb;
+COUNT(*)
+5
+# Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+# through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE END;
+# Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_innodb;
+ALTER TABLE t_temporary_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_innodb ADD KEY idx(col2);
+BACKUP STAGE END;
diff --git a/mysql-test/main/backup_interaction.test b/mysql-test/main/backup_interaction.test
new file mode 100644
index 00000000000..f5362417c98
--- /dev/null
+++ b/mysql-test/main/backup_interaction.test
@@ -0,0 +1,503 @@
+########################################################################
+# Tests how BACKUP STAGE interacts with other commands (MDEV-5336)
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+
+--echo #
+--echo # Check backup and FTWRL
+--echo #
+
+flush tables with read lock;
+--error ER_CANT_UPDATE_WITH_READLOCK
+backup stage start;
+unlock tables;
+backup stage start;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+flush tables with read lock;
+backup stage end;
+
+--echo #
+--echo # Check backup and FLUSH TABLES
+--echo #
+
+flush tables;
+backup stage start;
+flush tables;
+backup stage end;
+
+--echo #
+--echo # Check BACKUP STAGE under lock tables
+--echo #
+
+create table t1 (a int);
+lock table t1 write;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+backup stage start;
+--error ER_BACKUP_NOT_RUNNING
+backup stage end;
+unlock tables;
+
+lock table t1 read;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+backup stage start;
+--error ER_BACKUP_NOT_RUNNING
+backup stage end;
+unlock tables;
+
+
+--echo #
+--echo # Check lock tables under BACKUP STAGE
+--echo #
+backup stage start;
+unlock tables;
+select lock_mode from information_schema.metadata_lock_info;
+
+--error ER_BACKUP_LOCK_IS_ACTIVE
+lock table t1 write;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+lock table t1 read;
+unlock tables;
+backup stage end;
+drop table t1;
+
+
+--echo #
+--echo # Check setting readonly under BACKUP STAGE
+--echo #
+backup stage start;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+set @@global.read_only=1;
+backup stage end;
+
+--echo # also make sure going back from read-only mode is not allowed
+set @@global.read_only=1;
+backup stage start;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+set @@global.read_only=0;
+backup stage end;
+set @@global.read_only=0;
+
+--echo #
+--echo # Check BACKUP STAGE under read_only
+--echo #
+
+set @@global.read_only=1;
+backup stage start;
+backup stage end;
+set @@global.read_only=0;
+
+--echo #
+--echo # Check that we can't create tables during backup
+--echo #
+
+backup stage start;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+create table t1 (a int);
+backup stage end;
+
+--echo # also make sure we can't write to a table during backup
+create table t1(a INT);
+backup stage start;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+insert into t1 values(1);
+--error ER_BACKUP_LOCK_IS_ACTIVE
+insert delayed into t1 values(1);
+--error ER_BACKUP_LOCK_IS_ACTIVE
+update t1 set a=1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+delete from t1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+truncate table t1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+drop table t1;
+backup stage end;
+drop table t1;
+
+--echo #
+--echo # BACKUP STAGE performs implicit commits
+--echo #
+create table t1(a int) engine=InnoDB;
+begin;
+insert into t1 values(1);
+select lock_mode from information_schema.metadata_lock_info;
+backup stage start;
+select lock_mode from information_schema.metadata_lock_info;
+backup stage block_commit;
+commit;
+backup stage end;
+drop table t1;
+
+--echo # Ensure that BACKUP STAGE ... does AUTOCOMMIT like most DDL.
+--echo # Sideeffect:
+--echo # Show the impact of not yet committed INSERT before sequence start
+--echo # and ROLLBACK sliding through the sequence.
+
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+ROLLBACK;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+ROLLBACK;
+SELECT COUNT(*) = 5 AS expect_1 FROM t1;
+
+--echo # Show the impact of not yet committed INSERT before sequence start
+--echo # and a COMMIT sliding through the sequence.
+
+SET AUTOCOMMIT = 0;
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+COMMIT;
+BACKUP STAGE END;
+--echo #----
+INSERT INTO t1 SET col1 = 1;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+COMMIT;
+SELECT COUNT(*) = 10 AS expect_1 FROM t1;
+DELETE FROM t1;
+COMMIT;
+drop table t1;
+
+--echo #
+--echo # CHECK: RO transaction under BACKUP STAGE is a potential deadlock
+--echo # OTOH we most probably allow them under FTWRL as well
+--echo #
+
+CREATE TABLE t1 (col1 INT) ENGINE = InnoDB;
+insert into t1 values (1);
+backup stage start;
+backup stage block_commit;
+begin;
+select * from t1;
+select lock_mode from information_schema.metadata_lock_info;
+backup stage end;
+select lock_mode from information_schema.metadata_lock_info;
+drop table t1;
+
+--echo #
+--echo # Check that handler are closed by backup stage block_ddl
+--echo #
+
+create table t1 (a int, key a (a));
+insert into t1 (a) values (1), (2), (3), (4), (5);
+handler t1 open;
+handler t1 read a prev;
+backup stage start;
+handler t1 read a prev;
+backup stage flush;
+backup stage block_ddl;
+handler t1 read a prev;
+backup stage block_commit;
+handler t1 read a prev;
+backup stage end;
+handler t1 close;
+drop table t1;
+
+--echo # Show the fate and impact of some SELECT /HANDLER ... READ
+--echo # sliding through the sequence.
+
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t1_innodb values (1),(2),(3);
+COMMIT;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t1_myisam values (1),(2),(3);
+BACKUP STAGE START;
+SELECT COUNT(*) FROM t1_innodb;
+SELECT * FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE FLUSH;
+SELECT COUNT(*) FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_DDL;
+SELECT COUNT(*) FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT COUNT(*) FROM t1_innodb;
+HANDLER t1_innodb OPEN;
+HANDLER t1_innodb READ FIRST;
+HANDLER t1_innodb CLOSE;
+SELECT COUNT(*) FROM t1_myisam;
+HANDLER t1_myisam OPEN;
+HANDLER t1_myisam READ FIRST;
+HANDLER t1_myisam CLOSE;
+BACKUP STAGE END;
+drop table t1_innodb,t1_myisam;
+
+--echo # Show the fate and impact of some SET GLOBAL tx_read_only = 1/0
+--echo # sliding through the sequence.
+
+BACKUP STAGE START;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE FLUSH;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_DDL;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+BACKUP STAGE END;
+
+--echo # Show the fate and impact of some SET SESSION sql_log_bin = 0/1
+--echo # sliding through the sequence.
+COMMIT;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 0;
+SET SESSION sql_log_bin = 1;
+BACKUP STAGE END;
+
+--echo #----
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE START;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE FLUSH;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_DDL;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE BLOCK_COMMIT;
+SET SESSION sql_log_bin = 1;
+SET SESSION sql_log_bin = 0;
+BACKUP STAGE END;
+SET SESSION sql_log_bin = 1;
+
+--echo #-----------------------------------------------------------------------
+--echo # BACKUP STAGE statements are not allowed in stored routines
+--echo #-----------------------------------------------------------------------
+
+CREATE TABLE t1 (col1 INT);
+
+delimiter |;
+--error ER_SP_BADSTATEMENT
+CREATE PROCEDURE p1()
+BEGIN
+ BACKUP STAGE START;
+ BACKUP STAGE FLUSH;
+ BACKUP STAGE BLOCK_DDL;
+ BACKUP STAGE BLOCK_COMMIT;
+ BACKUP STAGE END;
+END|
+
+--error ER_SP_BADSTATEMENT
+CREATE FUNCTION f1 (s CHAR(20)) RETURNS INT DETERMINISTIC
+BEGIN
+ BACKUP STAGE START;
+ BACKUP STAGE FLUSH;
+ BACKUP STAGE BLOCK_DDL;
+ BACKUP STAGE BLOCK_COMMIT;
+ BACKUP STAGE END;
+ RETURN 1;
+END|
+
+--error ER_SP_BADSTATEMENT
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW
+BEGIN
+ BACKUP STAGE START;
+ BACKUP STAGE FLUSH;
+ BACKUP STAGE BLOCK_DDL;
+ BACKUP STAGE BLOCK_COMMIT;
+ BACKUP STAGE END;
+END|
+
+delimiter ;|
+DROP TABLE t1;
+
+--echo #-----------------------------------------------------------------------
+--echo # Check BACKUP status variables
+--echo #-----------------------------------------------------------------------
+
+SET SESSION lock_wait_timeout = 1;
+
+FLUSH STATUS;
+
+# MDEV-5336 introduces the status variable Com_backup
+--echo # Show how the status variable 'Com_backup' changes after BACKUP STAGE ..
+
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE START;
+SHOW STATUS LIKE 'Com_backup';
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE FLUSH;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE BLOCK_DDL;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE BLOCK_COMMIT;
+SHOW STATUS LIKE 'Com_backup';
+BACKUP STAGE END;
+
+--echo # In case the backup lock is taken by the current connection than
+--echo # - DML modifying some permanent table is not allowed
+
+CREATE TABLE t1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t1_myisam (col1 INT) ENGINE = MyISAM;
+
+BACKUP STAGE START;
+SET AUTOCOMMIT = 0;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t1_innodb SET col1 = 1;
+SET AUTOCOMMIT = 1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t1_innodb SET col1 = 1;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+INSERT INTO t1_myisam SET col1 = 1;
+--echo # - DDL creating or renaming a permanent table or a procedure etc.
+--echo # is not allowed.
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+RENAME TABLE t1_innodb To throw_away;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE PROCEDURE p1() SELECT 13;
+--error ER_BACKUP_LOCK_IS_ACTIVE
+CREATE PROCEDURE p1() SELECT 13;
+BACKUP STAGE END;
+DROP TABLE t1_innodb;
+DROP TABLE t1_myisam;
+
+--echo #
+--echo # Creating and modifying TEMPORARY TABLES are allowed
+--echo #
+
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+CREATE TEMPORARY TABLE tmp (col1 INT);
+DROP TEMPORARY TABLE tmp;
+
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TEMPORARY TABLE t_temporary_myisam (col1 INT) ENGINE = MyISAM;
+--echo # - DML modifying that temporary table is allowed.
+INSERT INTO t_temporary_innodb SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_innodb;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+SELECT COUNT(*) FROM t_temporary_myisam;
+BACKUP STAGE END;
+
+--echo # Show the fate and impact of some auto committed INSERT into temporary
+--echo # table sliding through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE FLUSH;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_DDL;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE BLOCK_COMMIT;
+INSERT INTO t_temporary_innodb SET col1 = 1;
+INSERT INTO t_temporary_myisam SET col1 = 1;
+BACKUP STAGE END;
+SELECT COUNT(*) FROM t_temporary_innodb;
+
+--echo # Show the fate and impact of some DROP/CREATE TEMPORARY TABLE sliding
+--echo # through the sequence.
+SET AUTOCOMMIT = 1;
+BACKUP STAGE START;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE FLUSH;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_DDL;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE BLOCK_COMMIT;
+DROP TEMPORARY TABLE t_temporary_innodb;
+CREATE TEMPORARY TABLE t_temporary_innodb (col1 INT) ENGINE = InnoDB;
+BACKUP STAGE END;
+--echo # Show that even more DDL on the temporary table is allowed.
+BACKUP STAGE START;
+TRUNCATE t_temporary_innodb;
+ALTER TABLE t_temporary_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_temporary_innodb ADD KEY idx(col2);
+BACKUP STAGE END;
diff --git a/mysql-test/main/backup_lock.result b/mysql-test/main/backup_lock.result
new file mode 100644
index 00000000000..95b2f520d90
--- /dev/null
+++ b/mysql-test/main/backup_lock.result
@@ -0,0 +1,219 @@
+#
+# Testing which locks we get from all stages
+#
+BACKUP STAGE START;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_START Backup lock
+BACKUP STAGE FLUSH;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FLUSH Backup lock
+BACKUP STAGE BLOCK_DDL;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_DDL Backup lock
+BACKUP STAGE BLOCK_COMMIT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_COMMIT Backup lock
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+#
+# testing BACKUP STAGE LOCK's
+#
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
+connection default;
+#
+# testing if BACKUP STAGE FLUSH causes deadlocks with ALTER TABLE
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+alter table t1 add column (j int), algorithm copy;
+connection con2;
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_BACKUP_FLUSH Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_UPGRADABLE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+SET STATEMENT max_statement_time=1 FOR backup stage block_ddl;
+ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
+backup stage block_ddl;
+connection default;
+commit;
+SELECT * FROM t1;
+a
+1
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 values (2,0);;
+connection con2;
+backup stage end;
+connection con1;
+connection default;
+select * from t1;
+a j
+1 NULL
+2 0
+drop table t1;
+# Test with inline alter table, which doesn't block block_commit
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+alter table t1 add column (j int);
+connection con2;
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_ALTER_COPY Backup lock
+MDL_BACKUP_FLUSH Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_UPGRADABLE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+backup stage block_ddl;
+backup stage block_commit;
+connection default;
+SELECT * FROM t1;
+a
+1
+commit;
+connection con2;
+backup stage end;
+connection con1;
+connection default;
+drop table t1;
+#
+# testing if BACKUP STAGE FLUSH causes deadlocks with DROP TABLE
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t1;
+connection con2;
+backup stage start;
+backup stage flush;
+SET STATEMENT lock_wait_timeout=0 FOR SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+backup stage block_ddl;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_DDL Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+backup stage end;
+connection default;
+commit;
+connection con1;
+connection default;
+#
+# Check if backup stage block_dll + concurrent drop table blocks select
+#
+create table t1 (a int) engine=innodb;
+backup stage start;
+backup stage block_ddl;
+connection con1;
+DROP TABLE t1;
+connection con2;
+connection con2;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_WAIT_DDL Backup lock
+SELECT * FROM t1;
+a
+connection default;
+backup stage end;
+connection con1;
+connection default;
+#
+# Check if backup stage block_dll overrides ddl lock for drop table
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t1;
+connection con2;
+backup stage start;
+backup stage flush;
+backup stage block_ddl;
+connection default;
+commit;
+connection con2;
+backup stage end;
+connection con1;
+connection default;
+#
+# Check if BACKUP STAGE BLOCK_COMMIT blocks commit
+#
+create table t1 (a int) engine=innodb;
+start transaction;
+insert into t1 values (1);
+connection con1;
+backup stage start;
+backup stage block_commit;
+connection default;
+commit;
+connection con1;
+backup stage end;
+connection default;
+select * from t1;
+a
+1
+drop table t1;
+disconnect con1;
+disconnect con2;
+#
+# Test backup stage and flush tables
+#
+BACKUP STAGE START ;
+BACKUP STAGE BLOCK_DDL ;
+FLUSH TABLES;
+CREATE TEMPORARY TABLE t12345678_tmp (col1 INT);
+drop table t12345678_tmp;
+BACKUP STAGE END;
+#
+# Test BACKUP STAGES with lock timeouts
+#
+SET GLOBAL lock_wait_timeout=0;
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+INSERT INTO t_permanent_myisam SET col1 = 1;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = MyISAM;
+connect con1,localhost,root,,;
+SET AUTOCOMMIT = 0;
+connection default;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+connection con1;
+UPDATE t_permanent_innodb SET col1 = 8;
+UPDATE t_permanent_myisam SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t_con1_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t_con1_myisam;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection default;
+BACKUP STAGE END;
+DROP TABLE t_permanent_myisam, t_permanent_innodb;
+DROP TABLE t_con1_innodb, t_con1_myisam;
+disconnect con1;
+set global lock_wait_timeout=default;
diff --git a/mysql-test/main/backup_lock.test b/mysql-test/main/backup_lock.test
new file mode 100644
index 00000000000..d6db7a6364e
--- /dev/null
+++ b/mysql-test/main/backup_lock.test
@@ -0,0 +1,284 @@
+########################################################################
+# Tests BACKUP STAGE locking
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # Testing which locks we get from all stages
+--echo #
+
+BACKUP STAGE START;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE FLUSH;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE BLOCK_DDL;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE BLOCK_COMMIT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+
+--echo #
+--echo # testing BACKUP STAGE LOCK's
+--echo #
+
+# Following connections are used in a few of the following tests
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+connection default;
+
+--echo #
+--echo # testing if BACKUP STAGE FLUSH causes deadlocks with ALTER TABLE
+--echo #
+
+create table t1 (a int) engine=innodb;
+
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--send alter table t1 add column (j int), algorithm copy
+
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+#
+# Do first test with max_statement_time, other tests later are done with
+# lock_wait_timeout. This is mostly to ensure that both methods works
+#
+--error ER_STATEMENT_TIMEOUT
+SET STATEMENT max_statement_time=1 FOR backup stage block_ddl;
+--send backup stage block_ddl
+
+connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+commit;
+# The following select works because alter table is waiting for DDL lock
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR INSERT INTO t1 values (2);
+--send INSERT INTO t1 values (2,0);
+connection con2;
+--reap # BLOCK_DDL
+backup stage end;
+connection con1;
+--reap # ALTER TABLE
+connection default;
+--reap # INSERT
+select * from t1;
+drop table t1;
+
+--echo # Test with inline alter table, which doesn't block block_commit
+
+create table t1 (a int) engine=innodb;
+
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--send alter table t1 add column (j int)
+
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+backup stage start;
+backup stage flush;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+backup stage block_ddl;
+backup stage block_commit;
+connection default;
+SELECT * FROM t1;
+--send commit
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+backup stage end;
+connection con1;
+--reap # ALTER TABLE
+connection default;
+--reap # commit
+drop table t1;
+
+--echo #
+--echo # testing if BACKUP STAGE FLUSH causes deadlocks with DROP TABLE
+--echo #
+
+create table t1 (a int) engine=innodb;
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+--send DROP TABLE t1
+
+connection con2;
+backup stage start;
+backup stage flush;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR SELECT * FROM t1;
+
+backup stage block_ddl;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+backup stage end;
+
+connection default;
+commit;
+connection con1;
+--reap # DROP TABLE
+connection default;
+
+--echo #
+--echo # Check if backup stage block_dll + concurrent drop table blocks select
+--echo #
+
+create table t1 (a int) engine=innodb;
+backup stage start;
+backup stage block_ddl;
+connection con1;
+--send DROP TABLE t1
+connection con2;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+connection con2;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+# Check that select's are not blocked
+SELECT * FROM t1;
+connection default;
+backup stage end;
+connection con1;
+--reap
+connection default;
+
+--echo #
+--echo # Check if backup stage block_dll overrides ddl lock for drop table
+--echo #
+
+create table t1 (a int) engine=innodb;
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+# Waits on MDL
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR DROP TABLE t1;
+--send DROP TABLE t1
+
+connection con2;
+backup stage start;
+backup stage flush;
+backup stage block_ddl;
+connection default;
+commit;
+connection con2;
+backup stage end;
+connection con1;
+--reap # DROP TABLE
+connection default;
+
+--echo #
+--echo # Check if BACKUP STAGE BLOCK_COMMIT blocks commit
+--echo #
+
+create table t1 (a int) engine=innodb;
+start transaction;
+# Acquires MDL lock
+insert into t1 values (1);
+
+connection con1;
+backup stage start;
+backup stage block_commit;
+connection default;
+--send commit
+connection con1;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for backup lock";
+backup stage end;
+connection default;
+--reap # commit
+select * from t1;
+drop table t1;
+
+#
+# End of tests using con1 and con2
+#
+disconnect con1;
+disconnect con2;
+
+--echo #
+--echo # Test backup stage and flush tables
+--echo #
+
+BACKUP STAGE START ;
+BACKUP STAGE BLOCK_DDL ;
+FLUSH TABLES;
+CREATE TEMPORARY TABLE t12345678_tmp (col1 INT);
+drop table t12345678_tmp;
+BACKUP STAGE END;
+
+--echo #
+--echo # Test BACKUP STAGES with lock timeouts
+--echo #
+
+SET GLOBAL lock_wait_timeout=0;
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+
+INSERT INTO t_permanent_myisam SET col1 = 1;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = MyISAM;
+
+--connect(con1,localhost,root,,)
+SET AUTOCOMMIT = 0;
+
+--connection default
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+
+--connection con1
+UPDATE t_permanent_innodb SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_innodb;
+
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_myisam;
+
+--connection default
+BACKUP STAGE END;
+DROP TABLE t_permanent_myisam, t_permanent_innodb;
+DROP TABLE t_con1_innodb, t_con1_myisam;
+--disconnect con1
+set global lock_wait_timeout=default;
diff --git a/mysql-test/main/backup_lock_debug.result b/mysql-test/main/backup_lock_debug.result
new file mode 100644
index 00000000000..8832d9cd3e7
--- /dev/null
+++ b/mysql-test/main/backup_lock_debug.result
@@ -0,0 +1,28 @@
+#
+# Make sure pending LOCK TABLES doesn't block BACKUP STAGE
+#
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+#
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+LOCK TABLE t1 WRITE;
+#
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+disconnect con2;
+#
+connection default;
+UNLOCK TABLES;
+#
+connection con1;
+UNLOCK TABLES;
+disconnect con1;
+#
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/main/backup_lock_debug.test b/mysql-test/main/backup_lock_debug.test
new file mode 100644
index 00000000000..8cf492b3404
--- /dev/null
+++ b/mysql-test/main/backup_lock_debug.test
@@ -0,0 +1,40 @@
+########################################################################
+# Tests for BACKUP STAGE locking that requires debug.
+########################################################################
+
+--source include/have_debug_sync.inc
+
+--echo #
+--echo # Make sure pending LOCK TABLES doesn't block BACKUP STAGE
+--echo #
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+
+--echo #
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+--send LOCK TABLE t1 WRITE
+
+--echo #
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+disconnect con2;
+
+--echo #
+connection default;
+UNLOCK TABLES;
+
+--echo #
+connection con1;
+reap;
+UNLOCK TABLES;
+disconnect con1;
+
+--echo #
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/main/backup_locks.result b/mysql-test/main/backup_locks.result
new file mode 100644
index 00000000000..a3a66937cf9
--- /dev/null
+++ b/mysql-test/main/backup_locks.result
@@ -0,0 +1,46 @@
+#
+# Test lock taken
+#
+BACKUP LOCK test.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock test t1
+BACKUP UNLOCK;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+BACKUP LOCK t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock test t1
+BACKUP UNLOCK;
+BACKUP LOCK non_existing.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock non_existing t1
+BACKUP UNLOCK;
+#
+# Test that backup lock protects against ddl
+#
+connect con1,localhost,root,,;
+connection default;
+create table t1 (a int) engine=innodb;
+insert into t1 values (1);
+backup lock t1;
+select * from t1;
+a
+1
+connection con1;
+drop table t1;
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_SHARED_HIGH_PRIO Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+select * from t1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+backup unlock;
+connection con1;
+connection default;
+disconnect con1;
+show tables;
+Tables_in_test
diff --git a/mysql-test/main/backup_locks.test b/mysql-test/main/backup_locks.test
new file mode 100644
index 00000000000..21b67100506
--- /dev/null
+++ b/mysql-test/main/backup_locks.test
@@ -0,0 +1,50 @@
+########################################################################
+# Tests BACKUP STAGE locking
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # Test lock taken
+--echo #
+
+BACKUP LOCK test.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP UNLOCK;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP LOCK t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP UNLOCK;
+BACKUP LOCK non_existing.t1;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+BACKUP UNLOCK;
+
+--echo #
+--echo # Test that backup lock protects against ddl
+--echo #
+
+connect (con1,localhost,root,,);
+
+connection default;
+create table t1 (a int) engine=innodb;
+insert into t1 values (1);
+backup lock t1;
+select * from t1;
+connection con1;
+--send drop table t1
+connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock";
+--source include/wait_condition.inc
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+--error ER_LOCK_DEADLOCK
+select * from t1;
+backup unlock;
+connection con1;
+--reap
+connection default;
+disconnect con1;
+show tables;
diff --git a/mysql-test/main/backup_priv.result b/mysql-test/main/backup_priv.result
new file mode 100644
index 00000000000..4169f58f40f
--- /dev/null
+++ b/mysql-test/main/backup_priv.result
@@ -0,0 +1,40 @@
+#
+# Test privileges for BACKUP STAGES
+#
+set sql_mode="";
+GRANT RELOAD ON *.* TO user1@localhost;
+GRANT CREATE, DROP ON *.* TO user2@localhost;
+connect con1, localhost, user1;
+BACKUP STAGE START;
+BACKUP STAGE END;
+# change_user must release backup lock
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+lock_mode
+MDL_BACKUP_FLUSH
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+lock_mode
+disconnect con1;
+connection default;
+# A very low privileged user (-> con4) cannot acquire the backup lock
+connect con1, localhost, user2;
+BACKUP STAGE START;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE FLUSH;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE BLOCK_DDL;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE BLOCK_COMMIT;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+BACKUP STAGE END;
+ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
+disconnect con1;
+connection default;
+DROP USER user1@localhost, user2@localhost;
+#
+# Test using BACKUP STAGES in a SP
+#
+create procedure foo42()
+BACKUP STAGE START;
+ERROR 0A000: BACKUP STAGE is not allowed in stored procedures
diff --git a/mysql-test/main/backup_priv.test b/mysql-test/main/backup_priv.test
new file mode 100644
index 00000000000..93b69af0b67
--- /dev/null
+++ b/mysql-test/main/backup_priv.test
@@ -0,0 +1,52 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--source include/have_metadata_lock_info.inc
+
+--echo #
+--echo # Test privileges for BACKUP STAGES
+--echo #
+
+set sql_mode="";
+
+GRANT RELOAD ON *.* TO user1@localhost;
+GRANT CREATE, DROP ON *.* TO user2@localhost;
+
+--connect(con1, localhost, user1)
+BACKUP STAGE START;
+BACKUP STAGE END;
+--echo # change_user must release backup lock
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+change_user user2;
+SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
+--disconnect con1
+--source include/wait_until_disconnected.inc
+--connection default
+
+--echo # A very low privileged user (-> con4) cannot acquire the backup lock
+
+--connect(con1, localhost, user2)
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE START;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE FLUSH;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE BLOCK_DDL;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+BACKUP STAGE END;
+--disconnect con1
+--source include/wait_until_disconnected.inc
+
+--connection default
+DROP USER user1@localhost, user2@localhost;
+
+--echo #
+--echo # Test using BACKUP STAGES in a SP
+--echo #
+
+--error ER_SP_BADSTATEMENT
+create procedure foo42()
+ BACKUP STAGE START;
diff --git a/mysql-test/main/backup_stages.result b/mysql-test/main/backup_stages.result
new file mode 100644
index 00000000000..caea1fda0b9
--- /dev/null
+++ b/mysql-test/main/backup_stages.result
@@ -0,0 +1,335 @@
+#-----------------------------------------------------------------------
+# Multi-threaded tests
+#-----------------------------------------------------------------------
+# Show that only one connection can hold the backup lock.
+connection default;
+BACKUP STAGE START;
+connect con1,localhost,root,,;
+SET STATEMENT lock_wait_timeout=0 FOR BACKUP STAGE START;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+BACKUP STAGE START;
+connection default;
+# Show that the connection con1 has to wait for the backup lock and the
+# corresponding representation within the processlist.
+SET @con1_id = <con1_id>;
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con1_id;
+ID USER COMMAND STATE INFO STAGE MAX_STAGE INFO_BINARY
+<con1_id> root Query Waiting for backup lock BACKUP STAGE START 0 0 BACKUP STAGE START
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_START Backup lock
+connection con1;
+# The connection default has removed the backup lock.
+# And so the current connection con1 can reap for its BACKUP STAGE START
+connect con2,localhost,root,,;
+# The connection con2 cannot continue the work of con1 by setting the
+# next BACKUP STAGE FLUSH.
+BACKUP STAGE FLUSH;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE START;
+connection default;
+SET @con2_id = <con2_id>;
+# Connection con2 waits for the backup lock held by con1.
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con2_id;
+ID USER COMMAND STATE INFO STAGE MAX_STAGE INFO_BINARY
+<con2_id> root Query Waiting for backup lock BACKUP STAGE START 0 0 BACKUP STAGE START
+disconnect con1;
+connection con2;
+# Connection con1 frees the backup lock held by disconnecting.
+# So connection con2 gets the backup lock.
+connect con3,localhost,root,,;
+BACKUP STAGE START;
+connection default;
+SET @con3_id = <con3_id>;
+# Connection con3 waits for the backup lock held by con2.
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con3_id;
+ID USER COMMAND STATE INFO STAGE MAX_STAGE INFO_BINARY
+<con3_id> root Query Waiting for backup lock BACKUP STAGE START 0 0 BACKUP STAGE START
+KILL CONNECTION @con2_id;
+connection con3;
+# Connection con2 frees the backup lock held by getting killed.
+# So connection con3 gets the backup lock.
+BACKUP STAGE END;
+disconnect con3;
+connection default;
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_myisam SET col1 = 1;
+connect backup,localhost,root,,;
+connect con11,localhost,root,,;
+SET AUTOCOMMIT = 0;
+set session lock_wait_timeout=0;
+connect con12,localhost,root,,;
+SET AUTOCOMMIT = 1;
+# Between (connection default) BACKUP STAGE START and FLUSH
+# no restrictions for concurrent sessions regarding DDL or DML
+# affecting transactional/non transactional permanent tables.
+connection backup;
+BACKUP STAGE START;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 2;
+UPDATE t_permanent_myisam SET col1 = 2;
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1
+2
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1
+2
+HANDLER t_permanent_myisam CLOSE;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_permanent_myisam ADD COLUMN col2 INT;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+connection con12;
+UPDATE t_permanent_innodb SET col1 = 3;
+UPDATE t_permanent_myisam SET col1 = 3;
+# Between (connection default) BACKUP STAGE FLUSH and BLOCK_DDL
+# concurrent sessions
+# - can change transactional permanent tables with DDL and DML
+# - can run DROP/CREATE transactional/non transactional TABLE
+# - cannot modify non transactional permanent tables with DDL or DML
+connection backup;
+BACKUP STAGE FLUSH;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 4;
+SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_myisam SET col1 = 4;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1 col2
+4 NULL
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1 col2
+3 NULL
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col3 INT;
+SET STATEMENT lock_wait_timeout=0 FOR ALTER TABLE t_permanent_myisam ADD COLUMN col3 INT;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+connection con12;
+UPDATE t_permanent_innodb SET col1 = 5;
+# Between (connection default) BACKUP STAGE BLOCK_DDL and BLOCK_COMMIT
+# concurrent sessions
+# - can change transactional permanent tables with DML
+# - cannot run DDL
+# - cannot change non transactional permanent tables with DML
+connection backup;
+BACKUP STAGE BLOCK_DDL;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 6;
+UPDATE t_permanent_myisam SET col1 = 6;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1 col2 col3
+6 NULL NULL
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1 col2
+3 NULL
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ALTER TABLE t_permanent_innodb ADD COLUMN col4 INT;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con12;
+UPDATE t_permanent_innodb SET col1 = 7;
+# Between (connection default) BACKUP STAGE BLOCK_COMMIT and END
+# concurrent sessions
+# - can change transactional permanent tables with DML
+# - cannot run DDL
+# - cannot change non transactional permanent tables with DML
+connection backup;
+BACKUP STAGE BLOCK_COMMIT;
+connection con11;
+UPDATE t_permanent_innodb SET col1 = 8;
+UPDATE t_permanent_myisam SET col1 = 8;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT COUNT(*) FROM t_permanent_innodb;
+COUNT(*)
+1
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+col1 col2 col3
+8 NULL NULL
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+COUNT(*)
+1
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+col1 col2
+3 NULL
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE t_con1_myisam;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection con12;
+SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_innodb SET col1 = 9;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection backup;
+BACKUP STAGE END;
+connection con11;
+COMMIT;
+SELECT * FROM t_permanent_innodb ORDER BY col1;
+col1 col2 col3
+7 NULL NULL
+SELECT * FROM t_permanent_myisam ORDER BY col1;
+col1 col2
+3 NULL
+SET AUTOCOMMIT = 0;
+SET GLOBAL tx_read_only = 1;
+connection con12;
+BACKUP STAGE START;
+BACKUP STAGE END;
+SET GLOBAL tx_read_only = 0;
+DROP VIEW v_some_view;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+# Connection backup holds the backup log and is on some stage.
+# Connection con11 tries to LOCK TABLEs or to set read_only.
+connection backup;
+BACKUP STAGE START;
+connection con11;
+# Between BACKUP STAGE START and FLUSH:
+# No restrictions for other connection around LOCK TABLES or read-only.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE FLUSH;
+connection con11;
+# Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+# Connection con11 not holding the backup lock cannot
+# LOCK WRITE non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+LOCK TABLES t_permanent_myisam WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE BLOCK_DDL;
+connection con11;
+# Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+# Connection con11 not holding the backup lock cannot
+# LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+LOCK TABLES t_permanent_myisam WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE BLOCK_COMMIT;
+connection con11;
+# Between BACKUP BLOCK_COMMIT FLUSH and END:
+# Connection con11 not holding the backup lock cannot
+# LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+LOCK TABLES t_permanent_myisam WRITE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+connection backup;
+BACKUP STAGE END;
+DROP TABLE t_permanent_innodb;
+DROP TABLE t_permanent_myisam;
+#
+# Log tables
+#
+connection backup;
+SET @old_general_log = @@general_log;
+SET @old_slow_query_log = @@slow_query_log;
+SET @old_log_output = @@log_output;
+SET GLOBAL log_output = 'TABLE';
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
+connection con11;
+SET @old_long_query_time = @@SESSION.long_query_time;
+SET SESSION long_query_time = 0;
+connection backup;
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+connection con11;
+SELECT 1;
+1
+1
+connection backup;
+SELECT 1;
+1
+1
+connection con11;
+SET SESSION long_query_time = @old_long_query_time;
+connection backup;
+BACKUP STAGE END;
+SET GLOBAL log_output = @old_log_output;
+SET GLOBAL slow_query_log = @old_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+#-----------------------------------------------------------------------
+# Cleanup
+#-----------------------------------------------------------------------
+SET GLOBAL lock_wait_timeout = <old_lock_wait_timeout>;
+disconnect con2;
+disconnect con11;
+disconnect con12;
+disconnect backup;
+connection default;
diff --git a/mysql-test/main/backup_stages.test b/mysql-test/main/backup_stages.test
new file mode 100644
index 00000000000..ba9c15a1d7e
--- /dev/null
+++ b/mysql-test/main/backup_stages.test
@@ -0,0 +1,385 @@
+########################################################################
+# Test what is locked in each stage for LOCK FOR BACKUP (MDEV-5336)
+########################################################################
+
+--source include/not_embedded.inc
+# A transactional engine
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+# As non transactional engine we have MyISAM anyway.
+
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
+let $old_lock_wait_timeout = `SELECT @@global.lock_wait_timeout`;
+
+--echo #-----------------------------------------------------------------------
+--echo # Multi-threaded tests
+--echo #-----------------------------------------------------------------------
+--echo # Show that only one connection can hold the backup lock.
+
+--connection default
+let $default_id= `SELECT CONNECTION_ID()`;
+BACKUP STAGE START;
+
+# con1, root high privileged user
+--connect(con1,localhost,root,,)
+let $con1_id= `SELECT CONNECTION_ID()`;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR BACKUP STAGE START;
+send BACKUP STAGE START;
+--connection default
+
+--echo # Show that the connection con1 has to wait for the backup lock and the
+--echo # corresponding representation within the processlist.
+
+--replace_result $con1_id <con1_id>
+
+eval SET @con1_id = $con1_id;
+# Output expected here is
+# ID USER COMMAND STATE INFO INFO_BINARY
+# <con1_id> root Query Waiting for backup lock BACKUP STAGE START BACKUP STAGE START
+let $wait_condition=
+ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE STATE = "Waiting for backup lock" and INFO = "BACKUP STAGE START";
+--source include/wait_condition.inc
+--replace_column 1 <con1_id>
+eval
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con1_id;
+# con1 uses @@global.lock_wait_timeout
+
+BACKUP STAGE END;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+
+--connection con1
+--echo # The connection default has removed the backup lock.
+--echo # And so the current connection con1 can reap for its BACKUP STAGE START
+--reap
+
+# con2, root high privileged user
+--connect(con2,localhost,root,,)
+let $con2_id= `SELECT CONNECTION_ID()`;
+--echo # The connection con2 cannot continue the work of con1 by setting the
+--echo # next BACKUP STAGE FLUSH.
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE FLUSH;
+send
+BACKUP STAGE START;
+
+--connection default
+--replace_result $con2_id <con2_id>
+eval SET @con2_id = $con2_id;
+--echo # Connection con2 waits for the backup lock held by con1.
+--source include/wait_condition.inc
+--replace_column 1 <con2_id>
+eval
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con2_id;
+
+--disconnect con1
+
+--connection con2
+--echo # Connection con1 frees the backup lock held by disconnecting.
+--echo # So connection con2 gets the backup lock.
+--reap
+
+--connect(con3,localhost,root,,)
+let $con3_id= `SELECT CONNECTION_ID()`;
+send
+BACKUP STAGE START;
+
+--connection default
+--replace_result $con3_id <con3_id>
+eval SET @con3_id = $con3_id;
+--echo # Connection con3 waits for the backup lock held by con2.
+--source include/wait_condition.inc
+--replace_column 1 <con3_id>
+eval
+SELECT ID, USER, COMMAND, STATE, INFO, STAGE, MAX_STAGE, INFO_BINARY
+FROM information_schema.processlist WHERE id = @con3_id;
+KILL CONNECTION @con2_id;
+
+--connection con3
+--echo # Connection con2 frees the backup lock held by getting killed.
+--echo # So connection con3 gets the backup lock.
+--reap
+BACKUP STAGE END;
+disconnect con3;
+--connection default
+
+CREATE TABLE t_permanent_innodb (col1 INT) ENGINE = InnoDB;
+INSERT INTO t_permanent_innodb SET col1 = 1;
+CREATE TABLE t_permanent_myisam (col1 INT) ENGINE = MyISAM;
+INSERT INTO t_permanent_myisam SET col1 = 1;
+
+# backup : Try the BACKUP STAGE sequence
+# con11 : Try DDL + DML with AUTOCOMMIT = 0
+# con12 : Try DML with AUTOCOMMIT = 1
+--connect(backup,localhost,root,,)
+--connect(con11,localhost,root,,)
+SET AUTOCOMMIT = 0;
+set session lock_wait_timeout=0;
+--connect(con12,localhost,root,,)
+SET AUTOCOMMIT = 1;
+
+--echo # Between (connection default) BACKUP STAGE START and FLUSH
+--echo # no restrictions for concurrent sessions regarding DDL or DML
+--echo # affecting transactional/non transactional permanent tables.
+
+--connection backup
+BACKUP STAGE START;
+--connection con11
+UPDATE t_permanent_innodb SET col1 = 2;
+UPDATE t_permanent_myisam SET col1 = 2;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col2 INT;
+ALTER TABLE t_permanent_myisam ADD COLUMN col2 INT;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+--connection con12
+UPDATE t_permanent_innodb SET col1 = 3;
+UPDATE t_permanent_myisam SET col1 = 3;
+
+--echo # Between (connection default) BACKUP STAGE FLUSH and BLOCK_DDL
+--echo # concurrent sessions
+--echo # - can change transactional permanent tables with DDL and DML
+--echo # - can run DROP/CREATE transactional/non transactional TABLE
+--echo # - cannot modify non transactional permanent tables with DDL or DML
+
+--connection backup
+BACKUP STAGE FLUSH;
+--connection con11
+UPDATE t_permanent_innodb SET col1 = 4;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_myisam SET col1 = 4;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+CREATE TABLE t_con1_innodb (col1 INT) ENGINE = InnoDB;
+CREATE TABLE t_con1_myisam (col1 INT) ENGINE = InnoDB;
+ALTER TABLE t_permanent_innodb ADD COLUMN col3 INT;
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR ALTER TABLE t_permanent_myisam ADD COLUMN col3 INT;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+--connection con12
+UPDATE t_permanent_innodb SET col1 = 5;
+
+
+--echo # Between (connection default) BACKUP STAGE BLOCK_DDL and BLOCK_COMMIT
+--echo # concurrent sessions
+--echo # - can change transactional permanent tables with DML
+--echo # - cannot run DDL
+--echo # - cannot change non transactional permanent tables with DML
+
+--connection backup
+BACKUP STAGE BLOCK_DDL;
+--connection con11
+
+UPDATE t_permanent_innodb SET col1 = 6;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 6;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_innodb;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE TABLE throw_away (col1 INT) ENGINE = InnoDB;
+--error ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE t_permanent_innodb ADD COLUMN col4 INT;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_innodb;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE OR REPLACE VIEW v_some_view AS SELECT * FROM t_permanent_myisam;
+--connection con12
+UPDATE t_permanent_innodb SET col1 = 7;
+
+
+--echo # Between (connection default) BACKUP STAGE BLOCK_COMMIT and END
+--echo # concurrent sessions
+--echo # - can change transactional permanent tables with DML
+--echo # - cannot run DDL
+--echo # - cannot change non transactional permanent tables with DML
+
+--connection backup
+BACKUP STAGE BLOCK_COMMIT;
+--connection con11
+UPDATE t_permanent_innodb SET col1 = 8;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t_permanent_myisam SET col1 = 8;
+SELECT COUNT(*) FROM t_permanent_innodb;
+HANDLER t_permanent_innodb OPEN;
+HANDLER t_permanent_innodb READ FIRST;
+HANDLER t_permanent_innodb CLOSE;
+SELECT COUNT(*) FROM t_permanent_myisam;
+HANDLER t_permanent_myisam OPEN;
+HANDLER t_permanent_myisam READ FIRST;
+HANDLER t_permanent_myisam CLOSE;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_innodb;
+--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE t_con1_myisam;
+--connection con12
+--error ER_LOCK_WAIT_TIMEOUT
+SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_innodb SET col1 = 9;
+
+--connection backup
+BACKUP STAGE END;
+--connection con11
+COMMIT;
+SELECT * FROM t_permanent_innodb ORDER BY col1;
+SELECT * FROM t_permanent_myisam ORDER BY col1;
+SET AUTOCOMMIT = 0;
+SET GLOBAL tx_read_only = 1;
+--connection con12
+BACKUP STAGE START;
+BACKUP STAGE END;
+SET GLOBAL tx_read_only = 0;
+DROP VIEW v_some_view;
+DROP TABLE t_con1_innodb;
+DROP TABLE t_con1_myisam;
+
+--echo # Connection backup holds the backup log and is on some stage.
+--echo # Connection con11 tries to LOCK TABLEs or to set read_only.
+
+--connection backup
+BACKUP STAGE START;
+--connection con11
+--echo # Between BACKUP STAGE START and FLUSH:
+--echo # No restrictions for other connection around LOCK TABLES or read-only.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE FLUSH;
+--connection con11
+--echo # Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+--echo # Connection con11 not holding the backup lock cannot
+--echo # LOCK WRITE non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+LOCK TABLES t_permanent_innodb WRITE;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE BLOCK_DDL;
+--connection con11
+--echo # Between BACKUP STAGE FLUSH and BLOCK_COMMIT:
+--echo # Connection con11 not holding the backup lock cannot
+--echo # LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_innodb WRITE;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE BLOCK_COMMIT;
+--connection con11
+--echo # Between BACKUP BLOCK_COMMIT FLUSH and END:
+--echo # Connection con11 not holding the backup lock cannot
+--echo # LOCK WRITE transactional or non transactional table.
+LOCK TABLES t_permanent_innodb READ;
+LOCK TABLES t_permanent_myisam READ;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_innodb WRITE;
+--error ER_LOCK_WAIT_TIMEOUT
+LOCK TABLES t_permanent_myisam WRITE;
+UNLOCK TABLES;
+SET GLOBAL tx_read_only = 1;
+SET GLOBAL tx_read_only = 0;
+--connection backup
+BACKUP STAGE END;
+
+DROP TABLE t_permanent_innodb;
+DROP TABLE t_permanent_myisam;
+
+--echo #
+--echo # Log tables
+--echo #
+
+--connection backup
+
+SET @old_general_log = @@general_log;
+SET @old_slow_query_log = @@slow_query_log;
+SET @old_log_output = @@log_output;
+
+SET GLOBAL log_output = 'TABLE';
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
+
+
+--connection con11
+SET @old_long_query_time = @@SESSION.long_query_time;
+SET SESSION long_query_time = 0;
+
+--connection backup
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+
+--connection con11
+SELECT 1;
+
+--connection backup
+SELECT 1;
+
+--connection con11
+SET SESSION long_query_time = @old_long_query_time;
+
+--connection backup
+BACKUP STAGE END;
+
+SET GLOBAL log_output = @old_log_output;
+SET GLOBAL slow_query_log = @old_slow_query_log;
+SET GLOBAL general_log = @old_general_log;
+
+--echo #-----------------------------------------------------------------------
+--echo # Cleanup
+--echo #-----------------------------------------------------------------------
+
+--replace_result $old_lock_wait_timeout <old_lock_wait_timeout>
+eval
+SET GLOBAL lock_wait_timeout = $old_lock_wait_timeout;
+
+--disconnect con2
+--disconnect con11
+--disconnect con12
+--disconnect backup
+
+--connection default
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/backup_syntax.result b/mysql-test/main/backup_syntax.result
new file mode 100644
index 00000000000..4b8e74edd57
--- /dev/null
+++ b/mysql-test/main/backup_syntax.result
@@ -0,0 +1,163 @@
+#-----------------------------------------------------------------------
+# Basic syntax checks
+#-----------------------------------------------------------------------
+# Check existing BACKUP STAGE statements in the sequence to be used.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+# Check invalid variants of BACKUP .... syntax.
+BACKUP LOG;
+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 'LOG' at line 1
+BACKUP LOCK;
+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 '' at line 1
+BACKUP STAGE;
+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 '' at line 1
+BACKUP STAGE LOCK;
+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 'LOCK' at line 1
+BACKUP STAGE not_existing;
+ERROR HY000: Unknown backup stage: 'not_existing'. Stage should be one of START, FLUSH, BLOCK_DDL, BLOCK_COMMIT or END
+#-----------------------------------------------------------------------
+# BACKUP STAGE statements in various orders.
+#-----------------------------------------------------------------------
+# All BACKUP STAGE statements != 'BACKUP STAGE START' expect that a
+# backup lock (generated by BACKUP STAGE START) already exists.
+#
+backup stage start;
+backup stage flush;
+backup stage start;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
+backup stage start;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
+backup stage block_commit;
+backup stage flush;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
+backup stage flush;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
+backup stage end;
+backup stage flush;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE END;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE BLOCK_COMMIT;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+BACKUP STAGE FLUSH;
+ERROR HY000: You must start backup with "BACKUP STAGE START"
+# Ordered "give up" with 'BACKUP STAGE END' because of whatever reason.
+# Some existing backup lock assumed a 'BACKUP STAGE END' is allowed in
+# every situation.
+BACKUP STAGE START;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+# Orders with BACKUP STAGE FLUSH omitted.
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+# Orders with BACKUP STAGE BLOCK_DDL omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+# Orders with BACKUP STAGE BLOCK_COMMIT omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+# Orders with doubled BACKUP STAGE statements.
+# We get an error but that seems to have no bad impact on the state.
+# And so we are allowed to go on with BACKUP STAGE statements.
+BACKUP STAGE START;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'START'
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'FLUSH'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE BLOCK_COMMIT;
+ERROR HY000: Backup stage 'BLOCK_COMMIT' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+# Scrambled orders.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'FLUSH'
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE START;
+ERROR HY000: Backup stage 'START' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE FLUSH;
+ERROR HY000: Backup stage 'FLUSH' is same or before current backup stage 'BLOCK_DDL'
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+#----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE BLOCK_DDL;
+ERROR HY000: Backup stage 'BLOCK_DDL' is same or before current backup stage 'BLOCK_COMMIT'
+BACKUP STAGE END;
+#
+# Check Oracle syntax
+#
+set SQL_MODE=Oracle;
+backup stage start;
+backup stage end;
+set SQL_MODE=default;
diff --git a/mysql-test/main/backup_syntax.test b/mysql-test/main/backup_syntax.test
new file mode 100644
index 00000000000..f02c69bdd85
--- /dev/null
+++ b/mysql-test/main/backup_syntax.test
@@ -0,0 +1,181 @@
+########################################################################
+# Tests things releated to syntax of BACKUP STAGE (MDEV-5336)
+########################################################################
+
+--source include/have_innodb.inc
+--source include/have_metadata_lock_info.inc
+
+--echo #-----------------------------------------------------------------------
+--echo # Basic syntax checks
+--echo #-----------------------------------------------------------------------
+
+--echo # Check existing BACKUP STAGE statements in the sequence to be used.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+
+--echo # Check invalid variants of BACKUP .... syntax.
+--error ER_PARSE_ERROR
+BACKUP LOG;
+--error ER_PARSE_ERROR
+BACKUP LOCK;
+--error ER_PARSE_ERROR
+BACKUP STAGE;
+--error ER_PARSE_ERROR
+BACKUP STAGE LOCK;
+--error ER_BACKUP_UNKNOWN_STAGE
+BACKUP STAGE not_existing;
+
+--echo #-----------------------------------------------------------------------
+--echo # BACKUP STAGE statements in various orders.
+--echo #-----------------------------------------------------------------------
+--echo # All BACKUP STAGE statements != 'BACKUP STAGE START' expect that a
+--echo # backup lock (generated by BACKUP STAGE START) already exists.
+--echo #
+
+backup stage start;
+backup stage flush;
+--error ER_BACKUP_WRONG_STAGE
+backup stage start;
+--error ER_BACKUP_WRONG_STAGE
+backup stage start;
+backup stage block_commit;
+--error ER_BACKUP_WRONG_STAGE
+backup stage flush;
+--error ER_BACKUP_WRONG_STAGE
+backup stage flush;
+backup stage end;
+--error ER_BACKUP_NOT_RUNNING
+backup stage flush;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE END;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_NOT_RUNNING
+BACKUP STAGE FLUSH;
+
+--echo # Ordered "give up" with 'BACKUP STAGE END' because of whatever reason.
+--echo # Some existing backup lock assumed a 'BACKUP STAGE END' is allowed in
+--echo # every situation.
+
+BACKUP STAGE START;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo # Orders with BACKUP STAGE FLUSH omitted.
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo # Orders with BACKUP STAGE BLOCK_DDL omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo # Orders with BACKUP STAGE BLOCK_COMMIT omitted.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+
+--echo # Orders with doubled BACKUP STAGE statements.
+--echo # We get an error but that seems to have no bad impact on the state.
+--echo # And so we are allowed to go on with BACKUP STAGE statements.
+
+BACKUP STAGE START;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+
+--echo # Scrambled orders.
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE START;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE BLOCK_DDL;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+BACKUP STAGE END;
+--echo #----
+BACKUP STAGE START;
+BACKUP STAGE FLUSH;
+BACKUP STAGE BLOCK_COMMIT;
+--error ER_BACKUP_WRONG_STAGE
+BACKUP STAGE BLOCK_DDL;
+BACKUP STAGE END;
+
+--echo #
+--echo # Check Oracle syntax
+--echo #
+
+set SQL_MODE=Oracle;
+backup stage start;
+backup stage end;
+set SQL_MODE=default;
diff --git a/mysql-test/main/bigint.result b/mysql-test/main/bigint.result
index 8f4b287ab21..6e0384182fe 100644
--- a/mysql-test/main/bigint.result
+++ b/mysql-test/main/bigint.result
@@ -510,3 +510,14 @@ DROP TABLE t1;
SELECT 100 BETWEEN 1 AND 9223372036854775808;
100 BETWEEN 1 AND 9223372036854775808
1
+#
+# MDEV-17724 Wrong result for BETWEEN 0 AND 18446744073709551615
+#
+CREATE TABLE t1 (c1 bigint(20) unsigned NOT NULL);
+INSERT INTO t1 VALUES (0),(101),(255);
+SELECT * FROM t1 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1;
+c1
+0
+101
+255
+DROP TABLE t1;
diff --git a/mysql-test/main/bigint.test b/mysql-test/main/bigint.test
index ae325c7d7de..68ffcd9230e 100644
--- a/mysql-test/main/bigint.test
+++ b/mysql-test/main/bigint.test
@@ -416,3 +416,12 @@ DROP TABLE t1;
--echo # MDEV-9372 select 100 between 1 and 9223372036854775808 returns false
--echo #
SELECT 100 BETWEEN 1 AND 9223372036854775808;
+
+--echo #
+--echo # MDEV-17724 Wrong result for BETWEEN 0 AND 18446744073709551615
+--echo #
+
+CREATE TABLE t1 (c1 bigint(20) unsigned NOT NULL);
+INSERT INTO t1 VALUES (0),(101),(255);
+SELECT * FROM t1 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1;
+DROP TABLE t1;
diff --git a/mysql-test/main/check.result b/mysql-test/main/check.result
index e3dcda773f4..e882a4cdbe6 100644
--- a/mysql-test/main/check.result
+++ b/mysql-test/main/check.result
@@ -85,3 +85,13 @@ t1 CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+create temporary table t1 (
+id int not null auto_increment primary key,
+f int not null default 0
+);
+insert into t1 () values ();
+alter ignore table t1 add constraint check (f > 0);
+Warnings:
+Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
+alter table t1;
+drop table t1;
diff --git a/mysql-test/main/check.test b/mysql-test/main/check.test
index cce8fd34c9c..475a7996a09 100644
--- a/mysql-test/main/check.test
+++ b/mysql-test/main/check.test
@@ -103,3 +103,15 @@ CREATE OR REPLACE TABLE t1 (a INT, b INT, c INT, CHECK (a+b>0)) ENGINE=MyISAM;
ALTER TABLE t1 DROP COLUMN b, DROP CONSTRAINT `CONSTRAINT_1`;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+
+#
+# MDEV-16903 Assertion `!auto_increment_field_not_null' failed in TABLE::init after unsuccessful attempt to add CHECK constraint on temporary table
+#
+create temporary table t1 (
+ id int not null auto_increment primary key,
+ f int not null default 0
+);
+insert into t1 () values ();
+alter ignore table t1 add constraint check (f > 0);
+alter table t1;
+drop table t1;
diff --git a/mysql-test/main/column_compression_parts.result b/mysql-test/main/column_compression_parts.result
index e0b54aec20c..bc3028826ee 100644
--- a/mysql-test/main/column_compression_parts.result
+++ b/mysql-test/main/column_compression_parts.result
@@ -12,6 +12,7 @@ INSERT INTO t1 VALUES (1,REPEAT('a',100)),(2,REPEAT('v',200)),(3,REPEAT('r',300)
INSERT INTO t1 VALUES (5,REPEAT('k',500)),(6,'April'),(7,7),(8,""),(9,"M"),(10,DEFAULT);
ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p2;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/column_compression_parts.test b/mysql-test/main/column_compression_parts.test
index 9a6f63d0cde..4c77a7308f7 100644
--- a/mysql-test/main/column_compression_parts.test
+++ b/mysql-test/main/column_compression_parts.test
@@ -179,4 +179,4 @@ ALTER TABLE t1 REORGANIZE PARTITION p2 INTO (PARTITION p22 VALUES LESS THAN (MAX
SHOW CREATE TABLE t1;
ALTER TABLE t1 REBUILD PARTITION p22;
-DROP TABLE t1; \ No newline at end of file
+DROP TABLE t1;
diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result
index c52c9edd578..89e10d221d2 100644
--- a/mysql-test/main/connect.result
+++ b/mysql-test/main/connect.result
@@ -1,5 +1,4 @@
SET global secure_auth=0;
-drop table if exists t1,t2;
connect con1,localhost,root,,mysql;
show tables;
Tables_in_mysql
@@ -9,6 +8,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -56,6 +56,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -100,6 +101,14 @@ connect fail_con,localhost,test,zorro,;
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
flush privileges;
+show grants for test@localhost;
+Grants for test@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY PASSWORD '2f27438961437573'
+update mysql.user set plugin='mysql_old_password' where user='test';
+flush privileges;
+show grants for test@localhost;
+Grants for test@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY PASSWORD '2f27438961437573'
connect con10,localhost,test,gambling2,;
connect con5,localhost,test,gambling2,mysql;
set password="";
@@ -114,6 +123,7 @@ db
event
func
general_log
+global_priv_bak
gtid_slave_pos
help_category
help_keyword
@@ -138,6 +148,7 @@ time_zone_transition
time_zone_transition_type
transaction_registry
user
+user_bak
connect con6,localhost,test,gambling3,test;
show tables;
Tables_in_test
@@ -158,7 +169,6 @@ connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
connect fail_con,localhost,test,zorro,;
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
delete from mysql.user where user=_binary"test";
-flush privileges;
connect con7,localhost,root,,test;
create table t1 (id integer not null auto_increment primary key);
create temporary table t2(id integer not null auto_increment primary key);
@@ -358,8 +368,8 @@ update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user
where user like 'mysqltest_up_';
user password plugin authentication_string
-mysqltest_up1 mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
-mysqltest_up2 mysql_old_password 09301740536db389
+mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
+mysqltest_up2 09301740536db389 mysql_old_password 09301740536db389
flush privileges;
connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
select user(), current_user();
@@ -383,7 +393,6 @@ drop table t1;
create table t1 (col1 int);
alter table t1 add via int not null;
drop table t1;
-drop procedure if exists p1;
create procedure p1(x int)
foo: loop
if x = 0 then
diff --git a/mysql-test/main/connect.test b/mysql-test/main/connect.test
index 9bc067f3236..b0461a5afac 100644
--- a/mysql-test/main/connect.test
+++ b/mysql-test/main/connect.test
@@ -14,10 +14,6 @@
SET global secure_auth=0;
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
#connect (con1,localhost,root,,"");
#show tables;
connect (con1,localhost,root,,mysql);
@@ -66,8 +62,13 @@ connect (fail_con,localhost,test,zorro,test2);
connect (fail_con,localhost,test,zorro,);
# check if old password version also works
+source include/switch_to_mysql_user.inc;
update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
flush privileges;
+show grants for test@localhost;
+update mysql.user set plugin='mysql_old_password' where user='test';
+flush privileges;
+show grants for test@localhost;
connect (con10,localhost,test,gambling2,);
connect (con5,localhost,test,gambling2,mysql);
@@ -97,11 +98,10 @@ connect (fail_con,localhost,test,zorro,test2);
--error ER_ACCESS_DENIED_ERROR
connect (fail_con,localhost,test,zorro,);
-
+source include/switch_to_mysql_global_priv.inc;
# remove user 'test' so that other tests which may use 'test'
# do not depend on this test.
delete from mysql.user where user=_binary"test";
-flush privileges;
#
# Bug#12517 Clear user variables and replication events before
@@ -251,11 +251,8 @@ let $wait_condition =
--echo
--echo # -- Waiting for connections to close...
-let $wait_condition =
- SELECT COUNT(*) = 1
- FROM information_schema.processlist
- WHERE db = 'test';
---source include/wait_condition.inc
+let $count_sessions=1;
+--source include/wait_until_count_sessions.inc
--echo
DROP USER mysqltest_u1@localhost;
@@ -406,6 +403,7 @@ connection default;
#
# cannot connect when password is set and plugin=mysql_native_password
#
+source include/switch_to_mysql_user.inc;
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user
@@ -421,13 +419,14 @@ select user(), current_user();
disconnect pcon7;
connection default;
+source include/switch_to_mysql_global_priv.inc;
+
DROP USER mysqltest_up1@'%';
DROP USER mysqltest_up2@'%';
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
-
--echo #
--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
--echo #
@@ -439,10 +438,6 @@ create table t1 (col1 int);
alter table t1 add via int not null;
drop table t1;
---disable_warnings
-drop procedure if exists p1;
---enable_warnings
-
delimiter |;
create procedure p1(x int)
foo: loop
@@ -457,6 +452,4 @@ delimiter ;|
call p1(2);
drop procedure p1;
-
-
SET global secure_auth=default;
diff --git a/mysql-test/main/create-big.result b/mysql-test/main/create-big.result
index d041419443e..fc29b08ffb8 100644
--- a/mysql-test/main/create-big.result
+++ b/mysql-test/main/create-big.result
@@ -237,11 +237,11 @@ select @a;
@a
0
drop table t1;
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
-create table if not exists t1 select 1 as i;;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+create table if not exists t1 select 1 as i;
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
-drop table t1;;
+drop table t1;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
@@ -249,11 +249,11 @@ connection addconroot1;
connection default;
create table t1 (i int);
set @a:=0;
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
-create table if not exists t1 select 1 as i;;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+create table if not exists t1 select 1 as i;
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
-create trigger t1_bi before insert on t1 for each row set @a:=1;;
+create trigger t1_bi before insert on t1 for each row set @a:=1;
connection addconroot2;
set debug_sync='now SIGNAL go';
connection default;
diff --git a/mysql-test/main/create-big.test b/mysql-test/main/create-big.test
index 7f20a8b42af..82a4dd82a32 100644
--- a/mysql-test/main/create-big.test
+++ b/mysql-test/main/create-big.test
@@ -395,11 +395,11 @@ select @a;
drop table t1;
# Concurrent DROP TABLE
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
---send create table if not exists t1 select 1 as i;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+--send create table if not exists t1 select 1 as i
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
---send drop table t1;
+--send drop table t1
connection addconroot2;
# Wait until the above DROP TABLE is blocked due to CREATE TABLE
let $wait_condition=
@@ -417,11 +417,11 @@ connection default;
# Concurrent CREATE TRIGGER
create table t1 (i int);
set @a:=0;
-set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go';
---send create table if not exists t1 select 1 as i;
+set debug_sync='create_table_before_check_if_exists SIGNAL parked WAIT_FOR go';
+--send create table if not exists t1 select 1 as i
connection addconroot1;
set debug_sync='now WAIT_FOR parked';
---send create trigger t1_bi before insert on t1 for each row set @a:=1;
+--send create trigger t1_bi before insert on t1 for each row set @a:=1
connection addconroot2;
# Wait until the above DROP TABLE is blocked due to CREATE TABLE
let $wait_condition=
diff --git a/mysql-test/main/create.result b/mysql-test/main/create.result
index dc34185ad2e..ea9014498e0 100644
--- a/mysql-test/main/create.result
+++ b/mysql-test/main/create.result
@@ -404,7 +404,7 @@ create table t3 like mysqltest.t3;
ERROR 42S01: Table 't3' already exists
create table non_existing_database.t1 like t1;
ERROR 42000: Unknown database 'non_existing_database'
-create table t3 like non_existing_table;
+create table t4 like non_existing_table;
ERROR 42S02: Table 'test.non_existing_table' doesn't exist
create temporary table t3 like t1;
ERROR 42S01: Table 't3' already exists
@@ -914,8 +914,12 @@ unlock tables;
lock table t1 read, t2 read;
create table t2 select * from t1;
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
+create table t3 select * from t1;
+ERROR HY000: Table 't3' was not locked with LOCK TABLES
create table if not exists t2 select * from t1;
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
+create table if not exists t3 select * from t1;
+ERROR HY000: Table 't3' was not locked with LOCK TABLES
unlock tables;
lock table t1 read, t2 write;
create table t2 select * from t1;
@@ -1053,95 +1057,6 @@ USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
-set names utf8;
-create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-database()
-имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
-use test;
-select SCHEMA_NAME from information_schema.schemata
-where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
-SCHEMA_NAME
-имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
-drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
-(
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
-index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
-);
-create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
-select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-select TABLE_NAME from information_schema.tables where
-table_schema='test';
-TABLE_NAME
-имÑ_вью_кодировке_утф8_длиной_больше_чем_42
-имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
-select COLUMN_NAME from information_schema.columns where
-table_schema='test';
-COLUMN_NAME
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-select INDEX_NAME from information_schema.statistics where
-table_schema='test';
-INDEX_NAME
-имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48
-select TABLE_NAME from information_schema.views where
-table_schema='test';
-TABLE_NAME
-имÑ_вью_кодировке_утф8_длиной_больше_чем_42
-show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-Table Create Table
-имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 CREATE TABLE `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` (
- `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL,
- KEY `имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48` (`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-View Create View character_set_client collation_connection
-имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` utf8 utf8_general_ci
-create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
-select TRIGGER_NAME from information_schema.triggers where
-trigger_schema='test';
-TRIGGER_NAME
-имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
-drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
-create trigger
-очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
-drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
-create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
-begin
-end;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-ROUTINE_NAME
-имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50
-drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
-create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
-begin
-end;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
-create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
-returns int
-return 0;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-ROUTINE_NAME
-имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49
-drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
-create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
-returns int
-return 0;
-ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
-drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-set names default;
drop table if exists t1,t2,t3;
drop function if exists f1;
create function f1() returns int
@@ -1249,7 +1164,7 @@ INSERT INTO t3 VALUES (0);
SET sql_mode = TRADITIONAL;
ALTER TABLE t3 ADD INDEX(c1);
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'c1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t3`.`c1` at row 1
# -- Cleanup.
SET sql_mode = '';
@@ -1807,12 +1722,12 @@ NULL 0000-00-00 0000-00-00
drop table t1;
set @@session.sql_mode='STRICT_ALL_TABLES';
create table if not exists t1 (a int, b date, c date) select 1 as b, 2 as c;
-ERROR 22007: Incorrect date value: '1' for column 'b' at row 1
+ERROR 22007: Incorrect date value: '1' for column `test`.`t1`.`b` at row 1
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
create table if not exists t1 (a int, b date, c date)
replace select 1 as b, 2 as c;
-ERROR 22007: Incorrect date value: '1' for column 'b' at row 1
+ERROR 22007: Incorrect date value: '1' for column `test`.`t1`.`b` at row 1
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
create table if not exists t1 (a int, b date, c date)
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index af5c427852c..4bf6ce99504 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -323,7 +323,7 @@ create table t3 like mysqltest.t3;
--error 1049
create table non_existing_database.t1 like t1;
--error ER_NO_SUCH_TABLE
-create table t3 like non_existing_table;
+create table t4 like non_existing_table;
--error 1050
create temporary table t3 like t1;
drop table t1, t2, t3;
@@ -768,7 +768,6 @@ drop table t1;
--error ER_CANT_AGGREGATE_2COLLATIONS
create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin);
-
# Base vs temporary tables dillema (a.k.a. bug#24508 "Inconsistent
# results of CREATE TABLE ... SELECT when temporary table exists").
# In this situation we either have to create non-temporary table and
@@ -776,6 +775,7 @@ create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1
# permanent table. After patch for Bug#47418, we create the base table and
# instert data into it, even though a temporary table exists with the same
# name.
+
create temporary table t1 (j int);
create table if not exists t1 select 1;
select * from t1;
@@ -783,7 +783,6 @@ drop temporary table t1;
select * from t1;
drop table t1;
-
#
# CREATE TABLE ... SELECT and LOCK TABLES
#
@@ -792,6 +791,7 @@ drop table t1;
# the server doesn't crash, hang and produces sensible errors.
# Includes test for bug #20662 "Infinite loop in CREATE TABLE
# IF NOT EXISTS ... SELECT with locked tables".
+
create table t1 (i int);
insert into t1 values (1), (2);
lock tables t1 read;
@@ -812,8 +812,12 @@ unlock tables;
lock table t1 read, t2 read;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
create table t2 select * from t1;
+--error ER_TABLE_NOT_LOCKED
+create table t3 select * from t1;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
create table if not exists t2 select * from t1;
+--error ER_TABLE_NOT_LOCKED
+create table if not exists t3 select * from t1;
unlock tables;
lock table t1 read, t2 write;
--error ER_TABLE_EXISTS_ERROR
@@ -991,87 +995,6 @@ USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
#
-# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
-#
-set names utf8;
-
-create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-select database();
-use test;
-
-select SCHEMA_NAME from information_schema.schemata
-where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
-
-drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
-create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
-(
- имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
- index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
-);
-
-create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
-select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
-from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-
-# database, table, field, key, view
-select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-
---sorted_result
-select TABLE_NAME from information_schema.tables where
-table_schema='test';
-
-select COLUMN_NAME from information_schema.columns where
-table_schema='test';
-
-select INDEX_NAME from information_schema.statistics where
-table_schema='test';
-
-select TABLE_NAME from information_schema.views where
-table_schema='test';
-
-show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-
-create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
-select TRIGGER_NAME from information_schema.triggers where
-trigger_schema='test';
-drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
---error 1059
-create trigger
-очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
-before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
---error 1059
-drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
-
-create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
-begin
-end;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
---error 1059
-create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
-begin
-end;
-
-create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
- returns int
-return 0;
-select ROUTINE_NAME from information_schema.routines where
-routine_schema='test';
-drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
---error 1059
-create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
- returns int
-return 0;
-
-drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
-drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
-set names default;
-
-#
# Bug#21136 CREATE TABLE SELECT within CREATE TABLE SELECT causes server crash
#
diff --git a/mysql-test/main/create_drop_binlog.result b/mysql-test/main/create_drop_binlog.result
index be40fcc140a..b8f8b61c359 100644
--- a/mysql-test/main/create_drop_binlog.result
+++ b/mysql-test/main/create_drop_binlog.result
@@ -322,8 +322,6 @@ Log_name Pos Event_type Server_id End_log_pos Info
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE TABLE t1(a INT, b INT)
# # Gtid 1 # GTID #-#-#
-# # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS t1(a INT, b INT)
-# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE OR REPLACE INDEX i1 ON t1(a)
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE OR REPLACE INDEX i1 ON t1(a)
@@ -377,8 +375,6 @@ Log_name Pos Event_type Server_id End_log_pos Info
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE TABLE t1(a INT, b INT)
# # Gtid 1 # GTID #-#-#
-# # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS t1(a INT, b INT)
-# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE INDEX IF NOT EXISTS i1 ON t1(a)
# # Gtid 1 # GTID #-#-#
# # Query 1 # use `test`; CREATE INDEX IF NOT EXISTS i1 ON t1(a)
diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result
index 54bec5c3f9d..485091e5810 100644
--- a/mysql-test/main/create_or_replace.result
+++ b/mysql-test/main/create_or_replace.result
@@ -257,12 +257,13 @@ drop table if exists test.t1,mysqltest2.t2;
Warnings:
Note 1051 Unknown table 'test.t1'
Note 1051 Unknown table 'mysqltest2.t2'
-create table test.t1 (i int);
+create table test.t1 (i int) engine=myisam;
create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -274,7 +275,8 @@ Tables_in_test
t2
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -289,7 +291,8 @@ create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -301,7 +304,8 @@ Tables_in_test
t2
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
@@ -311,6 +315,31 @@ select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
create table t1 (i int);
drop table t1;
+create table test.t1 (i int) engine=innodb;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+select * from information_schema.metadata_lock_info;
+THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
+unlock tables;
+drop table test.t1,mysqltest2.t2;
+create table test.t1 (i int) engine=aria transactional=1 checksum=1;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+select * from information_schema.metadata_lock_info;
+THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock mysqltest2
+# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock mysqltest2 t2
+# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
+unlock tables;
+drop table t1;
+create table test.t1 (i int);
drop database mysqltest2;
#
# Testing CREATE .. LIKE
@@ -398,28 +427,32 @@ create table t1 (a int);
lock table t1 write, t2 read;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
create or replace table t1 (i int);
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
create or replace table t1 like t2;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
create or replace table t1 select 1 as f1;
select * from information_schema.metadata_lock_info;
THREAD_ID LOCK_MODE LOCK_DURATION LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-# MDL_INTENTION_EXCLUSIVE NULL Global read lock
+# MDL_BACKUP_DDL NULL Backup lock
+# MDL_BACKUP_DML NULL Backup lock
# MDL_INTENTION_EXCLUSIVE NULL Schema metadata lock test
# MDL_SHARED_NO_READ_WRITE NULL Table metadata lock test t1
# MDL_SHARED_READ NULL Table metadata lock test t2
diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test
index 4b167663742..1b4994e811f 100644
--- a/mysql-test/main/create_or_replace.test
+++ b/mysql-test/main/create_or_replace.test
@@ -210,7 +210,7 @@ drop table t1,t3,t4;
create database mysqltest2;
drop table if exists test.t1,mysqltest2.t2;
-create table test.t1 (i int);
+create table test.t1 (i int) engine=myisam;
create table mysqltest2.t2 like test.t1;
lock table test.t1 write, mysqltest2.t2 write;
--replace_column 1 #
@@ -249,6 +249,26 @@ create or replace table mysqltest2.t2 (a int) select 1 as 'a', 2 as 'a';
select * from information_schema.metadata_lock_info;
create table t1 (i int);
drop table t1;
+
+create table test.t1 (i int) engine=innodb;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+--replace_column 1 #
+--sorted_result
+select * from information_schema.metadata_lock_info;
+unlock tables;
+drop table test.t1,mysqltest2.t2;
+
+create table test.t1 (i int) engine=aria transactional=1 checksum=1;
+create table mysqltest2.t2 like test.t1;
+lock table test.t1 write, mysqltest2.t2 write;
+--replace_column 1 #
+--sorted_result
+select * from information_schema.metadata_lock_info;
+unlock tables;
+drop table t1;
+
+create table test.t1 (i int);
drop database mysqltest2;
--echo #
diff --git a/mysql-test/main/create_user.result b/mysql-test/main/create_user.result
index bd10c6aba3b..8bd0ca88335 100644
--- a/mysql-test/main/create_user.result
+++ b/mysql-test/main/create_user.result
@@ -6,45 +6,45 @@ drop user foo;
create user foo identified by 'password';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require SSL;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require X509;
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require ISSUER 'issuer';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require SUBJECT 'subject';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'
SUBJECT 'subject';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject'
AND ISSUER 'issuer';
select * from mysql.user where user = 'foo';
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
-% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
+% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000
drop user foo;
create user foo, foo2 identified by 'password' require CIPHER 'cipher'
AND SUBJECT 'subject'
diff --git a/mysql-test/main/create_utf8.result b/mysql-test/main/create_utf8.result
new file mode 100644
index 00000000000..e1ccf7a08d7
--- /dev/null
+++ b/mysql-test/main/create_utf8.result
@@ -0,0 +1,89 @@
+set names utf8;
+create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+select database();
+database()
+имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
+use test;
+select SCHEMA_NAME from information_schema.schemata
+where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
+SCHEMA_NAME
+имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45
+drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
+(
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
+index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
+);
+create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
+select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+select TABLE_NAME from information_schema.tables where
+table_schema='test';
+TABLE_NAME
+имÑ_вью_кодировке_утф8_длиной_больше_чем_42
+имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
+select COLUMN_NAME from information_schema.columns where
+table_schema='test';
+COLUMN_NAME
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+select INDEX_NAME from information_schema.statistics where
+table_schema='test';
+INDEX_NAME
+имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48
+select TABLE_NAME from information_schema.views where
+table_schema='test';
+TABLE_NAME
+имÑ_вью_кодировке_утф8_длиной_больше_чем_42
+show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+Table Create Table
+имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 CREATE TABLE `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` (
+ `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL,
+ KEY `имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48` (`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+View Create View character_set_client collation_connection
+имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` utf8 utf8_general_ci
+create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+select TRIGGER_NAME from information_schema.triggers where
+trigger_schema='test';
+TRIGGER_NAME
+имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
+drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
+create trigger
+очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
+drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
+create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
+begin
+end;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+ROUTINE_NAME
+имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50
+drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
+create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+begin
+end;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
+create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
+returns int
+return 0;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+ROUTINE_NAME
+имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49
+drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
+create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+returns int
+return 0;
+ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long
+drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+set names default;
diff --git a/mysql-test/main/create_utf8.test b/mysql-test/main/create_utf8.test
new file mode 100644
index 00000000000..40e814834bc
--- /dev/null
+++ b/mysql-test/main/create_utf8.test
@@ -0,0 +1,80 @@
+#
+# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
+#
+set names utf8;
+
+create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+select database();
+use test;
+
+select SCHEMA_NAME from information_schema.schemata
+where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45';
+
+drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45;
+create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48
+(
+ имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int,
+ index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45)
+);
+
+create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as
+select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45
+from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+
+# database, table, field, key, view
+select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+
+--sorted_result
+select TABLE_NAME from information_schema.tables where
+table_schema='test';
+
+select COLUMN_NAME from information_schema.columns where
+table_schema='test';
+
+select INDEX_NAME from information_schema.statistics where
+table_schema='test';
+
+select TABLE_NAME from information_schema.views where
+table_schema='test';
+
+show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+
+create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+select TRIGGER_NAME from information_schema.triggers where
+trigger_schema='test';
+drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49;
+--error 1059
+create trigger
+очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66
+before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
+--error 1059
+drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66;
+
+create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
+begin
+end;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
+--error 1059
+create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+begin
+end;
+
+create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49()
+ returns int
+return 0;
+select ROUTINE_NAME from information_schema.routines where
+routine_schema='test';
+drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49;
+--error 1059
+create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66()
+ returns int
+return 0;
+
+drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42;
+drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48;
+set names default;
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result
index 9e934b19efc..f2ae9929145 100644
--- a/mysql-test/main/cte_recursive.result
+++ b/mysql-test/main/cte_recursive.result
@@ -1608,6 +1608,44 @@ id name dob father mother
8 Grandpa Ben 1940-10-21 NULL NULL
6 Grandgrandma Martha 1923-05-17 NULL NULL
drop table my_ancestors;
+WITH RECURSIVE
+positions(i) AS (
+VALUES(0)
+UNION SELECT ALL
+i+1 FROM positions WHERE i < 4*4-1
+),
+solutions(board, n_queens) AS (
+SELECT REPEAT('-', 4*4), 0
+FROM positions
+UNION
+SELECT
+concat(substr(board, 1, i),'*',substr(board, i+2)),n_queens + 1 AS n_queens
+FROM positions AS ps, solutions
+WHERE n_queens < 4
+AND substr(board,1,i) != '*'
+ AND NOT EXISTS (
+SELECT 1 FROM positions WHERE
+substr(board,i+1,1) = '*' AND
+(
+i % 4 = ps.i % 4 OR
+i div 4 = ps.i div 4 OR
+i div 4 + (i % 4) = ps.i div 4 + (ps.i % 4) OR
+i div 4 - (i % 4) = ps.i div 4 - (ps.i % 4)
+)
+)
+)
+SELECT regexp_replace(board,concat('(',REPEAT('.', 4),')'),'\\1\n') n_queens FROM solutions WHERE n_queens = 4;
+n_queens
+-*--
+---*
+*---
+--*-
+
+--*-
+*---
+---*
+-*--
+
#
# MDEV-10883: execution of prepared statement from SELECT
# with recursive CTE that renames columns
@@ -3606,6 +3644,54 @@ Mandelbrot Set
..............................................................................
...........................................................................
........................................................................
+#
+# MDEV-17871: EXPLAIN for query with not used recursive cte
+#
+create table t1 (a int);
+insert into t1 values (2), (1), (4), (3);
+explain extended
+with recursive cte as
+(select * from t1 where a=1 union select a+1 from cte where a<3)
+select * from cte as t;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 100.00
+2 DERIVED t1 ALL NULL NULL NULL NULL 4 100.00 Using where
+3 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 4 100.00 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 with recursive cte as (/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union /* select#3 */ select `cte`.`a` + 1 AS `a+1` from `cte` where `cte`.`a` < 3)/* select#1 */ select `t`.`a` AS `a` from `cte` `t`
+with recursive cte as
+(select * from t1 where a=1 union select a+1 from cte where a<3)
+select * from cte as t;
+a
+1
+2
+3
+explain extended
+with recursive cte as
+(select * from t1 where a=1 union select a+1 from cte where a<3)
+select * from t1 as t;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 4 100.00
+Warnings:
+Note 1003 with recursive cte as (/* select#2 */ select `*` AS `*` from `test`.`t1` where `a` = 1 union /* select#3 */ select `a` + 1 AS `a+1` from `cte` where `a` < 3)/* select#1 */ select `test`.`t`.`a` AS `a` from `test`.`t1` `t`
+with recursive cte as
+(select * from t1 where a=1 union select a+1 from cte where a<3)
+select * from t1 as t;
+a
+2
+1
+4
+3
+create table t2 ( i1 int, i2 int);
+insert into t2 values (1,1),(2,2);
+explain
+with recursive cte as
+( select * from t1 union select s1.* from t1 as s1, cte where s1.i1 = cte.i2 )
+select * from t1 as t;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 4
+drop table t1,t2;
# End of 10.2 tests
#
# MDEV-14217 [db crash] Recursive CTE when SELECT includes new field
diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test
index 79809044c00..483e1ea8c7a 100644
--- a/mysql-test/main/cte_recursive.test
+++ b/mysql-test/main/cte_recursive.test
@@ -1200,6 +1200,40 @@ select * from my_ancestors;
drop table my_ancestors;
+#
+# MDEV-17967 Add a solution of the 8 queens problem to the regression test for CTE
+#
+# adapted to MariaDB from https://rosettacode.org/wiki/N-queens_problem#SQL
+#
+let $N=4; # 8 takes too long for a test
+eval WITH RECURSIVE
+ positions(i) AS (
+ VALUES(0)
+ UNION SELECT ALL
+ i+1 FROM positions WHERE i < $N*$N-1
+ ),
+ solutions(board, n_queens) AS (
+ SELECT REPEAT('-', $N*$N), 0
+ FROM positions
+ UNION
+ SELECT
+ concat(substr(board, 1, i),'*',substr(board, i+2)),n_queens + 1 AS n_queens
+ FROM positions AS ps, solutions
+ WHERE n_queens < $N
+ AND substr(board,1,i) != '*'
+ AND NOT EXISTS (
+ SELECT 1 FROM positions WHERE
+ substr(board,i+1,1) = '*' AND
+ (
+ i % $N = ps.i % $N OR
+ i div $N = ps.i div $N OR
+ i div $N + (i % $N) = ps.i div $N + (ps.i % $N) OR
+ i div $N - (i % $N) = ps.i div $N - (ps.i % $N)
+ )
+ )
+ )
+SELECT regexp_replace(board,concat('(',REPEAT('.', $N),')'),'\\\\1\\n') n_queens FROM solutions WHERE n_queens = $N;
+
--echo #
--echo # MDEV-10883: execution of prepared statement from SELECT
--echo # with recursive CTE that renames columns
@@ -2496,6 +2530,45 @@ SELECT GROUP_CONCAT(
GROUP BY Iy
ORDER BY Iy;
+--echo #
+--echo # MDEV-17871: EXPLAIN for query with not used recursive cte
+--echo #
+
+create table t1 (a int);
+insert into t1 values (2), (1), (4), (3);
+
+let $rec_cte =
+with recursive cte as
+ (select * from t1 where a=1 union select a+1 from cte where a<3);
+
+eval
+explain extended
+$rec_cte
+select * from cte as t;
+
+eval
+$rec_cte
+select * from cte as t;
+
+eval
+explain extended
+$rec_cte
+select * from t1 as t;
+
+eval
+$rec_cte
+select * from t1 as t;
+
+create table t2 ( i1 int, i2 int);
+insert into t2 values (1,1),(2,2);
+
+explain
+with recursive cte as
+ ( select * from t1 union select s1.* from t1 as s1, cte where s1.i1 = cte.i2 )
+select * from t1 as t;
+
+drop table t1,t2;
+
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/ctype_big5.result b/mysql-test/main/ctype_big5.result
index 2db4da51667..f61fc4c8400 100644
--- a/mysql-test/main/ctype_big5.result
+++ b/mysql-test/main/ctype_big5.result
@@ -565,70 +565,70 @@ COUNT(*)
28672
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'?';
COUNT(*)
13973
diff --git a/mysql-test/main/ctype_cp932_binlog_stm.result b/mysql-test/main/ctype_cp932_binlog_stm.result
index f49400b63ff..089820d628a 100644
--- a/mysql-test/main/ctype_cp932_binlog_stm.result
+++ b/mysql-test/main/ctype_cp932_binlog_stm.result
@@ -98,70 +98,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1;
COUNT(*)
14623
diff --git a/mysql-test/main/ctype_eucjpms.result b/mysql-test/main/ctype_eucjpms.result
index 507d0021a1f..be341cc7e68 100644
--- a/mysql-test/main/ctype_eucjpms.result
+++ b/mysql-test/main/ctype_eucjpms.result
@@ -10042,70 +10042,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1;
COUNT(*)
56959
diff --git a/mysql-test/main/ctype_euckr.result b/mysql-test/main/ctype_euckr.result
index cc50ddd20be..3006e77412a 100644
--- a/mysql-test/main/ctype_euckr.result
+++ b/mysql-test/main/ctype_euckr.result
@@ -389,22 +389,22 @@ insert into t1 values (0xA181);
insert into t1 values (0xA1FE);
insert ignore into t1 values (0xA140);
Warnings:
-Warning 1366 Incorrect string value: '\xA1@' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xA1@' for column `test`.`t1`.`s1` at row 1
insert ignore into t1 values (0xA15B);
Warnings:
-Warning 1366 Incorrect string value: '\xA1[' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xA1[' for column `test`.`t1`.`s1` at row 1
insert ignore into t1 values (0xA160);
Warnings:
-Warning 1366 Incorrect string value: '\xA1`' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xA1`' for column `test`.`t1`.`s1` at row 1
insert ignore into t1 values (0xA17B);
Warnings:
-Warning 1366 Incorrect string value: '\xA1{' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xA1{' for column `test`.`t1`.`s1` at row 1
insert ignore into t1 values (0xA180);
Warnings:
-Warning 1366 Incorrect string value: '\xA1\x80' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xA1\x80' for column `test`.`t1`.`s1` at row 1
insert ignore into t1 values (0xA1FF);
Warnings:
-Warning 1366 Incorrect string value: '\xA1\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xA1\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
hex(s1) hex(convert(s1 using utf8))
3F3F 3F3F
@@ -24428,70 +24428,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'?';
COUNT(*)
22428
diff --git a/mysql-test/main/ctype_gb2312.result b/mysql-test/main/ctype_gb2312.result
index c3c2eee9b1c..8a0950caea8 100644
--- a/mysql-test/main/ctype_gb2312.result
+++ b/mysql-test/main/ctype_gb2312.result
@@ -489,70 +489,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'?';
COUNT(*)
8178
diff --git a/mysql-test/main/ctype_gbk.result b/mysql-test/main/ctype_gbk.result
index 4515b9fbdbf..9bf69584725 100644
--- a/mysql-test/main/ctype_gbk.result
+++ b/mysql-test/main/ctype_gbk.result
@@ -515,70 +515,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'?';
COUNT(*)
23940
@@ -5196,25 +5196,25 @@ INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE type1='tail' OR type1='bad' OR type2='bad'
ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\x80@' for column 'c' at row 2
-Warning 1366 Incorrect string value: '\x80\x80' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\x80\x81' for column 'c' at row 4
-Warning 1366 Incorrect string value: '\x80\xA1@' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\x80\xFE@' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\x80\xFF' for column 'c' at row 8
-Warning 1366 Incorrect string value: '\x81\xFF' for column 'c' at row 9
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 10
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 11
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 12
-Warning 1366 Incorrect string value: '\xFF@' for column 'c' at row 13
-Warning 1366 Incorrect string value: '\xFF\x80' for column 'c' at row 14
-Warning 1366 Incorrect string value: '\xFF\x81' for column 'c' at row 15
-Warning 1366 Incorrect string value: '\xFF\xA1@' for column 'c' at row 16
-Warning 1366 Incorrect string value: '\xFF\xA1\xA3' for column 'c' at row 17
-Warning 1366 Incorrect string value: '\xFF\xFE@' for column 'c' at row 18
-Warning 1366 Incorrect string value: '\xFF\xFF' for column 'c' at row 19
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t3`.`c` at row 2
+Warning 1366 Incorrect string value: '\x80\x80' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\x80\x81' for column `test`.`t3`.`c` at row 4
+Warning 1366 Incorrect string value: '\x80\xA1@' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\x80\xFE@' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\x80\xFF' for column `test`.`t3`.`c` at row 8
+Warning 1366 Incorrect string value: '\x81\xFF' for column `test`.`t3`.`c` at row 9
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 10
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 11
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 12
+Warning 1366 Incorrect string value: '\xFF@' for column `test`.`t3`.`c` at row 13
+Warning 1366 Incorrect string value: '\xFF\x80' for column `test`.`t3`.`c` at row 14
+Warning 1366 Incorrect string value: '\xFF\x81' for column `test`.`t3`.`c` at row 15
+Warning 1366 Incorrect string value: '\xFF\xA1@' for column `test`.`t3`.`c` at row 16
+Warning 1366 Incorrect string value: '\xFF\xA1\xA3' for column `test`.`t3`.`c` at row 17
+Warning 1366 Incorrect string value: '\xFF\xFE@' for column `test`.`t3`.`c` at row 18
+Warning 1366 Incorrect string value: '\xFF\xFF' for column `test`.`t3`.`c` at row 19
SELECT COUNT(*) FROM t3;
COUNT(*)
19
@@ -5252,14 +5252,14 @@ WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1))
AND (FIND_IN_SET('tail',type2) AND NOT FIND_IN_SET('ascii',type2))
ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 2
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 4
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 8
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 2
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 4
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 8
SELECT COUNT(*) FROM t3;
COUNT(*)
8
@@ -5282,7 +5282,7 @@ DELETE FROM t3;
#
INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 5
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t3`.`c` at row 5
SELECT COUNT(*) FROM t3;
COUNT(*)
6
@@ -5405,70 +5405,70 @@ INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE type1='tail' OR type1='bad' OR type2='bad' OR type3='bad'
ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\x80\xFF' for column 'c' at row 2
-Warning 1366 Incorrect string value: '\x81\xFF' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 4
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\xFF@' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\xFF\x80' for column 'c' at row 8
-Warning 1366 Incorrect string value: '\xFF\x81' for column 'c' at row 9
-Warning 1366 Incorrect string value: '\xFF\xA1@' for column 'c' at row 10
-Warning 1366 Incorrect string value: '\xFF\xA1\xA3' for column 'c' at row 11
-Warning 1366 Incorrect string value: '\xFF\xFE@' for column 'c' at row 12
-Warning 1366 Incorrect string value: '\xFF\xFF' for column 'c' at row 13
-Warning 1366 Incorrect string value: '\x80@@' for column 'c' at row 14
-Warning 1366 Incorrect string value: '\x80@\x80' for column 'c' at row 15
-Warning 1366 Incorrect string value: '\x80@\x81' for column 'c' at row 16
-Warning 1366 Incorrect string value: '\x80@\xA1@' for column 'c' at row 17
-Warning 1366 Incorrect string value: '\x80@\xA1\xA3' for column 'c' at row 18
-Warning 1366 Incorrect string value: '\x80@\xFE@' for column 'c' at row 19
-Warning 1366 Incorrect string value: '\x80@\xFF' for column 'c' at row 20
-Warning 1366 Incorrect string value: '\x80\x80@' for column 'c' at row 21
-Warning 1366 Incorrect string value: '\x80\x80\x80' for column 'c' at row 22
-Warning 1366 Incorrect string value: '\x80\x80\x81' for column 'c' at row 23
-Warning 1366 Incorrect string value: '\x80\x80\xA1@' for column 'c' at row 24
-Warning 1366 Incorrect string value: '\x80\x80\xA1\xA3' for column 'c' at row 25
-Warning 1366 Incorrect string value: '\x80\x80\xFE@' for column 'c' at row 26
-Warning 1366 Incorrect string value: '\x80\x80\xFF' for column 'c' at row 27
-Warning 1366 Incorrect string value: '\x80\x81@' for column 'c' at row 28
-Warning 1366 Incorrect string value: '\x80\x81\x80' for column 'c' at row 29
-Warning 1366 Incorrect string value: '\x80\x81\x81' for column 'c' at row 30
-Warning 1366 Incorrect string value: '\x80\x81\xA1@' for column 'c' at row 31
-Warning 1366 Incorrect string value: '\x80\x81\xA1\xA3' for column 'c' at row 32
-Warning 1366 Incorrect string value: '\x80\x81\xFE@' for column 'c' at row 33
-Warning 1366 Incorrect string value: '\x80\x81\xFF' for column 'c' at row 34
-Warning 1366 Incorrect string value: '\x80\xA1@@' for column 'c' at row 35
-Warning 1366 Incorrect string value: '\x80\xA1@\x80' for column 'c' at row 36
-Warning 1366 Incorrect string value: '\x80\xA1@\x81' for column 'c' at row 37
-Warning 1366 Incorrect string value: '\x80\xA1@\xA1@' for column 'c' at row 38
-Warning 1366 Incorrect string value: '\x80\xA1@\xA1\xA3' for column 'c' at row 39
-Warning 1366 Incorrect string value: '\x80\xA1@\xFE@' for column 'c' at row 40
-Warning 1366 Incorrect string value: '\x80\xA1@\xFF' for column 'c' at row 41
-Warning 1366 Incorrect string value: '\x80\xA1\xA3@' for column 'c' at row 42
-Warning 1366 Incorrect string value: '\x80\xA1\xA3\x80' for column 'c' at row 43
-Warning 1366 Incorrect string value: '\x80\xA1\xA3\x81' for column 'c' at row 44
-Warning 1366 Incorrect string value: '\x80\xA1\xA3\xA1@' for column 'c' at row 45
-Warning 1366 Incorrect string value: '\x80\xA1\xA3\xA1\xA3' for column 'c' at row 46
-Warning 1366 Incorrect string value: '\x80\xA1\xA3\xFE@' for column 'c' at row 47
-Warning 1366 Incorrect string value: '\x80\xA1\xA3\xFF' for column 'c' at row 48
-Warning 1366 Incorrect string value: '\x80\xFE@@' for column 'c' at row 49
-Warning 1366 Incorrect string value: '\x80\xFE@\x80' for column 'c' at row 50
-Warning 1366 Incorrect string value: '\x80\xFE@\x81' for column 'c' at row 51
-Warning 1366 Incorrect string value: '\x80\xFE@\xA1@' for column 'c' at row 52
-Warning 1366 Incorrect string value: '\x80\xFE@\xA1\xA3' for column 'c' at row 53
-Warning 1366 Incorrect string value: '\x80\xFE@\xFE@' for column 'c' at row 54
-Warning 1366 Incorrect string value: '\x80\xFE@\xFF' for column 'c' at row 55
-Warning 1366 Incorrect string value: '\x80\xFF@' for column 'c' at row 56
-Warning 1366 Incorrect string value: '\x80\xFF\x80' for column 'c' at row 57
-Warning 1366 Incorrect string value: '\x80\xFF\x81' for column 'c' at row 58
-Warning 1366 Incorrect string value: '\x80\xFF\xA1@' for column 'c' at row 59
-Warning 1366 Incorrect string value: '\x80\xFF\xA1\xA3' for column 'c' at row 60
-Warning 1366 Incorrect string value: '\x80\xFF\xFE@' for column 'c' at row 61
-Warning 1366 Incorrect string value: '\x80\xFF\xFF' for column 'c' at row 62
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 63
-Warning 1366 Incorrect string value: '\xFF' for column 'c' at row 64
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\x80\xFF' for column `test`.`t3`.`c` at row 2
+Warning 1366 Incorrect string value: '\x81\xFF' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 4
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\xFF@' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\xFF\x80' for column `test`.`t3`.`c` at row 8
+Warning 1366 Incorrect string value: '\xFF\x81' for column `test`.`t3`.`c` at row 9
+Warning 1366 Incorrect string value: '\xFF\xA1@' for column `test`.`t3`.`c` at row 10
+Warning 1366 Incorrect string value: '\xFF\xA1\xA3' for column `test`.`t3`.`c` at row 11
+Warning 1366 Incorrect string value: '\xFF\xFE@' for column `test`.`t3`.`c` at row 12
+Warning 1366 Incorrect string value: '\xFF\xFF' for column `test`.`t3`.`c` at row 13
+Warning 1366 Incorrect string value: '\x80@@' for column `test`.`t3`.`c` at row 14
+Warning 1366 Incorrect string value: '\x80@\x80' for column `test`.`t3`.`c` at row 15
+Warning 1366 Incorrect string value: '\x80@\x81' for column `test`.`t3`.`c` at row 16
+Warning 1366 Incorrect string value: '\x80@\xA1@' for column `test`.`t3`.`c` at row 17
+Warning 1366 Incorrect string value: '\x80@\xA1\xA3' for column `test`.`t3`.`c` at row 18
+Warning 1366 Incorrect string value: '\x80@\xFE@' for column `test`.`t3`.`c` at row 19
+Warning 1366 Incorrect string value: '\x80@\xFF' for column `test`.`t3`.`c` at row 20
+Warning 1366 Incorrect string value: '\x80\x80@' for column `test`.`t3`.`c` at row 21
+Warning 1366 Incorrect string value: '\x80\x80\x80' for column `test`.`t3`.`c` at row 22
+Warning 1366 Incorrect string value: '\x80\x80\x81' for column `test`.`t3`.`c` at row 23
+Warning 1366 Incorrect string value: '\x80\x80\xA1@' for column `test`.`t3`.`c` at row 24
+Warning 1366 Incorrect string value: '\x80\x80\xA1\xA3' for column `test`.`t3`.`c` at row 25
+Warning 1366 Incorrect string value: '\x80\x80\xFE@' for column `test`.`t3`.`c` at row 26
+Warning 1366 Incorrect string value: '\x80\x80\xFF' for column `test`.`t3`.`c` at row 27
+Warning 1366 Incorrect string value: '\x80\x81@' for column `test`.`t3`.`c` at row 28
+Warning 1366 Incorrect string value: '\x80\x81\x80' for column `test`.`t3`.`c` at row 29
+Warning 1366 Incorrect string value: '\x80\x81\x81' for column `test`.`t3`.`c` at row 30
+Warning 1366 Incorrect string value: '\x80\x81\xA1@' for column `test`.`t3`.`c` at row 31
+Warning 1366 Incorrect string value: '\x80\x81\xA1\xA3' for column `test`.`t3`.`c` at row 32
+Warning 1366 Incorrect string value: '\x80\x81\xFE@' for column `test`.`t3`.`c` at row 33
+Warning 1366 Incorrect string value: '\x80\x81\xFF' for column `test`.`t3`.`c` at row 34
+Warning 1366 Incorrect string value: '\x80\xA1@@' for column `test`.`t3`.`c` at row 35
+Warning 1366 Incorrect string value: '\x80\xA1@\x80' for column `test`.`t3`.`c` at row 36
+Warning 1366 Incorrect string value: '\x80\xA1@\x81' for column `test`.`t3`.`c` at row 37
+Warning 1366 Incorrect string value: '\x80\xA1@\xA1@' for column `test`.`t3`.`c` at row 38
+Warning 1366 Incorrect string value: '\x80\xA1@\xA1\xA3' for column `test`.`t3`.`c` at row 39
+Warning 1366 Incorrect string value: '\x80\xA1@\xFE@' for column `test`.`t3`.`c` at row 40
+Warning 1366 Incorrect string value: '\x80\xA1@\xFF' for column `test`.`t3`.`c` at row 41
+Warning 1366 Incorrect string value: '\x80\xA1\xA3@' for column `test`.`t3`.`c` at row 42
+Warning 1366 Incorrect string value: '\x80\xA1\xA3\x80' for column `test`.`t3`.`c` at row 43
+Warning 1366 Incorrect string value: '\x80\xA1\xA3\x81' for column `test`.`t3`.`c` at row 44
+Warning 1366 Incorrect string value: '\x80\xA1\xA3\xA1@' for column `test`.`t3`.`c` at row 45
+Warning 1366 Incorrect string value: '\x80\xA1\xA3\xA1\xA3' for column `test`.`t3`.`c` at row 46
+Warning 1366 Incorrect string value: '\x80\xA1\xA3\xFE@' for column `test`.`t3`.`c` at row 47
+Warning 1366 Incorrect string value: '\x80\xA1\xA3\xFF' for column `test`.`t3`.`c` at row 48
+Warning 1366 Incorrect string value: '\x80\xFE@@' for column `test`.`t3`.`c` at row 49
+Warning 1366 Incorrect string value: '\x80\xFE@\x80' for column `test`.`t3`.`c` at row 50
+Warning 1366 Incorrect string value: '\x80\xFE@\x81' for column `test`.`t3`.`c` at row 51
+Warning 1366 Incorrect string value: '\x80\xFE@\xA1@' for column `test`.`t3`.`c` at row 52
+Warning 1366 Incorrect string value: '\x80\xFE@\xA1\xA3' for column `test`.`t3`.`c` at row 53
+Warning 1366 Incorrect string value: '\x80\xFE@\xFE@' for column `test`.`t3`.`c` at row 54
+Warning 1366 Incorrect string value: '\x80\xFE@\xFF' for column `test`.`t3`.`c` at row 55
+Warning 1366 Incorrect string value: '\x80\xFF@' for column `test`.`t3`.`c` at row 56
+Warning 1366 Incorrect string value: '\x80\xFF\x80' for column `test`.`t3`.`c` at row 57
+Warning 1366 Incorrect string value: '\x80\xFF\x81' for column `test`.`t3`.`c` at row 58
+Warning 1366 Incorrect string value: '\x80\xFF\xA1@' for column `test`.`t3`.`c` at row 59
+Warning 1366 Incorrect string value: '\x80\xFF\xA1\xA3' for column `test`.`t3`.`c` at row 60
+Warning 1366 Incorrect string value: '\x80\xFF\xFE@' for column `test`.`t3`.`c` at row 61
+Warning 1366 Incorrect string value: '\x80\xFF\xFF' for column `test`.`t3`.`c` at row 62
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 63
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t3`.`c` at row 64
SELECT COUNT(*) FROM t3;
COUNT(*)
163
@@ -5650,30 +5650,30 @@ WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1))
AND type2='tail'
ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\x80@' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\x80\x80' for column 'c' at row 2
-Warning 1366 Incorrect string value: '\x80\x81' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\x80\xA1@' for column 'c' at row 4
-Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\x80\xFE@' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\x80@' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\x80\x80' for column 'c' at row 8
-Warning 1366 Incorrect string value: '\x80\x81' for column 'c' at row 9
-Warning 1366 Incorrect string value: '\x80\xA1@' for column 'c' at row 10
-Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column 'c' at row 11
-Warning 1366 Incorrect string value: '\x80\xFE@' for column 'c' at row 12
-Warning 1366 Incorrect string value: '\x80@' for column 'c' at row 13
-Warning 1366 Incorrect string value: '\x80\x80' for column 'c' at row 14
-Warning 1366 Incorrect string value: '\x80\x81' for column 'c' at row 15
-Warning 1366 Incorrect string value: '\x80\xA1@' for column 'c' at row 16
-Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column 'c' at row 17
-Warning 1366 Incorrect string value: '\x80\xFE@' for column 'c' at row 18
-Warning 1366 Incorrect string value: '\x80@' for column 'c' at row 19
-Warning 1366 Incorrect string value: '\x80\x80' for column 'c' at row 20
-Warning 1366 Incorrect string value: '\x80\x81' for column 'c' at row 21
-Warning 1366 Incorrect string value: '\x80\xA1@' for column 'c' at row 22
-Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column 'c' at row 23
-Warning 1366 Incorrect string value: '\x80\xFE@' for column 'c' at row 24
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\x80\x80' for column `test`.`t3`.`c` at row 2
+Warning 1366 Incorrect string value: '\x80\x81' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\x80\xA1@' for column `test`.`t3`.`c` at row 4
+Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\x80\xFE@' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\x80\x80' for column `test`.`t3`.`c` at row 8
+Warning 1366 Incorrect string value: '\x80\x81' for column `test`.`t3`.`c` at row 9
+Warning 1366 Incorrect string value: '\x80\xA1@' for column `test`.`t3`.`c` at row 10
+Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column `test`.`t3`.`c` at row 11
+Warning 1366 Incorrect string value: '\x80\xFE@' for column `test`.`t3`.`c` at row 12
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t3`.`c` at row 13
+Warning 1366 Incorrect string value: '\x80\x80' for column `test`.`t3`.`c` at row 14
+Warning 1366 Incorrect string value: '\x80\x81' for column `test`.`t3`.`c` at row 15
+Warning 1366 Incorrect string value: '\x80\xA1@' for column `test`.`t3`.`c` at row 16
+Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column `test`.`t3`.`c` at row 17
+Warning 1366 Incorrect string value: '\x80\xFE@' for column `test`.`t3`.`c` at row 18
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t3`.`c` at row 19
+Warning 1366 Incorrect string value: '\x80\x80' for column `test`.`t3`.`c` at row 20
+Warning 1366 Incorrect string value: '\x80\x81' for column `test`.`t3`.`c` at row 21
+Warning 1366 Incorrect string value: '\x80\xA1@' for column `test`.`t3`.`c` at row 22
+Warning 1366 Incorrect string value: '\x80\xA1\xA3' for column `test`.`t3`.`c` at row 23
+Warning 1366 Incorrect string value: '\x80\xFE@' for column `test`.`t3`.`c` at row 24
SELECT COUNT(*) FROM t3;
COUNT(*)
24
@@ -5717,22 +5717,22 @@ WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND
type3='tail'
ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 2
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 4
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 8
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 9
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 10
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 11
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 12
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 13
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 14
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 15
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 16
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 2
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 4
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 8
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 9
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 10
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 11
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 12
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 13
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 14
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 15
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 16
SELECT COUNT(*) FROM t3;
COUNT(*)
16
@@ -5768,15 +5768,15 @@ AND NOT FIND_IN_SET('ascii',type3)
AND NOT FIND_IN_SET('mb2',type3)
ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 2
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 4
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 8
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 9
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 2
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 4
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 8
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 9
SELECT COUNT(*) FROM t3;
COUNT(*)
9
@@ -5852,28 +5852,28 @@ DELETE FROM t2 WHERE b IN (SELECT b FROM t3);
DELETE FROM t3;
INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b;
Warnings:
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 1
-Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 3
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 5
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 6
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 7
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 9
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 10
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 12
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 13
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 15
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 16
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 18
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 19
-Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 27
-Warning 1366 Incorrect string value: '\x80' for column 'c' at row 30
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 31
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 35
-Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 37
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 39
-Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 41
-Warning 1366 Incorrect string value: '\x81' for column 'c' at row 43
-Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 45
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 1
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t3`.`c` at row 3
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 5
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 6
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 7
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 9
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 10
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 12
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 13
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 15
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 16
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 18
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 19
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t3`.`c` at row 27
+Warning 1366 Incorrect string value: '\x80' for column `test`.`t3`.`c` at row 30
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 31
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 35
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t3`.`c` at row 37
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 39
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t3`.`c` at row 41
+Warning 1366 Incorrect string value: '\x81' for column `test`.`t3`.`c` at row 43
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t3`.`c` at row 45
SELECT COUNT(*) FROM t3;
COUNT(*)
46
diff --git a/mysql-test/main/ctype_latin1.result b/mysql-test/main/ctype_latin1.result
index 8098a07375a..59a706a7fd8 100644
--- a/mysql-test/main/ctype_latin1.result
+++ b/mysql-test/main/ctype_latin1.result
@@ -7987,12 +7987,12 @@ SET NAMES utf8;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1);
INSERT IGNORE INTO t1 VALUES ('Â'),('Â#');
Warnings:
-Warning 1366 Incorrect string value: '\xC2' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\xC2#' for column 'a' at row 2
+Warning 1366 Incorrect string value: '\xC2' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\xC2#' for column `test`.`t1`.`a` at row 2
SHOW WARNINGS;
Level Code Message
-Warning 1366 Incorrect string value: '\xC2' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\xC2#' for column 'a' at row 2
+Warning 1366 Incorrect string value: '\xC2' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\xC2#' for column `test`.`t1`.`a` at row 2
SELECT HEX(a),a FROM t1;
HEX(a) a
3F ?
diff --git a/mysql-test/main/ctype_many.result b/mysql-test/main/ctype_many.result
index d73a478b0c0..25802af4b5d 100644
--- a/mysql-test/main/ctype_many.result
+++ b/mysql-test/main/ctype_many.result
@@ -1767,8 +1767,8 @@ CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET ucs2);
INSERT INTO t1 VALUES (0x10082), (0x12345);
INSERT IGNORE INTO t2 SELECT * FROM t1;
Warnings:
-Warning 1366 Incorrect string value: '\x00\x01\x00\x82' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x00\x01\x23\x45' for column 'a' at row 2
+Warning 1366 Incorrect string value: '\x00\x01\x00\x82' for column `test`.`t2`.`a` at row 1
+Warning 1366 Incorrect string value: '\x00\x01\x23\x45' for column `test`.`t2`.`a` at row 2
SELECT HEX(a) FROM t2;
HEX(a)
003F
diff --git a/mysql-test/main/ctype_recoding.result b/mysql-test/main/ctype_recoding.result
index 806d9dc6997..4668ddf9684 100644
--- a/mysql-test/main/ctype_recoding.result
+++ b/mysql-test/main/ctype_recoding.result
@@ -171,8 +171,8 @@ create table t1 (a char(10) character set koi8r, b text character set koi8r);
insert into t1 values ('test','test');
insert ignore into t1 values ('ÊÃÕË','ÊÃÕË');
Warnings:
-Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column 'b' at row 1
+Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column `test`.`t1`.`b` at row 1
drop table t1;
set names koi8r;
create table t1 (a char(10) character set cp1251);
diff --git a/mysql-test/main/ctype_sjis.result b/mysql-test/main/ctype_sjis.result
index c19a0008e11..090bb12fc42 100644
--- a/mysql-test/main/ctype_sjis.result
+++ b/mysql-test/main/ctype_sjis.result
@@ -412,70 +412,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1;
COUNT(*)
14623
diff --git a/mysql-test/main/ctype_uca.result b/mysql-test/main/ctype_uca.result
index 88fba0b3973..7394ec82924 100644
--- a/mysql-test/main/ctype_uca.result
+++ b/mysql-test/main/ctype_uca.result
@@ -6743,13 +6743,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -6766,21 +6766,21 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -6824,7 +6824,7 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -6845,13 +6845,13 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
ch
a
@@ -6872,7 +6872,7 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
@@ -6884,23 +6884,23 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
ALTER TABLE t1 DROP KEY ch;
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
@@ -6987,13 +6987,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -7010,21 +7010,21 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
diff --git a/mysql-test/main/ctype_uca_innodb.result b/mysql-test/main/ctype_uca_innodb.result
index c04a99c8cd3..bd6f3b8a21f 100644
--- a/mysql-test/main/ctype_uca_innodb.result
+++ b/mysql-test/main/ctype_uca_innodb.result
@@ -24,13 +24,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -47,21 +47,21 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -105,7 +105,7 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -126,13 +126,13 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
ch
a
@@ -153,7 +153,7 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
@@ -165,23 +165,23 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
ALTER TABLE t1 DROP KEY ch;
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
diff --git a/mysql-test/main/ctype_ucs.result b/mysql-test/main/ctype_ucs.result
index f01b3650ddf..db09bf116fc 100644
--- a/mysql-test/main/ctype_ucs.result
+++ b/mysql-test/main/ctype_ucs.result
@@ -5409,7 +5409,7 @@ ERROR 22003: Out of range value for column 'a' at row 1
SET sql_mode=DEFAULT;
INSERT IGNORE INTO t1 VALUES (CONVERT('aaa' USING ucs2));
Warnings:
-Warning 1366 Incorrect decimal value: 'aaa' for column 'a' at row 1
+Warning 1366 Incorrect decimal value: 'aaa' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
#
# End of 5.6 tests
@@ -6383,3 +6383,15 @@ DEALLOCATE PREPARE stmt;
#
# End of 10.2 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-17995 INET6_NTOA(ucs2_input) erroneously returns NULL
+#
+SELECT HEX(INET6_ATON('1::1')), HEX(INET6_ATON(CONVERT('1::1' USING ucs2)));
+HEX(INET6_ATON('1::1')) HEX(INET6_ATON(CONVERT('1::1' USING ucs2)))
+00010000000000000000000000000001 00010000000000000000000000000001
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test
index d0d463c0340..983f48edbc5 100644
--- a/mysql-test/main/ctype_ucs.test
+++ b/mysql-test/main/ctype_ucs.test
@@ -1094,3 +1094,18 @@ DEALLOCATE PREPARE stmt;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-17995 INET6_NTOA(ucs2_input) erroneously returns NULL
+--echo #
+
+SELECT HEX(INET6_ATON('1::1')), HEX(INET6_ATON(CONVERT('1::1' USING ucs2)));
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/ctype_ujis.result b/mysql-test/main/ctype_ujis.result
index 0b1cf606f0b..a1fcce33bbb 100644
--- a/mysql-test/main/ctype_ujis.result
+++ b/mysql-test/main/ctype_ujis.result
@@ -2571,70 +2571,70 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
-Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
-Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
-Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
-Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
-Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
-Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
-Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
-Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
-Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
-Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
-Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
-Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
-Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
-Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
-Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
-Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
-Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
-Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
-Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
-Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
-Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
-Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
-Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
-Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
-Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
-Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
-Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
-Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
-Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
-Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
-Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
-Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
-Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
-Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
-Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
-Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
-Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
-Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
-Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
-Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
-Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
-Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
-Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
-Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
-Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
-Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
-Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
-Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
-Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
-Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
-Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
-Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
-Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
-Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
-Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
-Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
-Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
-Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
-Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
-Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
+Warning 1366 Incorrect string value: '\x80 ' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\x80!' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect string value: '\x80"' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\x80#' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect string value: '\x80$' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\x80%' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect string value: '\x80&' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\x80'' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect string value: '\x80(' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect string value: '\x80)' for column `test`.`t1`.`a` at row 10
+Warning 1366 Incorrect string value: '\x80*' for column `test`.`t1`.`a` at row 11
+Warning 1366 Incorrect string value: '\x80+' for column `test`.`t1`.`a` at row 12
+Warning 1366 Incorrect string value: '\x80,' for column `test`.`t1`.`a` at row 13
+Warning 1366 Incorrect string value: '\x80-' for column `test`.`t1`.`a` at row 14
+Warning 1366 Incorrect string value: '\x80.' for column `test`.`t1`.`a` at row 15
+Warning 1366 Incorrect string value: '\x80/' for column `test`.`t1`.`a` at row 16
+Warning 1366 Incorrect string value: '\x800' for column `test`.`t1`.`a` at row 17
+Warning 1366 Incorrect string value: '\x801' for column `test`.`t1`.`a` at row 18
+Warning 1366 Incorrect string value: '\x802' for column `test`.`t1`.`a` at row 19
+Warning 1366 Incorrect string value: '\x803' for column `test`.`t1`.`a` at row 20
+Warning 1366 Incorrect string value: '\x804' for column `test`.`t1`.`a` at row 21
+Warning 1366 Incorrect string value: '\x805' for column `test`.`t1`.`a` at row 22
+Warning 1366 Incorrect string value: '\x806' for column `test`.`t1`.`a` at row 23
+Warning 1366 Incorrect string value: '\x807' for column `test`.`t1`.`a` at row 24
+Warning 1366 Incorrect string value: '\x808' for column `test`.`t1`.`a` at row 25
+Warning 1366 Incorrect string value: '\x809' for column `test`.`t1`.`a` at row 26
+Warning 1366 Incorrect string value: '\x80:' for column `test`.`t1`.`a` at row 27
+Warning 1366 Incorrect string value: '\x80;' for column `test`.`t1`.`a` at row 28
+Warning 1366 Incorrect string value: '\x80<' for column `test`.`t1`.`a` at row 29
+Warning 1366 Incorrect string value: '\x80=' for column `test`.`t1`.`a` at row 30
+Warning 1366 Incorrect string value: '\x80>' for column `test`.`t1`.`a` at row 31
+Warning 1366 Incorrect string value: '\x80?' for column `test`.`t1`.`a` at row 32
+Warning 1366 Incorrect string value: '\x80@' for column `test`.`t1`.`a` at row 33
+Warning 1366 Incorrect string value: '\x80A' for column `test`.`t1`.`a` at row 34
+Warning 1366 Incorrect string value: '\x80B' for column `test`.`t1`.`a` at row 35
+Warning 1366 Incorrect string value: '\x80C' for column `test`.`t1`.`a` at row 36
+Warning 1366 Incorrect string value: '\x80D' for column `test`.`t1`.`a` at row 37
+Warning 1366 Incorrect string value: '\x80E' for column `test`.`t1`.`a` at row 38
+Warning 1366 Incorrect string value: '\x80F' for column `test`.`t1`.`a` at row 39
+Warning 1366 Incorrect string value: '\x80G' for column `test`.`t1`.`a` at row 40
+Warning 1366 Incorrect string value: '\x80H' for column `test`.`t1`.`a` at row 41
+Warning 1366 Incorrect string value: '\x80I' for column `test`.`t1`.`a` at row 42
+Warning 1366 Incorrect string value: '\x80J' for column `test`.`t1`.`a` at row 43
+Warning 1366 Incorrect string value: '\x80K' for column `test`.`t1`.`a` at row 44
+Warning 1366 Incorrect string value: '\x80L' for column `test`.`t1`.`a` at row 45
+Warning 1366 Incorrect string value: '\x80M' for column `test`.`t1`.`a` at row 46
+Warning 1366 Incorrect string value: '\x80N' for column `test`.`t1`.`a` at row 47
+Warning 1366 Incorrect string value: '\x80O' for column `test`.`t1`.`a` at row 48
+Warning 1366 Incorrect string value: '\x80P' for column `test`.`t1`.`a` at row 49
+Warning 1366 Incorrect string value: '\x80Q' for column `test`.`t1`.`a` at row 50
+Warning 1366 Incorrect string value: '\x80R' for column `test`.`t1`.`a` at row 51
+Warning 1366 Incorrect string value: '\x80S' for column `test`.`t1`.`a` at row 52
+Warning 1366 Incorrect string value: '\x80T' for column `test`.`t1`.`a` at row 53
+Warning 1366 Incorrect string value: '\x80U' for column `test`.`t1`.`a` at row 54
+Warning 1366 Incorrect string value: '\x80V' for column `test`.`t1`.`a` at row 55
+Warning 1366 Incorrect string value: '\x80W' for column `test`.`t1`.`a` at row 56
+Warning 1366 Incorrect string value: '\x80X' for column `test`.`t1`.`a` at row 57
+Warning 1366 Incorrect string value: '\x80Y' for column `test`.`t1`.`a` at row 58
+Warning 1366 Incorrect string value: '\x80Z' for column `test`.`t1`.`a` at row 59
+Warning 1366 Incorrect string value: '\x80[' for column `test`.`t1`.`a` at row 60
+Warning 1366 Incorrect string value: '\x80\' for column `test`.`t1`.`a` at row 61
+Warning 1366 Incorrect string value: '\x80]' for column `test`.`t1`.`a` at row 62
+Warning 1366 Incorrect string value: '\x80^' for column `test`.`t1`.`a` at row 63
+Warning 1366 Incorrect string value: '\x80_' for column `test`.`t1`.`a` at row 64
SELECT COUNT(*) FROM t1;
COUNT(*)
44671
diff --git a/mysql-test/main/ctype_ujis_ucs2.result b/mysql-test/main/ctype_ujis_ucs2.result
index 77961046346..cb501fd065f 100644
--- a/mysql-test/main/ctype_ujis_ucs2.result
+++ b/mysql-test/main/ctype_ujis_ucs2.result
@@ -1140,70 +1140,70 @@ update t1 set name='User defined range #2' where ujis >= 0x8FF5A1 and ujis <= 0x
update t1 set name='UNASSIGNED' where name='';
update ignore t1 set ucs2=ujis, ujis2=ucs2;
Warnings:
-Warning 1366 Incorrect string value: '\xA2\xAF' for column 'ucs2' at row 237
-Warning 1366 Incorrect string value: '\xA2\xB0' for column 'ucs2' at row 238
-Warning 1366 Incorrect string value: '\xA2\xB1' for column 'ucs2' at row 239
-Warning 1366 Incorrect string value: '\xA2\xB2' for column 'ucs2' at row 240
-Warning 1366 Incorrect string value: '\xA2\xB3' for column 'ucs2' at row 241
-Warning 1366 Incorrect string value: '\xA2\xB4' for column 'ucs2' at row 242
-Warning 1366 Incorrect string value: '\xA2\xB5' for column 'ucs2' at row 243
-Warning 1366 Incorrect string value: '\xA2\xB6' for column 'ucs2' at row 244
-Warning 1366 Incorrect string value: '\xA2\xB7' for column 'ucs2' at row 245
-Warning 1366 Incorrect string value: '\xA2\xB8' for column 'ucs2' at row 246
-Warning 1366 Incorrect string value: '\xA2\xB9' for column 'ucs2' at row 247
-Warning 1366 Incorrect string value: '\xA2\xC2' for column 'ucs2' at row 256
-Warning 1366 Incorrect string value: '\xA2\xC3' for column 'ucs2' at row 257
-Warning 1366 Incorrect string value: '\xA2\xC4' for column 'ucs2' at row 258
-Warning 1366 Incorrect string value: '\xA2\xC5' for column 'ucs2' at row 259
-Warning 1366 Incorrect string value: '\xA2\xC6' for column 'ucs2' at row 260
-Warning 1366 Incorrect string value: '\xA2\xC7' for column 'ucs2' at row 261
-Warning 1366 Incorrect string value: '\xA2\xC8' for column 'ucs2' at row 262
-Warning 1366 Incorrect string value: '\xA2\xC9' for column 'ucs2' at row 263
-Warning 1366 Incorrect string value: '\xA2\xD1' for column 'ucs2' at row 271
-Warning 1366 Incorrect string value: '\xA2\xD2' for column 'ucs2' at row 272
-Warning 1366 Incorrect string value: '\xA2\xD3' for column 'ucs2' at row 273
-Warning 1366 Incorrect string value: '\xA2\xD4' for column 'ucs2' at row 274
-Warning 1366 Incorrect string value: '\xA2\xD5' for column 'ucs2' at row 275
-Warning 1366 Incorrect string value: '\xA2\xD6' for column 'ucs2' at row 276
-Warning 1366 Incorrect string value: '\xA2\xD7' for column 'ucs2' at row 277
-Warning 1366 Incorrect string value: '\xA2\xD8' for column 'ucs2' at row 278
-Warning 1366 Incorrect string value: '\xA2\xD9' for column 'ucs2' at row 279
-Warning 1366 Incorrect string value: '\xA2\xDA' for column 'ucs2' at row 280
-Warning 1366 Incorrect string value: '\xA2\xDB' for column 'ucs2' at row 281
-Warning 1366 Incorrect string value: '\xA2\xEB' for column 'ucs2' at row 297
-Warning 1366 Incorrect string value: '\xA2\xEC' for column 'ucs2' at row 298
-Warning 1366 Incorrect string value: '\xA2\xED' for column 'ucs2' at row 299
-Warning 1366 Incorrect string value: '\xA2\xEE' for column 'ucs2' at row 300
-Warning 1366 Incorrect string value: '\xA2\xEF' for column 'ucs2' at row 301
-Warning 1366 Incorrect string value: '\xA2\xF0' for column 'ucs2' at row 302
-Warning 1366 Incorrect string value: '\xA2\xF1' for column 'ucs2' at row 303
-Warning 1366 Incorrect string value: '\xA2\xFA' for column 'ucs2' at row 312
-Warning 1366 Incorrect string value: '\xA2\xFB' for column 'ucs2' at row 313
-Warning 1366 Incorrect string value: '\xA2\xFC' for column 'ucs2' at row 314
-Warning 1366 Incorrect string value: '\xA2\xFD' for column 'ucs2' at row 315
-Warning 1366 Incorrect string value: '\xA3\xA1' for column 'ucs2' at row 317
-Warning 1366 Incorrect string value: '\xA3\xA2' for column 'ucs2' at row 318
-Warning 1366 Incorrect string value: '\xA3\xA3' for column 'ucs2' at row 319
-Warning 1366 Incorrect string value: '\xA3\xA4' for column 'ucs2' at row 320
-Warning 1366 Incorrect string value: '\xA3\xA5' for column 'ucs2' at row 321
-Warning 1366 Incorrect string value: '\xA3\xA6' for column 'ucs2' at row 322
-Warning 1366 Incorrect string value: '\xA3\xA7' for column 'ucs2' at row 323
-Warning 1366 Incorrect string value: '\xA3\xA8' for column 'ucs2' at row 324
-Warning 1366 Incorrect string value: '\xA3\xA9' for column 'ucs2' at row 325
-Warning 1366 Incorrect string value: '\xA3\xAA' for column 'ucs2' at row 326
-Warning 1366 Incorrect string value: '\xA3\xAB' for column 'ucs2' at row 327
-Warning 1366 Incorrect string value: '\xA3\xAC' for column 'ucs2' at row 328
-Warning 1366 Incorrect string value: '\xA3\xAD' for column 'ucs2' at row 329
-Warning 1366 Incorrect string value: '\xA3\xAE' for column 'ucs2' at row 330
-Warning 1366 Incorrect string value: '\xA3\xAF' for column 'ucs2' at row 331
-Warning 1366 Incorrect string value: '\xA3\xBA' for column 'ucs2' at row 342
-Warning 1366 Incorrect string value: '\xA3\xBB' for column 'ucs2' at row 343
-Warning 1366 Incorrect string value: '\xA3\xBC' for column 'ucs2' at row 344
-Warning 1366 Incorrect string value: '\xA3\xBD' for column 'ucs2' at row 345
-Warning 1366 Incorrect string value: '\xA3\xBE' for column 'ucs2' at row 346
-Warning 1366 Incorrect string value: '\xA3\xBF' for column 'ucs2' at row 347
-Warning 1366 Incorrect string value: '\xA3\xC0' for column 'ucs2' at row 348
-Warning 1366 Incorrect string value: '\xA3\xDB' for column 'ucs2' at row 375
+Warning 1366 Incorrect string value: '\xA2\xAF' for column `test`.`t1`.`ucs2` at row 237
+Warning 1366 Incorrect string value: '\xA2\xB0' for column `test`.`t1`.`ucs2` at row 238
+Warning 1366 Incorrect string value: '\xA2\xB1' for column `test`.`t1`.`ucs2` at row 239
+Warning 1366 Incorrect string value: '\xA2\xB2' for column `test`.`t1`.`ucs2` at row 240
+Warning 1366 Incorrect string value: '\xA2\xB3' for column `test`.`t1`.`ucs2` at row 241
+Warning 1366 Incorrect string value: '\xA2\xB4' for column `test`.`t1`.`ucs2` at row 242
+Warning 1366 Incorrect string value: '\xA2\xB5' for column `test`.`t1`.`ucs2` at row 243
+Warning 1366 Incorrect string value: '\xA2\xB6' for column `test`.`t1`.`ucs2` at row 244
+Warning 1366 Incorrect string value: '\xA2\xB7' for column `test`.`t1`.`ucs2` at row 245
+Warning 1366 Incorrect string value: '\xA2\xB8' for column `test`.`t1`.`ucs2` at row 246
+Warning 1366 Incorrect string value: '\xA2\xB9' for column `test`.`t1`.`ucs2` at row 247
+Warning 1366 Incorrect string value: '\xA2\xC2' for column `test`.`t1`.`ucs2` at row 256
+Warning 1366 Incorrect string value: '\xA2\xC3' for column `test`.`t1`.`ucs2` at row 257
+Warning 1366 Incorrect string value: '\xA2\xC4' for column `test`.`t1`.`ucs2` at row 258
+Warning 1366 Incorrect string value: '\xA2\xC5' for column `test`.`t1`.`ucs2` at row 259
+Warning 1366 Incorrect string value: '\xA2\xC6' for column `test`.`t1`.`ucs2` at row 260
+Warning 1366 Incorrect string value: '\xA2\xC7' for column `test`.`t1`.`ucs2` at row 261
+Warning 1366 Incorrect string value: '\xA2\xC8' for column `test`.`t1`.`ucs2` at row 262
+Warning 1366 Incorrect string value: '\xA2\xC9' for column `test`.`t1`.`ucs2` at row 263
+Warning 1366 Incorrect string value: '\xA2\xD1' for column `test`.`t1`.`ucs2` at row 271
+Warning 1366 Incorrect string value: '\xA2\xD2' for column `test`.`t1`.`ucs2` at row 272
+Warning 1366 Incorrect string value: '\xA2\xD3' for column `test`.`t1`.`ucs2` at row 273
+Warning 1366 Incorrect string value: '\xA2\xD4' for column `test`.`t1`.`ucs2` at row 274
+Warning 1366 Incorrect string value: '\xA2\xD5' for column `test`.`t1`.`ucs2` at row 275
+Warning 1366 Incorrect string value: '\xA2\xD6' for column `test`.`t1`.`ucs2` at row 276
+Warning 1366 Incorrect string value: '\xA2\xD7' for column `test`.`t1`.`ucs2` at row 277
+Warning 1366 Incorrect string value: '\xA2\xD8' for column `test`.`t1`.`ucs2` at row 278
+Warning 1366 Incorrect string value: '\xA2\xD9' for column `test`.`t1`.`ucs2` at row 279
+Warning 1366 Incorrect string value: '\xA2\xDA' for column `test`.`t1`.`ucs2` at row 280
+Warning 1366 Incorrect string value: '\xA2\xDB' for column `test`.`t1`.`ucs2` at row 281
+Warning 1366 Incorrect string value: '\xA2\xEB' for column `test`.`t1`.`ucs2` at row 297
+Warning 1366 Incorrect string value: '\xA2\xEC' for column `test`.`t1`.`ucs2` at row 298
+Warning 1366 Incorrect string value: '\xA2\xED' for column `test`.`t1`.`ucs2` at row 299
+Warning 1366 Incorrect string value: '\xA2\xEE' for column `test`.`t1`.`ucs2` at row 300
+Warning 1366 Incorrect string value: '\xA2\xEF' for column `test`.`t1`.`ucs2` at row 301
+Warning 1366 Incorrect string value: '\xA2\xF0' for column `test`.`t1`.`ucs2` at row 302
+Warning 1366 Incorrect string value: '\xA2\xF1' for column `test`.`t1`.`ucs2` at row 303
+Warning 1366 Incorrect string value: '\xA2\xFA' for column `test`.`t1`.`ucs2` at row 312
+Warning 1366 Incorrect string value: '\xA2\xFB' for column `test`.`t1`.`ucs2` at row 313
+Warning 1366 Incorrect string value: '\xA2\xFC' for column `test`.`t1`.`ucs2` at row 314
+Warning 1366 Incorrect string value: '\xA2\xFD' for column `test`.`t1`.`ucs2` at row 315
+Warning 1366 Incorrect string value: '\xA3\xA1' for column `test`.`t1`.`ucs2` at row 317
+Warning 1366 Incorrect string value: '\xA3\xA2' for column `test`.`t1`.`ucs2` at row 318
+Warning 1366 Incorrect string value: '\xA3\xA3' for column `test`.`t1`.`ucs2` at row 319
+Warning 1366 Incorrect string value: '\xA3\xA4' for column `test`.`t1`.`ucs2` at row 320
+Warning 1366 Incorrect string value: '\xA3\xA5' for column `test`.`t1`.`ucs2` at row 321
+Warning 1366 Incorrect string value: '\xA3\xA6' for column `test`.`t1`.`ucs2` at row 322
+Warning 1366 Incorrect string value: '\xA3\xA7' for column `test`.`t1`.`ucs2` at row 323
+Warning 1366 Incorrect string value: '\xA3\xA8' for column `test`.`t1`.`ucs2` at row 324
+Warning 1366 Incorrect string value: '\xA3\xA9' for column `test`.`t1`.`ucs2` at row 325
+Warning 1366 Incorrect string value: '\xA3\xAA' for column `test`.`t1`.`ucs2` at row 326
+Warning 1366 Incorrect string value: '\xA3\xAB' for column `test`.`t1`.`ucs2` at row 327
+Warning 1366 Incorrect string value: '\xA3\xAC' for column `test`.`t1`.`ucs2` at row 328
+Warning 1366 Incorrect string value: '\xA3\xAD' for column `test`.`t1`.`ucs2` at row 329
+Warning 1366 Incorrect string value: '\xA3\xAE' for column `test`.`t1`.`ucs2` at row 330
+Warning 1366 Incorrect string value: '\xA3\xAF' for column `test`.`t1`.`ucs2` at row 331
+Warning 1366 Incorrect string value: '\xA3\xBA' for column `test`.`t1`.`ucs2` at row 342
+Warning 1366 Incorrect string value: '\xA3\xBB' for column `test`.`t1`.`ucs2` at row 343
+Warning 1366 Incorrect string value: '\xA3\xBC' for column `test`.`t1`.`ucs2` at row 344
+Warning 1366 Incorrect string value: '\xA3\xBD' for column `test`.`t1`.`ucs2` at row 345
+Warning 1366 Incorrect string value: '\xA3\xBE' for column `test`.`t1`.`ucs2` at row 346
+Warning 1366 Incorrect string value: '\xA3\xBF' for column `test`.`t1`.`ucs2` at row 347
+Warning 1366 Incorrect string value: '\xA3\xC0' for column `test`.`t1`.`ucs2` at row 348
+Warning 1366 Incorrect string value: '\xA3\xDB' for column `test`.`t1`.`ucs2` at row 375
Characters with safe Unicode round trip
select hex(ujis), hex(ucs2), hex(ujis2), name from t1 where ujis=ujis2 order by ujis;
hex(ujis) hex(ucs2) hex(ujis2) name
@@ -19131,17 +19131,17 @@ insert into t1 (ucs2,name) values (0xFFE2,'U+FFE2 FULLWIDTH NOT SIGN');
insert into t1 (ucs2,name) values (0xFFE4,'U+FFE4 FULLWIDTH BROKEN BAR');
update ignore t1 set ujis=ucs2;
Warnings:
-Warning 1366 Incorrect string value: '\x00\xA5' for column 'ujis' at row 1
-Warning 1366 Incorrect string value: '\x20\x14' for column 'ujis' at row 2
-Warning 1366 Incorrect string value: '\x20\x3E' for column 'ujis' at row 3
-Warning 1366 Incorrect string value: '\x22\x25' for column 'ujis' at row 4
-Warning 1366 Incorrect string value: '\xFF\x0D' for column 'ujis' at row 5
-Warning 1366 Incorrect string value: '\xFF\x3C' for column 'ujis' at row 6
-Warning 1366 Incorrect string value: '\xFF\x5E' for column 'ujis' at row 7
-Warning 1366 Incorrect string value: '\xFF\xE0' for column 'ujis' at row 8
-Warning 1366 Incorrect string value: '\xFF\xE1' for column 'ujis' at row 9
-Warning 1366 Incorrect string value: '\xFF\xE2' for column 'ujis' at row 10
-Warning 1366 Incorrect string value: '\xFF\xE4' for column 'ujis' at row 11
+Warning 1366 Incorrect string value: '\x00\xA5' for column `test`.`t1`.`ujis` at row 1
+Warning 1366 Incorrect string value: '\x20\x14' for column `test`.`t1`.`ujis` at row 2
+Warning 1366 Incorrect string value: '\x20\x3E' for column `test`.`t1`.`ujis` at row 3
+Warning 1366 Incorrect string value: '\x22\x25' for column `test`.`t1`.`ujis` at row 4
+Warning 1366 Incorrect string value: '\xFF\x0D' for column `test`.`t1`.`ujis` at row 5
+Warning 1366 Incorrect string value: '\xFF\x3C' for column `test`.`t1`.`ujis` at row 6
+Warning 1366 Incorrect string value: '\xFF\x5E' for column `test`.`t1`.`ujis` at row 7
+Warning 1366 Incorrect string value: '\xFF\xE0' for column `test`.`t1`.`ujis` at row 8
+Warning 1366 Incorrect string value: '\xFF\xE1' for column `test`.`t1`.`ujis` at row 9
+Warning 1366 Incorrect string value: '\xFF\xE2' for column `test`.`t1`.`ujis` at row 10
+Warning 1366 Incorrect string value: '\xFF\xE4' for column `test`.`t1`.`ujis` at row 11
select hex(ucs2),hex(ujis),name from t1 order by name;
hex(ucs2) hex(ujis) name
00A5 3F U+00A5 YEN SIGN
diff --git a/mysql-test/main/ctype_upgrade.result b/mysql-test/main/ctype_upgrade.result
index 7f8b594cbf8..9d19c3b5203 100644
--- a/mysql-test/main/ctype_upgrade.result
+++ b/mysql-test/main/ctype_upgrade.result
@@ -235,6 +235,7 @@ 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
@@ -257,9 +258,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -293,6 +294,7 @@ 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
@@ -315,9 +317,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/ctype_utf16.result b/mysql-test/main/ctype_utf16.result
index 784bdae7275..1417e0ba752 100644
--- a/mysql-test/main/ctype_utf16.result
+++ b/mysql-test/main/ctype_utf16.result
@@ -1015,7 +1015,7 @@ insert into t1 values (0xdf84);
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
alter table t1 modify column s1 varchar(50) character set utf16;
Warnings:
-Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xDF\x84' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
003F
@@ -1024,7 +1024,7 @@ create table t1 (s1 varchar(5) character set ucs2, s2 varchar(5) character set u
insert into t1 (s1) values (0xdf84);
update ignore t1 set s2 = s1;
Warnings:
-Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1
+Warning 1366 Incorrect string value: '\xDF\x84' for column `test`.`t1`.`s2` at row 1
select hex(s2) from t1;
hex(s2)
003F
diff --git a/mysql-test/main/ctype_utf16le.result b/mysql-test/main/ctype_utf16le.result
index 4d1186bd361..633809b51fa 100644
--- a/mysql-test/main/ctype_utf16le.result
+++ b/mysql-test/main/ctype_utf16le.result
@@ -1124,7 +1124,7 @@ INSERT INTO t1 VALUES (0xDF84);
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
ALTER TABLE t1 MODIFY column s1 VARCHAR(50) CHARACTER SET utf16le;
Warnings:
-Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xDF\x84' for column `test`.`t1`.`s1` at row 1
SELECT HEX(s1) FROM t1;
HEX(s1)
3F00
@@ -1136,7 +1136,7 @@ CREATE TABLE t1 (s1 VARCHAR(5) CHARACTER SET ucs2, s2 VARCHAR(5) CHARACTER SET u
INSERT INTO t1 (s1) VALUES (0xdf84);
UPDATE IGNORE t1 set s2 = s1;
Warnings:
-Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1
+Warning 1366 Incorrect string value: '\xDF\x84' for column `test`.`t1`.`s2` at row 1
SELECT HEX(s2) FROM t1;
HEX(s2)
3F00
diff --git a/mysql-test/main/ctype_utf32.result b/mysql-test/main/ctype_utf32.result
index 7b3eaa9384a..2da1f22f592 100644
--- a/mysql-test/main/ctype_utf32.result
+++ b/mysql-test/main/ctype_utf32.result
@@ -985,31 +985,31 @@ create table t1 (utf32 varchar(2) character set utf32);
Wrong character with pad
insert ignore into t1 values (0x110000);
Warnings:
-Warning 1366 Incorrect string value: '\x11\x00\x00' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x11\x00\x00' for column `test`.`t1`.`utf32` at row 1
Wrong chsaracter without pad
insert ignore into t1 values (0x00110000);
Warnings:
-Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column `test`.`t1`.`utf32` at row 1
Wrong character with pad followed by another wrong character
insert ignore into t1 values (0x11000000110000);
Warnings:
-Warning 1366 Incorrect string value: '\x11\x00\x00\x00\x11\x00...' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x11\x00\x00\x00\x11\x00...' for column `test`.`t1`.`utf32` at row 1
Good character with pad followed by bad character
insert ignore into t1 values (0x10000000110000);
Warnings:
-Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column `test`.`t1`.`utf32` at row 1
Good character without pad followed by bad character
insert ignore into t1 values (0x0010000000110000);
Warnings:
-Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column `test`.`t1`.`utf32` at row 1
Wrong character with the second byte higher than 0x10
insert ignore into t1 values (0x00800037);
Warnings:
-Warning 1366 Incorrect string value: '\x00\x80\x007' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x00\x80\x007' for column `test`.`t1`.`utf32` at row 1
Wrong character with pad with the second byte higher than 0x10
insert ignore into t1 values (0x00800037);
Warnings:
-Warning 1366 Incorrect string value: '\x00\x80\x007' for column 'utf32' at row 1
+Warning 1366 Incorrect string value: '\x00\x80\x007' for column `test`.`t1`.`utf32` at row 1
drop table t1;
select _utf32'a' collate utf32_general_ci = 0xfffd;
_utf32'a' collate utf32_general_ci = 0xfffd
@@ -1561,12 +1561,12 @@ CREATE TABLE t1 (utf32 CHAR(5) CHARACTER SET utf32, latin1 CHAR(5) CHARACTER SET
INSERT INTO t1 (utf32) VALUES (0xc581);
UPDATE IGNORE t1 SET latin1 = utf32;
Warnings:
-Warning 1366 Incorrect string value: '\x00\x00\xC5\x81' for column 'latin1' at row 1
+Warning 1366 Incorrect string value: '\x00\x00\xC5\x81' for column `test`.`t1`.`latin1` at row 1
DELETE FROM t1;
INSERT INTO t1 (utf32) VALUES (0x100cc);
UPDATE IGNORE t1 SET latin1 = utf32;
Warnings:
-Warning 1366 Incorrect string value: '\x00\x01\x00\xCC' for column 'latin1' at row 1
+Warning 1366 Incorrect string value: '\x00\x01\x00\xCC' for column `test`.`t1`.`latin1` at row 1
DROP TABLE t1;
#
# Bug#55912 FORMAT with locale set fails for numbers < 1000
diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result
index a193eba64e3..6f336d2fcfb 100644
--- a/mysql-test/main/ctype_utf8.result
+++ b/mysql-test/main/ctype_utf8.result
@@ -222,7 +222,7 @@ drop table t1;
create table t1 (s1 char(10) character set utf8);
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -230,7 +230,7 @@ drop table t1;
create table t1 (s1 varchar(10) character set utf8);
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -238,7 +238,7 @@ drop table t1;
create table t1 (s1 text character set utf8);
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -5456,13 +5456,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -5479,21 +5479,21 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -5537,7 +5537,7 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -5558,13 +5558,13 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
ch
a
@@ -5585,7 +5585,7 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
@@ -5597,23 +5597,23 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
ALTER TABLE t1 DROP KEY ch;
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
@@ -5700,13 +5700,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -5723,21 +5723,21 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -5781,7 +5781,7 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -5802,13 +5802,13 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch;
ch
a
@@ -5829,7 +5829,7 @@ az
aЀ
aÖ€
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
@@ -5841,23 +5841,23 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch;
ch
z
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
ALTER TABLE t1 DROP KEY ch;
# 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence
SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,'''');
@@ -5944,13 +5944,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1');
SELECT ch FROM t1 WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†';
ch
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†';
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
DELETE FROM t1;
INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????');
INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b');
@@ -5967,21 +5967,21 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch;
ch
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1
SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch;
ch
a
@@ -10611,11 +10611,11 @@ DROP TABLE t1;
CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES;
Warnings:
-Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\xE1\x80' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column 'a' at row 7
-Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column 'a' at row 8
+Warning 1366 Incorrect string value: '\xD0' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\xE1\x80' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column `test`.`t1`.`a` at row 8
SELECT HEX(a) FROM t1;
HEX(a)
3F
@@ -10633,7 +10633,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' IGNORE INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY '<row>';
Warnings:
-Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1
+Warning 1366 Incorrect string value: '\xD0' for column `test`.`t1`.`a` at row 1
SELECT HEX(a) FROM t1;
HEX(a)
613F
diff --git a/mysql-test/main/ctype_utf8mb4.result b/mysql-test/main/ctype_utf8mb4.result
index 27ffd5552fa..fac15a5a2cd 100644
--- a/mysql-test/main/ctype_utf8mb4.result
+++ b/mysql-test/main/ctype_utf8mb4.result
@@ -222,7 +222,7 @@ drop table t1;
create table t1 (s1 char(10) character set utf8mb4);
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -230,7 +230,7 @@ drop table t1;
create table t1 (s1 varchar(10) character set utf8mb4);
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -238,7 +238,7 @@ drop table t1;
create table t1 (s1 text character set utf8mb4);
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -2328,7 +2328,7 @@ insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert ignore into t1 values (0xF08F8080);
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1 order by binary utf8mb4;
hex(utf8mb4)
3F
@@ -2348,7 +2348,7 @@ insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert ignore into t1 values (0xF4908080);
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1 order by binary utf8mb4;
hex(utf8mb4)
3F
@@ -2442,7 +2442,7 @@ u_decimal hex(utf8mb4_encoding)
119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480
INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
-Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column `test`.`t1`.`utf8mb4_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
character_maximum_length character_octet_length
@@ -2456,14 +2456,14 @@ INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column `test`.`t2`.`utf8mb3_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column `test`.`t2`.`utf8mb3_encoding` at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1;
HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8'))
@@ -2524,17 +2524,17 @@ count(*)
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9D\x84\x80' for column 'utf8mb4_encoding' at row 1
-Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E' for column 'utf8mb4_encoding' at row 2
-Warning 1366 Incorrect string value: '\xF0\x9D\x85\x9E' for column 'utf8mb4_encoding' at row 3
-Warning 1366 Incorrect string value: '\xF0\x9D\x87\x8F' for column 'utf8mb4_encoding' at row 4
-Warning 1366 Incorrect string value: '\xF0\x9D\x9C\x9F' for column 'utf8mb4_encoding' at row 5
-Warning 1366 Incorrect string value: '\xF0\x9D\x9E\x9F' for column 'utf8mb4_encoding' at row 6
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb4_encoding' at row 7
-Warning 1366 Incorrect string value: '\xF3\xA0\x87\xAF' for column 'utf8mb4_encoding' at row 8
-Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 9
-Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 10
-Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 11
+Warning 1366 Incorrect string value: '\xF0\x9D\x84\x80' for column `test`.`t1`.`utf8mb4_encoding` at row 1
+Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E' for column `test`.`t1`.`utf8mb4_encoding` at row 2
+Warning 1366 Incorrect string value: '\xF0\x9D\x85\x9E' for column `test`.`t1`.`utf8mb4_encoding` at row 3
+Warning 1366 Incorrect string value: '\xF0\x9D\x87\x8F' for column `test`.`t1`.`utf8mb4_encoding` at row 4
+Warning 1366 Incorrect string value: '\xF0\x9D\x9C\x9F' for column `test`.`t1`.`utf8mb4_encoding` at row 5
+Warning 1366 Incorrect string value: '\xF0\x9D\x9E\x9F' for column `test`.`t1`.`utf8mb4_encoding` at row 6
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column `test`.`t1`.`utf8mb4_encoding` at row 7
+Warning 1366 Incorrect string value: '\xF3\xA0\x87\xAF' for column `test`.`t1`.`utf8mb4_encoding` at row 8
+Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column `test`.`t1`.`utf8mb4_encoding` at row 9
+Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column `test`.`t1`.`utf8mb4_encoding` at row 10
+Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column `test`.`t1`.`utf8mb4_encoding` at row 11
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -3427,8 +3427,8 @@ b VARCHAR(32) CHARACTER SET utf8
);
INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b';
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column `test`.`t1`.`b` at row 1
SELECT * FROM t1;
a b
a ???? b a ???? b
@@ -3447,7 +3447,7 @@ b VARCHAR(32) CHARACTER SET utf8
);
INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b';
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column `test`.`t1`.`b` at row 1
SELECT * FROM t1;
a b
a 😠b a ? b
@@ -3539,10 +3539,10 @@ DROP FUNCTION f1;
CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4);
LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES;
Warnings:
-Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1
-Warning 1366 Incorrect string value: '\xE1\x80' for column 'a' at row 3
-Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column 'a' at row 5
-Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column 'a' at row 8
+Warning 1366 Incorrect string value: '\xD0' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect string value: '\xE1\x80' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect string value: '\xF0\x9F\x98' for column `test`.`t1`.`a` at row 8
SELECT HEX(a) FROM t1;
HEX(a)
3F
diff --git a/mysql-test/main/ctype_utf8mb4_heap.result b/mysql-test/main/ctype_utf8mb4_heap.result
index d82ed89be9c..85668451181 100644
--- a/mysql-test/main/ctype_utf8mb4_heap.result
+++ b/mysql-test/main/ctype_utf8mb4_heap.result
@@ -222,7 +222,7 @@ drop table t1;
create table t1 (s1 char(10) character set utf8mb4) engine heap;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -230,7 +230,7 @@ drop table t1;
create table t1 (s1 varchar(10) character set utf8mb4) engine heap;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -2160,7 +2160,7 @@ insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert ignore into t1 values (0xF08F8080);
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1;
hex(utf8mb4)
3F
@@ -2180,7 +2180,7 @@ insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert ignore into t1 values (0xF4908080);
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1;
hex(utf8mb4)
3F
@@ -2255,7 +2255,7 @@ u_decimal hex(utf8mb4_encoding)
917999 F3A087AF
INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
-Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column `test`.`t1`.`utf8mb4_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
character_maximum_length character_octet_length
@@ -2269,14 +2269,14 @@ INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column `test`.`t2`.`utf8mb3_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column `test`.`t2`.`utf8mb3_encoding` at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1;
HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8'))
diff --git a/mysql-test/main/ctype_utf8mb4_innodb.result b/mysql-test/main/ctype_utf8mb4_innodb.result
index 956b2f83d9e..82f0ddff1c4 100644
--- a/mysql-test/main/ctype_utf8mb4_innodb.result
+++ b/mysql-test/main/ctype_utf8mb4_innodb.result
@@ -222,7 +222,7 @@ drop table t1;
create table t1 (s1 char(10) character set utf8mb4) engine InnoDB;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -230,7 +230,7 @@ drop table t1;
create table t1 (s1 varchar(10) character set utf8mb4) engine InnoDB;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -238,7 +238,7 @@ drop table t1;
create table t1 (s1 text character set utf8mb4) engine InnoDB;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -2286,7 +2286,7 @@ insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert ignore into t1 values (0xF08F8080);
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1;
hex(utf8mb4)
3F
@@ -2306,7 +2306,7 @@ insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert ignore into t1 values (0xF4908080);
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1;
hex(utf8mb4)
3F
@@ -2398,7 +2398,7 @@ u_decimal hex(utf8mb4_encoding)
917999 F3A087AF
INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
-Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column `test`.`t1`.`utf8mb4_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
character_maximum_length character_octet_length
@@ -2412,14 +2412,14 @@ INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column `test`.`t2`.`utf8mb3_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column `test`.`t2`.`utf8mb3_encoding` at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1;
HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8'))
diff --git a/mysql-test/main/ctype_utf8mb4_myisam.result b/mysql-test/main/ctype_utf8mb4_myisam.result
index fd58e12542c..0bd13ef0282 100644
--- a/mysql-test/main/ctype_utf8mb4_myisam.result
+++ b/mysql-test/main/ctype_utf8mb4_myisam.result
@@ -222,7 +222,7 @@ drop table t1;
create table t1 (s1 char(10) character set utf8mb4) engine MyISAM;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -230,7 +230,7 @@ drop table t1;
create table t1 (s1 varchar(10) character set utf8mb4) engine MyISAM;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -238,7 +238,7 @@ drop table t1;
create table t1 (s1 text character set utf8mb4) engine MyISAM;
insert ignore into t1 values (0x41FF);
Warnings:
-Warning 1366 Incorrect string value: '\xFF' for column 's1' at row 1
+Warning 1366 Incorrect string value: '\xFF' for column `test`.`t1`.`s1` at row 1
select hex(s1) from t1;
hex(s1)
413F
@@ -2293,7 +2293,7 @@ insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert ignore into t1 values (0xF08F8080);
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1;
hex(utf8mb4)
3F
@@ -2313,7 +2313,7 @@ insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert ignore into t1 values (0xF4908080);
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column `test`.`t1`.`utf8mb4` at row 1
select hex(utf8mb4) from t1;
hex(utf8mb4)
3F
@@ -2407,7 +2407,7 @@ u_decimal hex(utf8mb4_encoding)
917999 F3A087AF
INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
-Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column `test`.`t1`.`utf8mb4_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
character_maximum_length character_octet_length
@@ -2421,14 +2421,14 @@ INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column `test`.`t2`.`utf8mb3_encoding` at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
-Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column `test`.`t2`.`utf8mb3_encoding` at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
SELECT HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8')) FROM t1;
HEX(CONCAT(utf8mb4_encoding, _utf8 x'ea9da8'))
diff --git a/mysql-test/main/custom_aggregate_functions.result b/mysql-test/main/custom_aggregate_functions.result
index 4060d6665f6..0a27334f58e 100644
--- a/mysql-test/main/custom_aggregate_functions.result
+++ b/mysql-test/main/custom_aggregate_functions.result
@@ -573,7 +573,7 @@ select f3(sal) from t1;
f3(sal)
1000
select f2(val) from t1;
-ERROR 22007: Incorrect integer value: 'ab' for column 'x' at row 1
+ERROR 22007: Incorrect integer value: 'ab' for column ``.``.`x` at row 1
select val, id, c from (select f1(sal) as c from t2) as t1, t2;
val id c
10 2 17000
diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result
index 26a1fc670f4..ec36e3af46d 100644
--- a/mysql-test/main/delayed.result
+++ b/mysql-test/main/delayed.result
@@ -284,9 +284,9 @@ CREATE TABLE t2 (
);
SET SQL_MODE='NO_ZERO_DATE,STRICT_ALL_TABLES,NO_ZERO_IN_DATE';
INSERT DELAYED INTO t2 VALUES (0,'0000-00-00');
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'f1' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t2`.`f1` at row 1
INSERT DELAYED INTO t2 VALUES (0,'2007-00-00');
-ERROR 22007: Incorrect date value: '2007-00-00' for column 'f1' at row 1
+ERROR 22007: Incorrect date value: '2007-00-00' for column `test`.`t2`.`f1` at row 1
DROP TABLE t1,t2;
set @old_delayed_updates = @@global.low_priority_updates;
set global low_priority_updates = 1;
diff --git a/mysql-test/main/delete_use_source.result b/mysql-test/main/delete_use_source.result
index 08da8901528..a9a6df88077 100644
--- a/mysql-test/main/delete_use_source.result
+++ b/mysql-test/main/delete_use_source.result
@@ -6,6 +6,7 @@ insert t1 select 2,seq from seq_1_to_50;
insert t1 select 3,seq from seq_1_to_20;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
#
# Delete with limit (quick select - range acces)
@@ -47,8 +48,8 @@ rollback;
start transaction;
explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL c1 NULL NULL NULL 502 Using where
-2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 58 Using index
+1 PRIMARY t1 range c1 c1 4 NULL 600 Using where
+2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 167 Using index
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
affected rows: 1
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
@@ -63,8 +64,8 @@ rollback;
start transaction;
explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL c1 NULL NULL NULL 502 Using where
-2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 58 Using index
+1 PRIMARY t1 ALL c1 NULL NULL NULL 670 Using where
+2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 167 Using index
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 ;
affected rows: 500
select count(*) from v1 where c1=0;
diff --git a/mysql-test/main/deprecated_features.result b/mysql-test/main/deprecated_features.result
index fc6c86d065d..2c77d745e2e 100644
--- a/mysql-test/main/deprecated_features.result
+++ b/mysql-test/main/deprecated_features.result
@@ -5,7 +5,7 @@ ERROR HY000: Unknown system variable 'table_type'
select @@table_type='MyISAM';
ERROR HY000: Unknown system variable 'table_type'
backup table t1 to 'data.txt';
-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 'backup table t1 to 'data.txt'' at line 1
+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 'table t1 to 'data.txt'' at line 1
restore table t1 from 'data.txt';
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 'restore table t1 from 'data.txt'' at line 1
show plugin;
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index c73fb80d1a4..473415ac099 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -10403,6 +10403,99 @@ f
3
DROP VIEW v1;
DROP TABLE t1;
+#
+# MDEV-17574: pushdown into derived from mergeable view
+# used in multi-table UPDATE
+# pushdown into materialized derived from mergeable view
+# used in SELECT
+#
+CREATE TABLE t1 (f1 text, f2 int);
+INSERT INTO t1 VALUES ('x',1), ('y',2);
+CREATE VIEW v1 AS SELECT f2 FROM ( SELECT f2 FROM t1 ) AS t;
+UPDATE v1, t1 SET t1.f1 = 'z' WHERE v1.f2 < 2 AND t1.f2 = v1.f2;
+EXPLAIN FORMAT=JSON UPDATE v1, t1 SET t1.f1 = 'z' WHERE v1.f2 < 2 AND t1.f2 = v1.f2;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "t.f2 < 2",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "t1.f2 < 2"
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "t1.f2 = t.f2"
+ }
+ }
+}
+SELECT * FROM t1;
+f1 f2
+z 1
+y 2
+CREATE VIEW v2 AS SELECT f2 FROM ( SELECT DISTINCT f2 FROM t1 ) AS t;
+SELECT * FROM v2, t1 WHERE v2.f2 < 2 AND t1.f2 = v2.f2;
+f2 f1 f2
+1 z 1
+EXPLAIN FORMAT=JSON SELECT * FROM v2, t1 WHERE v2.f2 < 2 AND t1.f2 = v2.f2;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "t.f2 < 2",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "t1.f2 < 2"
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "t1.f2 = t.f2"
+ }
+ }
+}
+DROP VIEW v1,v2;
+DROP TABLE t1;
# End of 10.2 tests
#
# MDEV-14579: pushdown conditions into materialized views/derived tables
@@ -13870,16 +13963,16 @@ a b max_c a b c
1 21 345 3 21 231
select * from v1,t2 where (v1.b=t2.b) and (v1.a<5);
a b max_c a b c
-1 21 345 3 21 231
2 33 7 5 33 207
-2 33 7 8 33 117
-3 21 500 3 21 231
4 33 123 5 33 207
+2 33 7 8 33 117
4 33 123 8 33 117
+1 21 345 3 21 231
+3 21 500 3 21 231
explain select * from v1,t2 where (v1.b=t2.b) and (v1.a<5);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 9
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where; Using join buffer (flat, BNL join)
2 DERIVED t3 range i1 i1 5 NULL 5 Using index condition
explain format=json select * from v1,t2 where (v1.b=t2.b) and (v1.a<5);
EXPLAIN
@@ -13887,23 +13980,11 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "t2",
+ "table_name": "<derived2>",
"access_type": "ALL",
- "rows": 9,
- "filtered": 100
- },
- "block-nl-join": {
- "table": {
- "table_name": "<derived2>",
- "access_type": "ALL",
- "rows": 5,
- "filtered": 80,
- "attached_condition": "v1.a < 5"
- },
- "buffer_type": "flat",
- "buffer_size": "256Kb",
- "join_type": "BNL",
- "attached_condition": "v1.b = t2.b",
+ "rows": 5,
+ "filtered": 100,
+ "attached_condition": "v1.a < 5",
"materialized": {
"query_block": {
"select_id": 2,
@@ -13920,6 +14001,18 @@ EXPLAIN
}
}
}
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "t2.b = v1.b"
}
}
}
@@ -14843,7 +14936,9 @@ insert into t2 values
insert into t2 select a+10, b+10, concat(c,'f') from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
set statement optimizer_switch='split_materialized=off' for select t1.a,t.s,t.m
from t1 join
@@ -14873,7 +14968,7 @@ where t1.b < 3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 range idx_b idx_b 5 NULL 4 100.00 Using index condition; Using where
1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2 100.00
-2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 2 100.00
+2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 1 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`s` AS `s`,`t`.`m` AS `m` from `test`.`t1` join (/* select#2 */ select `test`.`t2`.`a` AS `a`,sum(`test`.`t2`.`b`) AS `s`,min(`test`.`t2`.`c`) AS `m` from `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` group by `test`.`t2`.`a`) `t` where `t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`b` < 3
explain format=json select t1.a,t.s,t.m
@@ -14919,7 +15014,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t1.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100
}
}
@@ -14982,10 +15077,10 @@ on t1.a=t.a
where t1.b <= 5;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL idx_b NULL NULL NULL 12 83.33 Using where
-1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 9 100.00
-2 DERIVED t2 ALL idx_a NULL NULL NULL 90 100.00 Using temporary; Using filesort
+1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2 100.00
+2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 1 100.00
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`s` AS `s`,`t`.`m` AS `m` from `test`.`t1` join (/* select#2 */ select `test`.`t2`.`a` AS `a`,sum(`test`.`t2`.`b`) AS `s`,min(`test`.`t2`.`b`) AS `m` from `test`.`t2` group by `test`.`t2`.`a`) `t` where `t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`b` <= 5
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`s` AS `s`,`t`.`m` AS `m` from `test`.`t1` join (/* select#2 */ select `test`.`t2`.`a` AS `a`,sum(`test`.`t2`.`b`) AS `s`,min(`test`.`t2`.`b`) AS `m` from `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` group by `test`.`t2`.`a`) `t` where `t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`b` <= 5
explain format=json select t1.a,t.s,t.m
from t1 join
(select a, sum(t2.b) as s, min(t2.b) as m from t2 group by t2.a) t
@@ -15011,22 +15106,22 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t1.a"],
- "rows": 9,
+ "rows": 2,
"filtered": 100,
"materialized": {
"query_block": {
"select_id": 2,
- "filesort": {
- "sort_key": "t2.a",
- "temporary_table": {
- "table": {
- "table_name": "t2",
- "access_type": "ALL",
- "possible_keys": ["idx_a"],
- "rows": 90,
- "filtered": 100
- }
- }
+ "outer_ref_condition": "t1.a is not null",
+ "table": {
+ "table_name": "t2",
+ "access_type": "ref",
+ "possible_keys": ["idx_a"],
+ "key": "idx_a",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t1.a"],
+ "rows": 1,
+ "filtered": 100
}
}
}
@@ -15085,11 +15180,11 @@ from t1 left join
(select a, max(t2.b) max, min(t2.b) min from t2 group by t2.a) t
on t1.a=t.a;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
-1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 2 100.00 Using where
-2 LATERAL DERIVED t2 ref idx_a idx_a 5 test.t1.a 2 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 12 100.00
+1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 9 100.00 Using where
+2 DERIVED t2 ALL idx_a NULL NULL NULL 90 100.00 Using temporary; Using filesort
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`max` AS `max`,`t`.`min` AS `min` from `test`.`t1` left join (/* select#2 */ select `test`.`t2`.`a` AS `a`,max(`test`.`t2`.`b`) AS `max`,min(`test`.`t2`.`b`) AS `min` from `test`.`t2` where `test`.`t2`.`a` = `test`.`t1`.`a` group by `test`.`t2`.`a`) `t` on(`t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` is not null) where 1
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`t`.`max` AS `max`,`t`.`min` AS `min` from `test`.`t1` left join (/* select#2 */ select `test`.`t2`.`a` AS `a`,max(`test`.`t2`.`b`) AS `max`,min(`test`.`t2`.`b`) AS `min` from `test`.`t2` group by `test`.`t2`.`a`) `t` on(`t`.`a` = `test`.`t1`.`a` and `test`.`t1`.`a` is not null) where 1
explain format=json select t1.a,t.max,t.min
from t1 left join
(select a, max(t2.b) max, min(t2.b) min from t2 group by t2.a) t
@@ -15102,7 +15197,7 @@ EXPLAIN
"table": {
"table_name": "t1",
"access_type": "ALL",
- "rows": 4,
+ "rows": 12,
"filtered": 100
},
"table": {
@@ -15113,23 +15208,23 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t1.a"],
- "rows": 2,
+ "rows": 9,
"filtered": 100,
"attached_condition": "trigcond(trigcond(t1.a is not null))",
"materialized": {
"query_block": {
"select_id": 2,
- "outer_ref_condition": "t1.a is not null",
- "table": {
- "table_name": "t2",
- "access_type": "ref",
- "possible_keys": ["idx_a"],
- "key": "idx_a",
- "key_length": "5",
- "used_key_parts": ["a"],
- "ref": ["test.t1.a"],
- "rows": 2,
- "filtered": 100
+ "filesort": {
+ "sort_key": "t2.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "possible_keys": ["idx_a"],
+ "rows": 90,
+ "filtered": 100
+ }
+ }
}
}
}
@@ -15150,7 +15245,9 @@ insert into t4 values
insert into t4 select a+10, b+10, concat(c,'f') from t4;
analyze table t3,t4;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
set statement optimizer_switch='split_materialized=off' for select t3.a,t3.c,t.max,t.min
from t3 join
@@ -15466,8 +15563,11 @@ insert into t4 select a+100, b+100, concat(c,'g') from t4;
insert into t4 select a+1000, b+1000, concat(c,'h') from t4;
analyze table t2,t3,t4;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
set statement optimizer_switch='split_materialized=off' for select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min
from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t
@@ -15488,9 +15588,9 @@ from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t
where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 range idx idx 133 NULL 2 100.00 Using index condition; Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 2 100.00
-2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 3 100.00
+2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 2 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`t`.`c` AS `t_c`,`t`.`max` AS `max`,`t`.`min` AS `min` from `test`.`t2` join `test`.`t3` join (/* select#2 */ select `test`.`t4`.`c` AS `c`,max(`test`.`t4`.`b`) AS `max`,min(`test`.`t4`.`b`) AS `min` from `test`.`t4` where `test`.`t4`.`c` = `test`.`t3`.`c` group by `test`.`t4`.`c`) `t` where `test`.`t3`.`a` = `test`.`t2`.`a` and `t`.`c` = `test`.`t3`.`c` and `test`.`t2`.`b` between 80 and 85 and `test`.`t2`.`c` in ('y','z')
explain format=json select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min
@@ -15520,7 +15620,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -15546,7 +15646,7 @@ EXPLAIN
"key_length": "128",
"used_key_parts": ["c"],
"ref": ["test.t3.c"],
- "rows": 3,
+ "rows": 2,
"filtered": 100
}
}
@@ -15634,8 +15734,8 @@ explain extended select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min
from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t
where t2.b < 40 and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 90 100.00 Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 90 33.33 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 10 100.00
2 DERIVED t4 ALL idx_c NULL NULL NULL 160 100.00 Using temporary; Using filesort
Warnings:
@@ -15651,7 +15751,7 @@ EXPLAIN
"table_name": "t2",
"access_type": "ALL",
"rows": 90,
- "filtered": 100,
+ "filtered": 33.333,
"attached_condition": "t2.b < 40 and t2.a is not null"
},
"table": {
@@ -15662,7 +15762,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -15735,9 +15835,9 @@ from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t
where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 range idx idx 133 NULL 2 100.00 Using index condition; Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 2 100.00
-2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 3 100.00 Using temporary
+2 LATERAL DERIVED t4 ref idx_c idx_c 128 test.t3.c 2 100.00 Using temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`t`.`c` AS `c`,`t`.`b` AS `b`,`t`.`sum(b) over (partition by c)` AS `sum(b) over (partition by c)` from `test`.`t2` join `test`.`t3` join (/* select#2 */ select `test`.`t4`.`c` AS `c`,`test`.`t4`.`b` AS `b`,sum(`test`.`t4`.`b`) over ( partition by `test`.`t4`.`c`) AS `sum(b) over (partition by c)` from `test`.`t4` where `test`.`t4`.`c` = `test`.`t3`.`c`) `t` where `test`.`t3`.`a` = `test`.`t2`.`a` and `t`.`c` = `test`.`t3`.`c` and `test`.`t2`.`b` between 80 and 85 and `test`.`t2`.`c` in ('y','z')
explain format=json select *
@@ -15767,7 +15867,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -15800,7 +15900,7 @@ EXPLAIN
"key_length": "128",
"used_key_parts": ["c"],
"ref": ["test.t3.c"],
- "rows": 3,
+ "rows": 2,
"filtered": 100
}
}
@@ -16130,8 +16230,8 @@ explain extended select *
from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t
where t2.b < 40 and t2.a=t3.a and t3.c=t.c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 90 100.00 Using where
-1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 2 100.00 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 90 33.33 Using where
+1 PRIMARY t3 ref idx_a idx_a 5 test.t2.a 1 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 128 test.t3.c 10 100.00
2 DERIVED t4 ALL idx_c NULL NULL NULL 160 100.00 Using temporary
Warnings:
@@ -16147,7 +16247,7 @@ EXPLAIN
"table_name": "t2",
"access_type": "ALL",
"rows": 90,
- "filtered": 100,
+ "filtered": 33.333,
"attached_condition": "t2.b < 40 and t2.a is not null"
},
"table": {
@@ -16158,7 +16258,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["a"],
"ref": ["test.t2.a"],
- "rows": 2,
+ "rows": 1,
"filtered": 100,
"attached_condition": "t3.c is not null"
},
@@ -16214,9 +16314,13 @@ INSERT INTO t4 VALUES
(5,'zzz'),(9,'xyz'),(2,'yxz'),(5,'zxy'),(7,'zyx') ;
ANALYZE TABLE t1,t2,t3,t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
CREATE VIEW v1 AS
SELECT c FROM t3
@@ -16558,8 +16662,11 @@ INSERT INTO t3 VALUES
(3), (4), (1), (8), (3);
ANALYZE tables t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SELECT *
FROM t3,
@@ -16589,7 +16696,7 @@ WHERE t3.d = dt.b;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 5 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 5 test.t3.d 2 100.00
-2 LATERAL DERIVED t1 ref idx_b idx_b 5 test.t3.d 2 100.00 Using index; Using temporary; Using filesort
+2 LATERAL DERIVED t1 ref idx_b idx_b 5 test.t3.d 1 100.00 Using index; Using temporary; Using filesort
2 LATERAL DERIVED t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join)
Warnings:
Note 1003 /* select#1 */ select `test`.`t3`.`d` AS `d`,`dt`.`b` AS `b`,`dt`.`c` AS `c` from `test`.`t3` join (/* select#2 */ select `test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`b` = `test`.`t3`.`d` group by `test`.`t1`.`b`,`test`.`t2`.`c`) `dt` where `dt`.`b` = `test`.`t3`.`d`
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test
index 659bc2026ff..076d39c1abd 100644
--- a/mysql-test/main/derived_cond_pushdown.test
+++ b/mysql-test/main/derived_cond_pushdown.test
@@ -2075,6 +2075,33 @@ SELECT * FROM t1;
DROP VIEW v1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-17574: pushdown into derived from mergeable view
+--echo # used in multi-table UPDATE
+--echo # pushdown into materialized derived from mergeable view
+--echo # used in SELECT
+--echo #
+
+CREATE TABLE t1 (f1 text, f2 int);
+INSERT INTO t1 VALUES ('x',1), ('y',2);
+
+CREATE VIEW v1 AS SELECT f2 FROM ( SELECT f2 FROM t1 ) AS t;
+let $q1 =
+UPDATE v1, t1 SET t1.f1 = 'z' WHERE v1.f2 < 2 AND t1.f2 = v1.f2;
+eval $q1;
+eval EXPLAIN FORMAT=JSON $q1;
+
+SELECT * FROM t1;
+
+CREATE VIEW v2 AS SELECT f2 FROM ( SELECT DISTINCT f2 FROM t1 ) AS t;
+let $q2 =
+SELECT * FROM v2, t1 WHERE v2.f2 < 2 AND t1.f2 = v2.f2;
+eval $q2;
+eval EXPLAIN FORMAT=JSON $q2;
+
+DROP VIEW v1,v2;
+DROP TABLE t1;
+
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result
index 21dbd494e4b..5073aa84c13 100644
--- a/mysql-test/main/derived_split_innodb.result
+++ b/mysql-test/main/derived_split_innodb.result
@@ -11,6 +11,7 @@ KEY n1_c1_n2 (n1,c1,n2)
INSERT INTO t1 VALUES (0, 2, 'a'), (1, 3, 'a');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT t1.n1 FROM t1, (SELECT n1, n2 FROM t1 WHERE c1 = 'a' GROUP BY n1) as t
WHERE t.n1 = t1.n1 AND t.n2 = t1.n2 AND c1 = 'a' GROUP BY n1;
diff --git a/mysql-test/main/derived_view.result b/mysql-test/main/derived_view.result
index 86dd73f5733..45de32d1ee1 100644
--- a/mysql-test/main/derived_view.result
+++ b/mysql-test/main/derived_view.result
@@ -2939,21 +2939,23 @@ insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain select a from t1 where a in (select b from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1)
+1 PRIMARY t2 ref idx idx 5 test.t1.a 139 Using index; FirstMatch(t1)
explain select * from (select a from t1 where a in (select b from t2)) t;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1)
+1 PRIMARY t2 ref idx idx 5 test.t1.a 139 Using index; FirstMatch(t1)
create view v1 as select a from t1 where a in (select b from t2);
explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 7 Using where
-1 PRIMARY t2 ref idx idx 5 test.t1.a 140 Using index; FirstMatch(t1)
+1 PRIMARY t2 ref idx idx 5 test.t1.a 139 Using index; FirstMatch(t1)
drop view v1;
drop table t1,t2;
#
diff --git a/mysql-test/main/disabled.def b/mysql-test/main/disabled.def
index e83ff00d10b..eecee845a35 100644
--- a/mysql-test/main/disabled.def
+++ b/mysql-test/main/disabled.def
@@ -14,11 +14,10 @@ events_time_zone : Test is not predictable as it depends on precise timi
read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
#show_explain : Psergey: random timeout in range-checked-for-each record query.
-ssl_crl_clients_valid : broken upstream
-ssl_crl : broken upstream
-ssl_crl_clrpath : broken upstream
innodb-wl5522-debug-zip : broken upstream
innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
-connect-abstract : waiting for libmariadb update
+mysqlcheck : special tables like proxy , host specific to a system are shown
+flush_read_lock : special tables like proxy , host specific to a system are shown
+join_cache : enable after MDEV-17752 is fixed
diff --git a/mysql-test/main/distinct.result b/mysql-test/main/distinct.result
index 70bce519ad2..8fcc45e740a 100644
--- a/mysql-test/main/distinct.result
+++ b/mysql-test/main/distinct.result
@@ -173,9 +173,9 @@ INSERT INTO t2 values (1),(2),(3);
INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using where; Using temporary
+1 SIMPLE t2 index a a 4 NULL 5 Using index; Using temporary
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using where
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using index
-1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Using join buffer (flat, BNL join)
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
a
1
@@ -1049,4 +1049,24 @@ b1+'0' b2+'0' b3+'0' b4+'0' b5+'0' b6 +'0'
1 0 0 1 0 1
0 1 0 0 1 0
DROP TABLE t1;
+#
+# MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free
+# or Invalid write in JOIN::make_aggr_tables_info
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY);
+INSERT INTO t1 VALUES (1),(2);
+explain
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) )
+UNION
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using index; Using temporary
+2 UNCACHEABLE UNION t1 index NULL PRIMARY 4 NULL 2 Using index; Using temporary
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) )
+UNION
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) );
+1
+1
+drop table t1;
End of 5.5 tests
diff --git a/mysql-test/main/distinct.test b/mysql-test/main/distinct.test
index c11f8b501bc..d41340c29fd 100644
--- a/mysql-test/main/distinct.test
+++ b/mysql-test/main/distinct.test
@@ -798,4 +798,22 @@ CREATE TABLE t1 (b1 BIT, b2 BIT, b3 BIT, b4 BIT , b5 BIT, b6 BIT);
INSERT INTO t1 VALUES (1,0,0,1,0,1),(0,1,0,0,1,0);
SELECT DISTINCT b1+'0', b2+'0', b3+'0', b4+'0', b5+'0', b6 +'0' FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free
+--echo # or Invalid write in JOIN::make_aggr_tables_info
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY);
+INSERT INTO t1 VALUES (1),(2);
+explain
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) )
+UNION
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) );
+
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) )
+UNION
+( SELECT DISTINCT 1 FROM t1 ORDER BY BENCHMARK(1, MIN(pk)) );
+drop table t1;
+
--echo End of 5.5 tests
diff --git a/mysql-test/main/empty_user_table.result b/mysql-test/main/empty_user_table.result
index 54a7fd4907b..924e4cd8ea5 100644
--- a/mysql-test/main/empty_user_table.result
+++ b/mysql-test/main/empty_user_table.result
@@ -1,9 +1,14 @@
-create table t1 as select * from mysql.user;
-truncate table mysql.user;
+create table t1 as select * from mysql.global_priv;
+truncate table mysql.global_priv;
flush privileges;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1;
Got one of the listed errors
-insert mysql.user select * from t1;
+insert mysql.global_priv select * from t1;
drop table t1;
flush privileges;
+truncate table mysql.user;
+flush privileges;
+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
+connect fail,localhost,u1;
+Got one of the listed errors
diff --git a/mysql-test/main/empty_user_table.test b/mysql-test/main/empty_user_table.test
index b54f2109e30..8a544fece83 100644
--- a/mysql-test/main/empty_user_table.test
+++ b/mysql-test/main/empty_user_table.test
@@ -4,8 +4,8 @@
source include/not_embedded.inc;
-create table t1 as select * from mysql.user;
-truncate table mysql.user;
+create table t1 as select * from mysql.global_priv;
+truncate table mysql.global_priv;
flush privileges;
# connecting via unix socket gives ER_ACCESS_DENIED_ERROR
@@ -14,7 +14,23 @@ flush privileges;
--error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED
connect (fail,localhost,u1);
-insert mysql.user select * from t1;
+insert mysql.global_priv select * from t1;
drop table t1;
flush privileges;
+#
+# same with mysql.user
+#
+
+source include/switch_to_mysql_user.inc;
+truncate table mysql.user;
+
+flush privileges;
+
+# connecting via unix socket gives ER_ACCESS_DENIED_ERROR
+# connecting via tcp/ip gives ER_HOST_NOT_PRIVILEGED
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR,ER_HOST_NOT_PRIVILEGED
+connect (fail,localhost,u1);
+
+source include/switch_to_mysql_global_priv.inc;
diff --git a/mysql-test/main/events_bugs.result b/mysql-test/main/events_bugs.result
index b56912dea7e..3e770451735 100644
--- a/mysql-test/main/events_bugs.result
+++ b/mysql-test/main/events_bugs.result
@@ -96,7 +96,7 @@ select release_lock('ee_16407_2');
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
end|
insert into events_test.events_smode_test values ('test','1980-19-02')|
-ERROR 22007: Incorrect date value: '1980-19-02' for column 'a' at row 1
+ERROR 22007: Incorrect date value: '1980-19-02' for column `events_test`.`events_smode_test`.`a` at row 1
"This is ok"
create event ee_16407_3 on schedule every 60 second do
begin
diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result
index df82b2e31cc..2f60a827cc0 100644
--- a/mysql-test/main/explain_json.result
+++ b/mysql-test/main/explain_json.result
@@ -1029,6 +1029,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/explain_non_select.result b/mysql-test/main/explain_non_select.result
index 5a6b9f841c2..51414d0c196 100644
--- a/mysql-test/main/explain_non_select.result
+++ b/mysql-test/main/explain_non_select.result
@@ -229,7 +229,7 @@ INSERT INTO t1 VALUES (1),(2);
EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE user index NULL PRIMARY 420 NULL 4 Using index
+1 SIMPLE global_priv index NULL PRIMARY 420 NULL 4 Using index
DROP TABLE t1;
DROP VIEW v1;
#
diff --git a/mysql-test/main/failed_auth_3909.result b/mysql-test/main/failed_auth_3909.result
index 4c3c0aba9df..19951415585 100644
--- a/mysql-test/main/failed_auth_3909.result
+++ b/mysql-test/main/failed_auth_3909.result
@@ -1,24 +1,17 @@
-optimize table mysql.user;
-Table Op Msg_type Msg_text
-mysql.user optimize status OK
-insert ignore mysql.user (user,plugin) values ('foo','mysql_old_password'),('bar','mysql_old_password'),('baz','mysql_old_password');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
-flush privileges;
+create user foo identified via mysql_old_password;
+create user bar identified via mysql_old_password;
+create user baz identified via mysql_old_password;
connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u1;
-ERROR HY000: Server is running in --secure-auth mode, but 'u1'@'localhost' has a password in the old format; please change the password to the new format
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u2;
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
+ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format
connect(localhost,u2,password,test,MASTER_PORT,MASTER_SOCKET);
connect fail,localhost,u2,password;
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
-ERROR HY000: Server is running in --secure-auth mode, but 'u1'@'localhost' has a password in the old format; please change the password to the new format
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
-ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
+ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format
+ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
+ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format
+ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format
delete from mysql.user where plugin = 'mysql_old_password';
flush privileges;
diff --git a/mysql-test/main/failed_auth_3909.test b/mysql-test/main/failed_auth_3909.test
index fb104cf4b81..25e45e49a0e 100644
--- a/mysql-test/main/failed_auth_3909.test
+++ b/mysql-test/main/failed_auth_3909.test
@@ -6,29 +6,29 @@ source include/not_embedded.inc;
# verify that for some failed login attemps (with wrong user names)
# the server requests a plugin
#
-optimize table mysql.user;
-insert ignore mysql.user (user,plugin) values ('foo','mysql_old_password'),('bar','mysql_old_password'),('baz','mysql_old_password');
-flush privileges;
+create user foo identified via mysql_old_password;
+create user bar identified via mysql_old_password;
+create user baz identified via mysql_old_password;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_SERVER_IS_IN_SECURE_AUTH_MODE
+--error ER_ACCESS_DENIED_ERROR
connect (fail,localhost,u1);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_ACCESS_DENIED_ERROR
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
connect (fail,localhost,u2);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_ACCESS_DENIED_ERROR
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
connect (fail,localhost,u2,password);
---error ER_SERVER_IS_IN_SECURE_AUTH_MODE
+--error ER_ACCESS_DENIED_ERROR
change_user u1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
change_user u2;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
change_user u2,password;
delete from mysql.user where plugin = 'mysql_old_password';
diff --git a/mysql-test/main/failed_auth_unixsocket.result b/mysql-test/main/failed_auth_unixsocket.result
index 3b2cff7e845..b2081c9ba84 100644
--- a/mysql-test/main/failed_auth_unixsocket.result
+++ b/mysql-test/main/failed_auth_unixsocket.result
@@ -1,4 +1,4 @@
-update mysql.user set plugin='unix_socket';
+update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
flush privileges;
Warnings:
Warning 1524 Plugin 'unix_socket' is not loaded
@@ -13,6 +13,6 @@ flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'USER'@'localhost'
ERROR 28000: Access denied for user 'USER'@'localhost'
-update mysql.user set plugin='';
+update mysql.global_priv set priv=json_remove(priv, '$.plugin');
flush privileges;
uninstall plugin unix_socket;
diff --git a/mysql-test/main/failed_auth_unixsocket.test b/mysql-test/main/failed_auth_unixsocket.test
index 5dfd9585882..179e561e9ed 100644
--- a/mysql-test/main/failed_auth_unixsocket.test
+++ b/mysql-test/main/failed_auth_unixsocket.test
@@ -4,7 +4,7 @@
# MDEV-3909 remote user enumeration
# unix_socket tests
#
-update mysql.user set plugin='unix_socket';
+update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
flush privileges;
# Make sure that the replace works, even if $USER is 'user' or something else
@@ -36,7 +36,7 @@ connect (fail,localhost,$USER);
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
change_user $USER;
-update mysql.user set plugin='';
+update mysql.global_priv set priv=json_remove(priv, '$.plugin');
flush privileges;
uninstall plugin unix_socket;
diff --git a/mysql-test/main/flush.result b/mysql-test/main/flush.result
index af8e327657b..8149ce29dec 100644
--- a/mysql-test/main/flush.result
+++ b/mysql-test/main/flush.result
@@ -364,16 +364,19 @@ flush table t1;
connection default;
# Let flush table sync in.
select * from t1;
+a
connection con1;
select * from t1;
a
unlock tables;
+connection default;
+select count(*) from information_schema.processlist where state = "Waiting for table metadata lock";
+count(*)
+1
+commit;
connection con2;
# Reaping 'flush table t1'...
connection default;
-# Reaping 'select * from t1'...
-a
-commit;
#
# Repeat the same test but with FLUSH TABLES
#
@@ -386,13 +389,10 @@ connection con1;
#
lock table t1 read;
connection con2;
-#
-# FLUSH TABLES expels the table definition from the cache.
-# Sending 'flush tables'...
flush tables;
connection default;
-# Let flush table sync in.
select * from t1;
+a
connection con1;
select * from t1;
a
@@ -400,8 +400,6 @@ unlock tables;
connection con2;
# Reaping 'flush tables'...
connection default;
-# Reaping 'select * from t1'...
-a
commit;
# Cleanup
connection con1;
@@ -472,10 +470,7 @@ create table t1 (i int);
create table t2 (i int);
handler t1 open;
connection con1;
-# Sending:
flush tables with read lock;
-connection con2;
-# Wait until FTWRL starts waiting for 't1' to be closed.
connection default;
# The below statement should not cause deadlock.
# Sending:
@@ -483,8 +478,6 @@ insert into t2 values (1);
connection con2;
# Wait until INSERT starts to wait for FTWRL to go away.
connection con1;
-# FTWRL should be able to continue now.
-# Reap FTWRL.
unlock tables;
connection default;
# Reap INSERT.
diff --git a/mysql-test/main/flush.test b/mysql-test/main/flush.test
index 51b5c48c137..17f9241a122 100644
--- a/mysql-test/main/flush.test
+++ b/mysql-test/main/flush.test
@@ -449,24 +449,20 @@ connection default;
--echo # Let flush table sync in.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
+ where state = "Waiting for table metadata lock"
and info = "flush table t1";
--source include/wait_condition.inc
-send select * from t1;
+select * from t1;
connection con1;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "select * from t1";
select * from t1;
unlock tables;
+connection default;
+select count(*) from information_schema.processlist where state = "Waiting for table metadata lock";
+commit;
connection con2;
--echo # Reaping 'flush table t1'...
reap;
connection default;
---echo # Reaping 'select * from t1'...
-reap;
-commit;
--echo #
--echo # Repeat the same test but with FLUSH TABLES
@@ -480,31 +476,16 @@ connection con1;
--echo #
lock table t1 read;
connection con2;
---echo #
---echo # FLUSH TABLES expels the table definition from the cache.
---echo # Sending 'flush tables'...
send flush tables;
connection default;
---echo # Let flush table sync in.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "flush tables";
---source include/wait_condition.inc
-send select * from t1;
+select * from t1;
connection con1;
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "select * from t1";
select * from t1;
unlock tables;
connection con2;
--echo # Reaping 'flush tables'...
reap;
connection default;
---echo # Reaping 'select * from t1'...
-reap;
commit;
--echo # Cleanup
@@ -566,17 +547,7 @@ create table t2 (i int);
handler t1 open;
connection con1;
---echo # Sending:
---send flush tables with read lock
-
-connection con2;
---echo # Wait until FTWRL starts waiting for 't1' to be closed.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush"
- and info = "flush tables with read lock";
---source include/wait_condition.inc
-
+flush tables with read lock;
connection default;
--echo # The below statement should not cause deadlock.
--echo # Sending:
@@ -586,14 +557,11 @@ connection con2;
--echo # Wait until INSERT starts to wait for FTWRL to go away.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock"
+ where state = "Waiting for backup lock"
and info = "insert into t2 values (1)";
--source include/wait_condition.inc
connection con1;
---echo # FTWRL should be able to continue now.
---echo # Reap FTWRL.
---reap
unlock tables;
connection default;
diff --git a/mysql-test/main/flush_block_commit.test b/mysql-test/main/flush_block_commit.test
index 6a6120ce63f..0280aedf2ca 100644
--- a/mysql-test/main/flush_block_commit.test
+++ b/mysql-test/main/flush_block_commit.test
@@ -32,7 +32,7 @@ connection con2;
--echo # Wait until COMMIT gets blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and info = "COMMIT";
+ where state = "Waiting for backup lock" and info = "COMMIT";
--source include/wait_condition.inc
--echo # Verify that 'con1' was blocked and data did not move.
SELECT * FROM t1;
diff --git a/mysql-test/main/flush_block_commit_notembedded.test b/mysql-test/main/flush_block_commit_notembedded.test
index 3d894c5f16c..5be9e50e58b 100644
--- a/mysql-test/main/flush_block_commit_notembedded.test
+++ b/mysql-test/main/flush_block_commit_notembedded.test
@@ -46,7 +46,7 @@ begin;
connection con1;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t1 values (1)";
--source include/wait_condition.inc
unlock tables;
diff --git a/mysql-test/main/flush_read_lock.result b/mysql-test/main/flush_read_lock.result
index 55c31ae8d12..33dc1092190 100644
--- a/mysql-test/main/flush_read_lock.result
+++ b/mysql-test/main/flush_read_lock.result
@@ -652,6 +652,7 @@ connection default;
# 14.2) FLUSH TABLES <list> WITH READ LOCK is not blocked by
# active FTWRL. But since the latter keeps tables open
# FTWRL is blocked by FLUSH TABLES <list> WITH READ LOCK.
+# Fixed by MDEV-5336
flush tables with read lock;
# FT <list> WRL is allowed under FTWRL at the moment.
# It does not make much sense though.
@@ -668,12 +669,9 @@ connection default;
flush tables t1_base, t2_base with read lock;
connection con1;
flush tables with read lock;
-connection con2;
-# Wait until FTWRL is blocked.
connection default;
unlock tables;
connection con1;
-# Reap FTWRL.
unlock tables;
connection default;
#
@@ -1677,3 +1675,57 @@ disconnect con1;
disconnect con2;
disconnect con3;
set global sql_mode=default;
+#
+# Deadlock between FTWRL under open handler and DDL/LOCK TABLES
+#
+CREATE TABLE t1(a INT);
+HANDLER t1 OPEN;
+#
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+LOCK TABLE t1 WRITE;
+#
+# we need to do it in a separate connection,
+# because SET DEBUG_SYNC call open_tables()/mysql_ha_flush() :(
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+disconnect con2;
+#
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+HANDLER t1 CLOSE;
+#
+connection con1;
+UNLOCK TABLES;
+disconnect con1;
+#
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+#
+# Make sure pending LOCK TABLES doesn't block FTWRL
+#
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+#
+connect con1,localhost,root,,;
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+LOCK TABLE t1 WRITE;
+#
+connect con2,localhost,root,,;
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+disconnect con2;
+#
+connection default;
+UNLOCK TABLES;
+#
+connection con1;
+UNLOCK TABLES;
+disconnect con1;
+#
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/main/flush_read_lock.test b/mysql-test/main/flush_read_lock.test
index 4a9752ae9f1..f39dbecf4a9 100644
--- a/mysql-test/main/flush_read_lock.test
+++ b/mysql-test/main/flush_read_lock.test
@@ -259,7 +259,7 @@ connection $con_aux1;
--echo # Wait until COMMIT is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "commit";
--source include/wait_condition.inc
unlock tables;
@@ -281,7 +281,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -565,7 +565,7 @@ connection $con_aux1;
--echo # Check that EXECUTE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t1_base values (1)";
--source include/wait_condition.inc
unlock tables;
@@ -582,7 +582,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -800,6 +800,8 @@ connection default;
--echo # 14.2) FLUSH TABLES <list> WITH READ LOCK is not blocked by
--echo # active FTWRL. But since the latter keeps tables open
--echo # FTWRL is blocked by FLUSH TABLES <list> WITH READ LOCK.
+--echo # Fixed by MDEV-5336
+
flush tables with read lock;
--echo # FT <list> WRL is allowed under FTWRL at the moment.
--echo # It does not make much sense though.
@@ -815,19 +817,10 @@ unlock tables;
connection default;
flush tables t1_base, t2_base with read lock;
connection $con_aux1;
---send flush tables with read lock
-connection $con_aux2;
---echo # Wait until FTWRL is blocked.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables with read lock";
---source include/wait_condition.inc
+flush tables with read lock;
connection default;
unlock tables;
connection $con_aux1;
---echo # Reap FTWRL.
---reap
unlock tables;
connection default;
@@ -1018,7 +1011,7 @@ connection $con_aux1;
--echo # Check that LOCK TABLES WRITE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "lock tables t1_base write";
--source include/wait_condition.inc
unlock tables;
@@ -1062,7 +1055,7 @@ connection $con_aux1;
--echo # Check that OPTIMIZE TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "optimize table t1_base";
--source include/wait_condition.inc
unlock tables;
@@ -1228,7 +1221,7 @@ connection $con_aux1;
--echo # Check that REPAIR TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "repair table t1_base";
--source include/wait_condition.inc
unlock tables;
@@ -1427,7 +1420,7 @@ connection $con_aux1;
--echo # Wait until SET AUTOCOMMIT=1 is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "set autocommit= 1";
--source include/wait_condition.inc
unlock tables;
@@ -1449,7 +1442,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -1628,7 +1621,7 @@ connection $con_aux1;
--echo # Wait until XA COMMIT is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "xa commit 'test1'";
--source include/wait_condition.inc
unlock tables;
@@ -1652,7 +1645,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
set debug_sync='now SIGNAL go';
@@ -1731,7 +1724,7 @@ connection $con_aux1;
--echo # Check that ANALYZE TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "analyze table t3_trans";
--source include/wait_condition.inc
unlock tables;
@@ -1806,7 +1799,7 @@ connection $con_aux1;
--echo # Check that CHECK TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "check table t1_base";
--source include/wait_condition.inc
unlock tables;
@@ -1824,7 +1817,7 @@ connection $con_aux1;
--echo # Check that ALTER TABLE is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
+ where state = "Waiting for backup lock" and
info = "alter table t1_temp add column c1 int";
--source include/wait_condition.inc
unlock tables;
@@ -1877,7 +1870,7 @@ connection $con_aux2;
--echo # Wait until FTWRL is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
--echo # Try to run another INSERT and see that it is blocked.
@@ -1886,7 +1879,7 @@ connection con3;
--echo # Wait until new INSERT is blocked.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t2_base values (1)";
--echo # Unblock INSERT in the first connection.
set debug_sync='now SIGNAL go';
@@ -2022,3 +2015,73 @@ set global sql_mode=default;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
+
+
+--echo #
+--echo # Deadlock between FTWRL under open handler and DDL/LOCK TABLES
+--echo #
+CREATE TABLE t1(a INT);
+HANDLER t1 OPEN;
+
+--echo #
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+--send LOCK TABLE t1 WRITE
+
+--echo #
+--echo # we need to do it in a separate connection,
+--echo # because SET DEBUG_SYNC call open_tables()/mysql_ha_flush() :(
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+disconnect con2;
+
+--echo #
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+HANDLER t1 CLOSE;
+
+--echo #
+connection con1;
+reap;
+UNLOCK TABLES;
+disconnect con1;
+
+--echo #
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+
+
+--echo #
+--echo # Make sure pending LOCK TABLES doesn't block FTWRL
+--echo #
+CREATE TABLE t1(a INT);
+LOCK TABLE t1 READ;
+
+--echo #
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
+--send LOCK TABLE t1 WRITE
+
+--echo #
+connect (con2,localhost,root,,);
+SET DEBUG_SYNC= 'now WAIT_FOR ready';
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+disconnect con2;
+
+--echo #
+connection default;
+UNLOCK TABLES;
+
+--echo #
+connection con1;
+reap;
+UNLOCK TABLES;
+disconnect con1;
+
+--echo #
+connection default;
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/main/flush_read_lock_kill.test b/mysql-test/main/flush_read_lock_kill.test
index d83e5b3f1df..bd3efd7bdc4 100644
--- a/mysql-test/main/flush_read_lock_kill.test
+++ b/mysql-test/main/flush_read_lock_kill.test
@@ -51,7 +51,7 @@ SELECT ((@id := kill_id) - kill_id) FROM t1 LIMIT 1;
--echo # to active COMMIT
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock"
+ where state = "Waiting for backup lock"
and info = "flush tables with read lock";
--source include/wait_condition.inc
diff --git a/mysql-test/main/flush_ssl.result b/mysql-test/main/flush_ssl.result
new file mode 100644
index 00000000000..e2941db9f95
--- /dev/null
+++ b/mysql-test/main/flush_ssl.result
@@ -0,0 +1,26 @@
+# Kill the server
+connect ssl_con,localhost,root,,,,,SSL;
+SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+# Use a different certificate ("Not after" certificate field changed)
+FLUSH SSL;
+# Check new certificate used by new connection
+Result
+OK
+# Check that existing SSL connection still works, and uses old certificate, even if new one is loaded in FLUSH SSL
+connection ssl_con;
+SELECT IF(VARIABLE_VALUE=@ssl_not_after,'OK','FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+Result
+OK
+disconnect ssl_con;
+connection default;
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+NAME VALUE
+SSL_ACCEPTS 1
+SSL_FINISHED_ACCEPTS 1
+FLUSH SSL;
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+NAME VALUE
+SSL_ACCEPTS 0
+SSL_FINISHED_ACCEPTS 0
+# Cleanup
+# Kill the server
diff --git a/mysql-test/main/flush_ssl.test b/mysql-test/main/flush_ssl.test
new file mode 100644
index 00000000000..e7bd57b156a
--- /dev/null
+++ b/mysql-test/main/flush_ssl.test
@@ -0,0 +1,61 @@
+# MDEV-16266 Reload SSL certificate
+# This test reloads server SSL certs FLUSH SSL, and checks that
+# 1. old SSL connections (that existed before FLUSH) still work and use old certificate
+# 2. new SSL connection use new certificate
+# 3. if FLUSH SSL runs into error, SSL is still functioning
+# SWtatus variable Ssl_server_not_after is used to tell the old certificate from new.
+
+
+source include/have_ssl_communication.inc;
+
+# Restart server with cert. files located in temp directory
+# We are going to remove / replace them within the test,
+# so we can't use the ones in std_data directly.
+
+let $ssl_cert=$MYSQLTEST_VARDIR/tmp/ssl_cert.pem;
+let $ssl_key=$MYSQLTEST_VARDIR/tmp/ssl_key.pem;
+
+copy_file $MYSQL_TEST_DIR/std_data/server-key.pem $ssl_key;
+copy_file $MYSQL_TEST_DIR/std_data/server-cert.pem $ssl_cert;
+
+let $restart_parameters=--ssl-key=$ssl_key --ssl-cert=$ssl_cert;
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+
+connect ssl_con,localhost,root,,,,,SSL;
+SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+let $ssl_not_after=`SELECT @ssl_not_after`;
+
+remove_file $ssl_cert;
+remove_file $ssl_key;
+
+--echo # Use a different certificate ("Not after" certificate field changed)
+copy_file $MYSQL_TEST_DIR/std_data/server-new-key.pem $ssl_key;
+copy_file $MYSQL_TEST_DIR/std_data/server-new-cert.pem $ssl_cert;
+
+FLUSH SSL;
+
+--echo # Check new certificate used by new connection
+exec $MYSQL --ssl -e "SELECT IF(VARIABLE_VALUE <> '$ssl_not_after', 'OK', 'FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after'";
+
+--echo # Check that existing SSL connection still works, and uses old certificate, even if new one is loaded in FLUSH SSL
+connection ssl_con;
+SELECT IF(VARIABLE_VALUE=@ssl_not_after,'OK','FAIL') as Result FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
+
+disconnect ssl_con;
+connection default;
+
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+FLUSH SSL;
+#Check that accepts are zeroed by FLUSH SSL.
+SELECT VARIABLE_NAME NAME, VARIABLE_VALUE VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME in ('Ssl_accepts', 'Ssl_finished_accepts');
+
+--echo # Cleanup
+remove_file $ssl_cert;
+remove_file $ssl_key;
+# restart with usuall SSL
+let $restart_parameters=;
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+
+
diff --git a/mysql-test/main/fulltext.result b/mysql-test/main/fulltext.result
index 308d1d7fcb9..3f4223eee07 100644
--- a/mysql-test/main/fulltext.result
+++ b/mysql-test/main/fulltext.result
@@ -382,10 +382,10 @@ aus Osnabrück utf8_general_ci 1.591140
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
Warnings:
-Warning 1366 Incorrect string value: '\xD0\xAD\xD1\x82\xD0\xBE...' for column 't' at row 3
-Warning 1366 Incorrect string value: '\xD0\x9E\xD1\x82\xD0\xBB...' for column 't' at row 4
-Warning 1366 Incorrect string value: '\xD0\x9D\xD0\xB5 \xD0...' for column 't' at row 5
-Warning 1366 Incorrect string value: '\xD0\xB8 \xD0\xB1\xD1...' for column 't' at row 6
+Warning 1366 Incorrect string value: '\xD0\xAD\xD1\x82\xD0\xBE...' for column `test`.`t1`.`t` at row 3
+Warning 1366 Incorrect string value: '\xD0\x9E\xD1\x82\xD0\xBB...' for column `test`.`t1`.`t` at row 4
+Warning 1366 Incorrect string value: '\xD0\x9D\xD0\xB5 \xD0...' for column `test`.`t1`.`t` at row 5
+Warning 1366 Incorrect string value: '\xD0\xB8 \xD0\xB1\xD1...' for column `test`.`t1`.`t` at row 6
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
t collation(t)
aus Osnabrück latin1_german2_ci
diff --git a/mysql-test/main/func_default.result b/mysql-test/main/func_default.result
index 535be10da86..9699f0795e3 100644
--- a/mysql-test/main/func_default.result
+++ b/mysql-test/main/func_default.result
@@ -8,13 +8,21 @@ explain extended select default(str), default(strnull), default(intg), default(r
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
Warnings:
-Note 1003 select default('') AS `default(str)`,default('') AS `default(strnull)`,default(0) AS `default(intg)`,default(0) AS `default(rel)` from dual
+Note 1003 select default(`test`.`t1`.`str`) AS `default(str)`,default(`test`.`t1`.`strnull`) AS `default(strnull)`,default(`test`.`t1`.`intg`) AS `default(intg)`,default(`test`.`t1`.`rel`) AS `default(rel)` from dual
select * from t1 where str <> default(str);
str strnull intg rel
0 0
explain select * from t1 where str <> default(str);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
+create view v1 as select default(str), default(strnull), default(intg), default(rel) from t1;
+select * from v1;
+default(str) default(strnull) default(intg) default(rel)
+def NULL 10 3.14
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select default(`t1`.`str`) AS `default(str)`,default(`t1`.`strnull`) AS `default(strnull)`,default(`t1`.`intg`) AS `default(intg)`,default(`t1`.`rel`) AS `default(rel)` from `t1` latin1 latin1_swedish_ci
+drop view v1;
drop table t1;
CREATE TABLE t1 (id int(11), s varchar(20));
INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three');
diff --git a/mysql-test/main/func_default.test b/mysql-test/main/func_default.test
index fbd73990297..332bfca021f 100644
--- a/mysql-test/main/func_default.test
+++ b/mysql-test/main/func_default.test
@@ -11,6 +11,11 @@ explain extended select default(str), default(strnull), default(intg), default(r
select * from t1 where str <> default(str);
explain select * from t1 where str <> default(str);
+create view v1 as select default(str), default(strnull), default(intg), default(rel) from t1;
+select * from v1;
+show create view v1;
+drop view v1;
+
#TODO: uncomment when bug will be fixed
#create table t2 select default(str), default(strnull), default(intg), default(rel) from t1;
#show create table from t1;
diff --git a/mysql-test/main/func_extract.result b/mysql-test/main/func_extract.result
new file mode 100644
index 00000000000..30ec0460d61
--- /dev/null
+++ b/mysql-test/main/func_extract.result
@@ -0,0 +1,592 @@
+#
+# MDEV-17385 MICROSECOND() returns confusing results with an out-of-range TIME-alike argument
+#
+CREATE TABLE t1 (v VARCHAR(64), ll BIGINT, t TIME, dt DATETIME, d DATE);
+CREATE TABLE t2 AS SELECT
+EXTRACT(DAY FROM t),
+EXTRACT(DAY_HOUR FROM t),
+EXTRACT(DAY_MINUTE FROM t),
+EXTRACT(DAY_SECOND FROM t),
+EXTRACT(DAY_MICROSECOND FROM t),
+EXTRACT(DAY FROM d),
+EXTRACT(DAY_HOUR FROM d),
+EXTRACT(DAY_MINUTE FROM d),
+EXTRACT(DAY_SECOND FROM d),
+EXTRACT(DAY_MICROSECOND FROM d),
+EXTRACT(DAY FROM v),
+EXTRACT(DAY_HOUR FROM v),
+EXTRACT(DAY_MINUTE FROM v),
+EXTRACT(DAY_SECOND FROM v),
+EXTRACT(DAY_MICROSECOND FROM v),
+EXTRACT(DAY FROM ll),
+EXTRACT(DAY_HOUR FROM ll),
+EXTRACT(DAY_MINUTE FROM ll),
+EXTRACT(DAY_SECOND FROM ll),
+EXTRACT(DAY_MICROSECOND FROM ll)
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `EXTRACT(DAY FROM t)` int(3) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM t)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM t)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM t)` int(9) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM t)` bigint(15) DEFAULT NULL,
+ `EXTRACT(DAY FROM d)` int(3) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM d)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM d)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM d)` int(9) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM d)` bigint(15) DEFAULT NULL,
+ `EXTRACT(DAY FROM v)` int(8) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM v)` int(10) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM v)` bigint(12) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM v)` bigint(14) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM v)` bigint(20) DEFAULT NULL,
+ `EXTRACT(DAY FROM ll)` int(8) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM ll)` int(10) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM ll)` bigint(12) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM ll)` bigint(14) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM ll)` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64), b DECIMAL(32,9));
+INSERT INTO t1 VALUES
+('9999-12-31 23:59:59.123456', 99991231235959.123456),
+('2001-01-01 10:20:30.123456', 20010101102030.123456),
+('4294967296:59:59.123456', 42949672965959.123456),
+('4294967295:59:59.123456', 42949672955959.123456),
+('87649416:59:59.123456', 876494165959.123456),
+('87649415:59:59.123456', 876494155959.123456),
+('87649414:59:59.123456', 876494145959.123456),
+('9999:59:59.123456', 99995959.123456),
+('9999:01:01.123456', 99990101.123456),
+('9999:01:01', 99990101),
+('0.999999', 0.999999),
+('0.99999', 0.99999),
+('0.9999', 0.9999),
+('0.999', 0.999),
+('0.99', 0.99),
+('0.9', 0.9),
+('000000',0);
+# Summary:
+# Check that FUNC(varchar) and FUNC(decimal) give equal results
+# Expect empty sets
+SELECT a, b, EXTRACT(DAY_HOUR FROM a), EXTRACT(DAY_HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(DAY_HOUR FROM a)<=>EXTRACT(DAY_HOUR FROM b));
+a b EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_HOUR FROM b)
+SELECT a, b, EXTRACT(DAY FROM a), EXTRACT(DAY FROM b) FROM t1 WHERE NOT (EXTRACT(DAY FROM a)<=>EXTRACT(DAY FROM b));
+a b EXTRACT(DAY FROM a) EXTRACT(DAY FROM b)
+SELECT a, b, EXTRACT(HOUR FROM a), EXTRACT(HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(HOUR FROM a)<=>EXTRACT(HOUR FROM b));
+a b EXTRACT(HOUR FROM a) EXTRACT(HOUR FROM b)
+SELECT a, b, EXTRACT(MINUTE FROM a), EXTRACT(MINUTE FROM b) FROM t1 WHERE NOT (EXTRACT(MINUTE FROM a)<=>EXTRACT(MINUTE FROM b));
+a b EXTRACT(MINUTE FROM a) EXTRACT(MINUTE FROM b)
+SELECT a, b, EXTRACT(SECOND FROM a), EXTRACT(SECOND FROM b) FROM t1 WHERE NOT (EXTRACT(SECOND FROM a)<=>EXTRACT(SECOND FROM b));
+a b EXTRACT(SECOND FROM a) EXTRACT(SECOND FROM b)
+SELECT a, b, EXTRACT(MICROSECOND FROM a), EXTRACT(MICROSECOND FROM b) FROM t1 WHERE NOT (EXTRACT(MICROSECOND FROM a)<=>EXTRACT(MICROSECOND FROM b));
+a b EXTRACT(MICROSECOND FROM a) EXTRACT(MICROSECOND FROM b)
+# Detailed results
+SELECT
+a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+EXTRACT(DAY FROM a) * 24 + EXTRACT(HOUR FROM a) AS dh,
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a)
+FROM t1;
+a cidm dh EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a)
+9999-12-31 23:59:59.123456 NULL 767 3123 31 23 59 59 123456
+2001-01-01 10:20:30.123456 NULL 34 110 1 10 20 30 123456
+4294967296:59:59.123456 NULL NULL NULL NULL NULL NULL NULL NULL
+4294967295:59:59.123456 NULL NULL NULL NULL NULL NULL NULL NULL
+87649416:59:59.123456 NULL NULL NULL NULL NULL NULL NULL NULL
+87649415:59:59.123456 3652058 23:59:59.123456 87649415 365205823 3652058 23 59 59 123456
+87649414:59:59.123456 3652058 22:59:59.123456 87649414 365205822 3652058 22 59 59 123456
+9999:59:59.123456 416 15:59:59.123456 9999 41615 416 15 59 59 123456
+9999:01:01.123456 416 15:01:01.123456 9999 41615 416 15 1 1 123456
+9999:01:01 416 15:01:01.000000 9999 41615 416 15 1 1 0
+0.999999 00:00:00.999999 0 0 0 0 0 0 999999
+0.99999 00:00:00.999990 0 0 0 0 0 0 999990
+0.9999 00:00:00.999900 0 0 0 0 0 0 999900
+0.999 00:00:00.999000 0 0 0 0 0 0 999000
+0.99 00:00:00.990000 0 0 0 0 0 0 990000
+0.9 00:00:00.900000 0 0 0 0 0 0 900000
+000000 00:00:00.000000 0 0 0 0 0 0 0
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '9999-12-31 23:59:59.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 10:20:30.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967296:59:59.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect interval value: '4294967295:59:59.123456'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+Warning 1292 Incorrect interval value: '87649416:59:59.123456'
+SELECT
+b,
+CAST(b AS INTERVAL DAY_SECOND(6)) AS cidm,
+EXTRACT(DAY FROM b) * 24 + EXTRACT(HOUR FROM b) AS dh,
+EXTRACT(DAY_HOUR FROM b),
+EXTRACT(DAY FROM b),
+EXTRACT(HOUR FROM b),
+EXTRACT(MINUTE FROM b),
+EXTRACT(SECOND FROM b),
+EXTRACT(MICROSECOND FROM b)
+FROM t1;
+b cidm dh EXTRACT(DAY_HOUR FROM b) EXTRACT(DAY FROM b) EXTRACT(HOUR FROM b) EXTRACT(MINUTE FROM b) EXTRACT(SECOND FROM b) EXTRACT(MICROSECOND FROM b)
+99991231235959.123456000 NULL 767 3123 31 23 59 59 123456
+20010101102030.123456000 NULL 34 110 1 10 20 30 123456
+42949672965959.123456000 NULL NULL NULL NULL NULL NULL NULL NULL
+42949672955959.123456000 NULL NULL NULL NULL NULL NULL NULL NULL
+876494165959.123456000 NULL NULL NULL NULL NULL NULL NULL NULL
+876494155959.123456000 3652058 23:59:59.123456 87649415 365205823 3652058 23 59 59 123456
+876494145959.123456000 3652058 22:59:59.123456 87649414 365205822 3652058 22 59 59 123456
+99995959.123456000 416 15:59:59.123456 9999 41615 416 15 59 59 123456
+99990101.123456000 416 15:01:01.123456 9999 41615 416 15 1 1 123456
+99990101.000000000 416 15:01:01.000000 9999 41615 416 15 1 1 0
+0.999999000 00:00:00.999999 0 0 0 0 0 0 999999
+0.999990000 00:00:00.999990 0 0 0 0 0 0 999990
+0.999900000 00:00:00.999900 0 0 0 0 0 0 999900
+0.999000000 00:00:00.999000 0 0 0 0 0 0 999000
+0.990000000 00:00:00.990000 0 0 0 0 0 0 990000
+0.900000000 00:00:00.900000 0 0 0 0 0 0 900000
+0.000000000 00:00:00.000000 0 0 0 0 0 0 0
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '99991231235959.123456000'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '20010101102030.123456000'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '42949672965959.123456000'
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect interval value: '42949672965959.123456000' for column `test`.`t1`.`b` at row 3
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '42949672955959.123456000'
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect interval value: '42949672955959.123456000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '876494165959.123456000'
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Warning 1292 Incorrect interval value: '876494165959.123456000' for column `test`.`t1`.`b` at row 5
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494155959.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494145959.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '99995959.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '99990101.123456000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '99990101.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999900000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.999000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.990000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.900000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.000000000'
+DROP TABLE t1;
+# Special case: DAY + TIME
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('9999-01-01');
+SELECT a,
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a)
+FROM t1;
+a EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_MINUTE FROM a) EXTRACT(DAY_SECOND FROM a) EXTRACT(DAY_MICROSECOND FROM a) EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a)
+9999-01-01 100 10000 1000000 1000000000000 1 0 0 0 0
+DROP TABLE t1;
+# Bad values
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('');
+SELECT a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a)
+FROM t1;
+a cidm EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_MINUTE FROM a) EXTRACT(DAY_SECOND FROM a) EXTRACT(DAY_MICROSECOND FROM a) EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a)
+ NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
+Warnings:
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+Warning 1292 Incorrect interval value: ''
+DROP TABLE t1;
+# Backward compatibility
+# This still parses as DATETIME
+SELECT EXTRACT(YEAR FROM '2001/02/03 10:20:30');
+EXTRACT(YEAR FROM '2001/02/03 10:20:30')
+2001
+SELECT EXTRACT(MONTH FROM '2001/02/03 10:20:30');
+EXTRACT(MONTH FROM '2001/02/03 10:20:30')
+2
+SELECT EXTRACT(DAY FROM '2001/02/03 10:20:30');
+EXTRACT(DAY FROM '2001/02/03 10:20:30')
+3
+SELECT EXTRACT(YEAR FROM '01/02/03 10:20:30');
+EXTRACT(YEAR FROM '01/02/03 10:20:30')
+2001
+SELECT EXTRACT(MONTH FROM '01/02/03 10:20:30');
+EXTRACT(MONTH FROM '01/02/03 10:20:30')
+2
+SELECT EXTRACT(DAY FROM '01/02/03 10:20:30');
+EXTRACT(DAY FROM '01/02/03 10:20:30')
+3
+SELECT EXTRACT(YEAR FROM '01:02:03 10:20:30');
+EXTRACT(YEAR FROM '01:02:03 10:20:30')
+2001
+SELECT EXTRACT(MONTH FROM '01:02:03 10:20:30');
+EXTRACT(MONTH FROM '01:02:03 10:20:30')
+2
+SELECT EXTRACT(DAY FROM '01:02:03 10:20:30');
+EXTRACT(DAY FROM '01:02:03 10:20:30')
+3
+# This still parses as DATETIME and returns NULL
+SELECT EXTRACT(YEAR FROM "2011-02-32 8:46:06.23434");
+EXTRACT(YEAR FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2011-02-32 8:46:06.23434'
+SELECT EXTRACT(MONTH FROM "2011-02-32 8:46:06.23434");
+EXTRACT(MONTH FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2011-02-32 8:46:06.23434'
+SELECT EXTRACT(DAY FROM "2011-02-32 8:46:06.23434");
+EXTRACT(DAY FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '2011-02-32 8:46:06.23434'
+SELECT EXTRACT(HOUR FROM "2011-02-32 8:46:06.23434");
+EXTRACT(HOUR FROM "2011-02-32 8:46:06.23434")
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '2011-02-32 8:46:06.23434'
+# This still parses as DATE
+SELECT EXTRACT(YEAR FROM '2001/02/03');
+EXTRACT(YEAR FROM '2001/02/03')
+2001
+SELECT EXTRACT(MONTH FROM '2001/02/03');
+EXTRACT(MONTH FROM '2001/02/03')
+2
+SELECT EXTRACT(DAY FROM '2001/02/03');
+EXTRACT(DAY FROM '2001/02/03')
+3
+SELECT EXTRACT(YEAR FROM '01/02/03');
+EXTRACT(YEAR FROM '01/02/03')
+2001
+SELECT EXTRACT(MONTH FROM '01/02/03');
+EXTRACT(MONTH FROM '01/02/03')
+2
+SELECT EXTRACT(DAY FROM '01/02/03');
+EXTRACT(DAY FROM '01/02/03')
+3
+SELECT EXTRACT(YEAR FROM '01-02-03');
+EXTRACT(YEAR FROM '01-02-03')
+2001
+SELECT EXTRACT(MONTH FROM '01-02-03');
+EXTRACT(MONTH FROM '01-02-03')
+2
+SELECT EXTRACT(DAY FROM '01-02-03');
+EXTRACT(DAY FROM '01-02-03')
+3
+SELECT EXTRACT(YEAR FROM '1-2-3');
+EXTRACT(YEAR FROM '1-2-3')
+1
+SELECT EXTRACT(MONTH FROM '1-2-3');
+EXTRACT(MONTH FROM '1-2-3')
+2
+SELECT EXTRACT(DAY FROM '1-2-3');
+EXTRACT(DAY FROM '1-2-3')
+3
+SELECT EXTRACT(HOUR FROM '1-2-3');
+EXTRACT(HOUR FROM '1-2-3')
+0
+SELECT EXTRACT(DAY FROM '2024-01-03 garbage /////');
+EXTRACT(DAY FROM '2024-01-03 garbage /////')
+3
+Warnings:
+Warning 1292 Truncated incorrect date value: '2024-01-03 garbage /////'
+SELECT EXTRACT(DAY FROM '24-01-03 garbage /////');
+EXTRACT(DAY FROM '24-01-03 garbage /////')
+3
+Warnings:
+Warning 1292 Truncated incorrect date value: '24-01-03 garbage /////'
+SELECT EXTRACT(DAY FROM '01-02-03');
+EXTRACT(DAY FROM '01-02-03')
+3
+SELECT EXTRACT(DAY FROM '24:02:03T');
+EXTRACT(DAY FROM '24:02:03T')
+3
+SELECT EXTRACT(DAY FROM '24-02-03');
+EXTRACT(DAY FROM '24-02-03')
+3
+SELECT EXTRACT(DAY FROM '24/02/03');
+EXTRACT(DAY FROM '24/02/03')
+3
+SELECT EXTRACT(DAY FROM '11111');
+EXTRACT(DAY FROM '11111')
+1
+SELECT TIME('2001-01-01T'), TIME('2001-01-01T ');
+TIME('2001-01-01T') TIME('2001-01-01T ')
+00:00:00 00:00:00
+SELECT TIME('2001/01/01T'), TIME('2001/01/01T ');
+TIME('2001/01/01T') TIME('2001/01/01T ')
+00:00:00 00:00:00
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+TIME('2001:01:01T') TIME('2001:01:01T ')
+00:00:00 00:00:00
+SELECT EXTRACT(DAY FROM '2001-01-01T'), EXTRACT(DAY FROM '2001-01-01T ');
+EXTRACT(DAY FROM '2001-01-01T') EXTRACT(DAY FROM '2001-01-01T ')
+1 1
+SELECT EXTRACT(DAY FROM '2001/01/01T'), EXTRACT(DAY FROM '2001/01/01T ');
+EXTRACT(DAY FROM '2001/01/01T') EXTRACT(DAY FROM '2001/01/01T ')
+1 1
+SELECT EXTRACT(DAY FROM '2001:01:01T'), EXTRACT(DAY FROM '2001:01:01T ');
+EXTRACT(DAY FROM '2001:01:01T') EXTRACT(DAY FROM '2001:01:01T ')
+1 1
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+TIME('2001:01:01T') TIME('2001:01:01T ')
+00:00:00 00:00:00
+SELECT EXTRACT(HOUR FROM '2001-01-01T'), EXTRACT(HOUR FROM '2001-01-01T ');
+EXTRACT(HOUR FROM '2001-01-01T') EXTRACT(HOUR FROM '2001-01-01T ')
+0 0
+SELECT EXTRACT(HOUR FROM '2001/01/01T'), EXTRACT(HOUR FROM '2001/01/01T ');
+EXTRACT(HOUR FROM '2001/01/01T') EXTRACT(HOUR FROM '2001/01/01T ')
+0 0
+SELECT EXTRACT(HOUR FROM '2001:01:01T'), EXTRACT(HOUR FROM '2001:01:01T ');
+EXTRACT(HOUR FROM '2001:01:01T') EXTRACT(HOUR FROM '2001:01:01T ')
+0 0
+# This still parses as DATE and returns NULL (without trying TIME)
+SELECT EXTRACT(DAY FROM '100000:02:03T');
+EXTRACT(DAY FROM '100000:02:03T')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '100000:02:03T'
+SELECT EXTRACT(DAY FROM '100000/02/03');
+EXTRACT(DAY FROM '100000/02/03')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '100000/02/03'
+SELECT EXTRACT(DAY FROM '100000-02-03');
+EXTRACT(DAY FROM '100000-02-03')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '100000-02-03'
+SELECT EXTRACT(DAY FROM '1111');
+EXTRACT(DAY FROM '1111')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '1111'
+SELECT EXTRACT(DAY FROM '111');
+EXTRACT(DAY FROM '111')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '111'
+SELECT EXTRACT(DAY FROM '11');
+EXTRACT(DAY FROM '11')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '11'
+SELECT EXTRACT(DAY FROM '1');
+EXTRACT(DAY FROM '1')
+NULL
+Warnings:
+Warning 1292 Incorrect interval value: '1'
+# This still parses as TIME
+SELECT EXTRACT(HOUR FROM '11111');
+EXTRACT(HOUR FROM '11111')
+1
+SELECT EXTRACT(HOUR FROM '1111');
+EXTRACT(HOUR FROM '1111')
+0
+SELECT EXTRACT(HOUR FROM '111');
+EXTRACT(HOUR FROM '111')
+0
+SELECT EXTRACT(HOUR FROM '11');
+EXTRACT(HOUR FROM '11')
+0
+SELECT EXTRACT(HOUR FROM '1');
+EXTRACT(HOUR FROM '1')
+0
+SELECT TIME('01:02:03:');
+TIME('01:02:03:')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+SELECT TIME('01:02:03-');
+TIME('01:02:03-')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+SELECT TIME('01:02:03;');
+TIME('01:02:03;')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+SELECT TIME('01:02:03/');
+TIME('01:02:03/')
+01:02:03
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+SELECT EXTRACT(HOUR FROM '01:02:03:');
+EXTRACT(HOUR FROM '01:02:03:')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+SELECT EXTRACT(HOUR FROM '01:02:03-');
+EXTRACT(HOUR FROM '01:02:03-')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+SELECT EXTRACT(HOUR FROM '01:02:03;');
+EXTRACT(HOUR FROM '01:02:03;')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+SELECT EXTRACT(HOUR FROM '01:02:03/');
+EXTRACT(HOUR FROM '01:02:03/')
+1
+Warnings:
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+# Backward compatibility preserved for YEAR and MONTH only
+# (behavior has changed for DAY, see below)
+SELECT EXTRACT(YEAR FROM '01:02:03');
+EXTRACT(YEAR FROM '01:02:03')
+2001
+SELECT EXTRACT(MONTH FROM '01:02:03');
+EXTRACT(MONTH FROM '01:02:03')
+2
+SELECT EXTRACT(YEAR FROM '24:01:03 garbage /////');
+EXTRACT(YEAR FROM '24:01:03 garbage /////')
+2024
+Warnings:
+Warning 1292 Truncated incorrect date value: '24:01:03 garbage /////'
+SELECT EXTRACT(MONTH FROM '24:01:03 garbage /////');
+EXTRACT(MONTH FROM '24:01:03 garbage /////')
+1
+Warnings:
+Warning 1292 Truncated incorrect date value: '24:01:03 garbage /////'
+# This still parses as TIME 00:20:01
+SELECT TIME('2001/01/01');
+TIME('2001/01/01')
+00:20:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001/01/01'
+SELECT TIME('2001-01-01');
+TIME('2001-01-01')
+00:20:01
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001-01-01'
+# This still parses as TIME and overflows to '838:59:59'
+SELECT TIME('2001:01:01');
+TIME('2001:01:01')
+838:59:59
+Warnings:
+Warning 1292 Truncated incorrect time value: '2001:01:01'
+# This used to parse as DATE, now parses as TIME interval
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2024:01:03 garbage /////'),
+('24:01:03 garbage /////'),
+('01:01:03 garbage /////'),
+('2024:02:03'),
+('100000:02:03'),
+('24:02:03'),
+('01:02:03'),
+('01:02:03:'),
+('01:02:03-'),
+('01:02:03;'),
+('01:02:03/'),
+('20 10:20:30');
+SELECT
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_SECOND FROM a), a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm
+FROM t1;
+EXTRACT(DAY FROM a) EXTRACT(DAY_SECOND FROM a) a cidm
+84 84080103 2024:01:03 garbage ///// NULL
+1 1000103 24:01:03 garbage ///// NULL
+0 10103 01:01:03 garbage ///// NULL
+84 84080203 2024:02:03 84 08:02:03.000000
+4166 4166160203 100000:02:03 4166 16:02:03.000000
+1 1000203 24:02:03 1 00:02:03.000000
+0 10203 01:02:03 01:02:03.000000
+0 10203 01:02:03: 01:02:03.000000
+0 10203 01:02:03- NULL
+0 10203 01:02:03; 01:02:03.000000
+0 10203 01:02:03/ 01:02:03.000000
+20 20102030 20 10:20:30 20 10:20:30.000000
+Warnings:
+Warning 1292 Truncated incorrect time value: '2024:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '2024:01:03 garbage /////'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2024:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '24:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '24:01:03 garbage /////'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '24:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '01:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '01:01:03 garbage /////'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '01:01:03 garbage /////'
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+Warning 1292 Truncated incorrect time value: '01:02:03:'
+Warning 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '01:02:03:'
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+Warning 1292 Truncated incorrect time value: '01:02:03-'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '01:02:03-'
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+Warning 1292 Truncated incorrect time value: '01:02:03;'
+Warning 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '01:02:03;'
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+Warning 1292 Truncated incorrect time value: '01:02:03/'
+Warning 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '01:02:03/'
+DROP TABLE t1;
diff --git a/mysql-test/main/func_extract.test b/mysql-test/main/func_extract.test
new file mode 100644
index 00000000000..edc99b9c00c
--- /dev/null
+++ b/mysql-test/main/func_extract.test
@@ -0,0 +1,257 @@
+--echo #
+--echo # MDEV-17385 MICROSECOND() returns confusing results with an out-of-range TIME-alike argument
+--echo #
+
+CREATE TABLE t1 (v VARCHAR(64), ll BIGINT, t TIME, dt DATETIME, d DATE);
+CREATE TABLE t2 AS SELECT
+ EXTRACT(DAY FROM t),
+ EXTRACT(DAY_HOUR FROM t),
+ EXTRACT(DAY_MINUTE FROM t),
+ EXTRACT(DAY_SECOND FROM t),
+ EXTRACT(DAY_MICROSECOND FROM t),
+ EXTRACT(DAY FROM d),
+ EXTRACT(DAY_HOUR FROM d),
+ EXTRACT(DAY_MINUTE FROM d),
+ EXTRACT(DAY_SECOND FROM d),
+ EXTRACT(DAY_MICROSECOND FROM d),
+ EXTRACT(DAY FROM v),
+ EXTRACT(DAY_HOUR FROM v),
+ EXTRACT(DAY_MINUTE FROM v),
+ EXTRACT(DAY_SECOND FROM v),
+ EXTRACT(DAY_MICROSECOND FROM v),
+ EXTRACT(DAY FROM ll),
+ EXTRACT(DAY_HOUR FROM ll),
+ EXTRACT(DAY_MINUTE FROM ll),
+ EXTRACT(DAY_SECOND FROM ll),
+ EXTRACT(DAY_MICROSECOND FROM ll)
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a VARCHAR(64), b DECIMAL(32,9));
+INSERT INTO t1 VALUES
+('9999-12-31 23:59:59.123456', 99991231235959.123456),
+('2001-01-01 10:20:30.123456', 20010101102030.123456),
+('4294967296:59:59.123456', 42949672965959.123456),
+('4294967295:59:59.123456', 42949672955959.123456),
+('87649416:59:59.123456', 876494165959.123456),
+('87649415:59:59.123456', 876494155959.123456),
+('87649414:59:59.123456', 876494145959.123456),
+('9999:59:59.123456', 99995959.123456),
+('9999:01:01.123456', 99990101.123456),
+('9999:01:01', 99990101),
+('0.999999', 0.999999),
+('0.99999', 0.99999),
+('0.9999', 0.9999),
+('0.999', 0.999),
+('0.99', 0.99),
+('0.9', 0.9),
+('000000',0);
+
+--echo # Summary:
+--echo # Check that FUNC(varchar) and FUNC(decimal) give equal results
+--echo # Expect empty sets
+--disable_warnings
+SELECT a, b, EXTRACT(DAY_HOUR FROM a), EXTRACT(DAY_HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(DAY_HOUR FROM a)<=>EXTRACT(DAY_HOUR FROM b));
+SELECT a, b, EXTRACT(DAY FROM a), EXTRACT(DAY FROM b) FROM t1 WHERE NOT (EXTRACT(DAY FROM a)<=>EXTRACT(DAY FROM b));
+SELECT a, b, EXTRACT(HOUR FROM a), EXTRACT(HOUR FROM b) FROM t1 WHERE NOT (EXTRACT(HOUR FROM a)<=>EXTRACT(HOUR FROM b));
+SELECT a, b, EXTRACT(MINUTE FROM a), EXTRACT(MINUTE FROM b) FROM t1 WHERE NOT (EXTRACT(MINUTE FROM a)<=>EXTRACT(MINUTE FROM b));
+SELECT a, b, EXTRACT(SECOND FROM a), EXTRACT(SECOND FROM b) FROM t1 WHERE NOT (EXTRACT(SECOND FROM a)<=>EXTRACT(SECOND FROM b));
+SELECT a, b, EXTRACT(MICROSECOND FROM a), EXTRACT(MICROSECOND FROM b) FROM t1 WHERE NOT (EXTRACT(MICROSECOND FROM a)<=>EXTRACT(MICROSECOND FROM b));
+--enable_warnings
+
+--echo # Detailed results
+SELECT
+ a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+ EXTRACT(DAY FROM a) * 24 + EXTRACT(HOUR FROM a) AS dh,
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a)
+FROM t1;
+SELECT
+ b,
+ CAST(b AS INTERVAL DAY_SECOND(6)) AS cidm,
+ EXTRACT(DAY FROM b) * 24 + EXTRACT(HOUR FROM b) AS dh,
+ EXTRACT(DAY_HOUR FROM b),
+ EXTRACT(DAY FROM b),
+ EXTRACT(HOUR FROM b),
+ EXTRACT(MINUTE FROM b),
+ EXTRACT(SECOND FROM b),
+ EXTRACT(MICROSECOND FROM b)
+FROM t1;
+DROP TABLE t1;
+
+--echo # Special case: DAY + TIME
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('9999-01-01');
+SELECT a,
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a)
+FROM t1;
+DROP TABLE t1;
+
+--echo # Bad values
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES ('');
+SELECT a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm,
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a)
+FROM t1;
+DROP TABLE t1;
+
+
+--echo # Backward compatibility
+
+--echo # This still parses as DATETIME
+SELECT EXTRACT(YEAR FROM '2001/02/03 10:20:30');
+SELECT EXTRACT(MONTH FROM '2001/02/03 10:20:30');
+SELECT EXTRACT(DAY FROM '2001/02/03 10:20:30');
+
+SELECT EXTRACT(YEAR FROM '01/02/03 10:20:30');
+SELECT EXTRACT(MONTH FROM '01/02/03 10:20:30');
+SELECT EXTRACT(DAY FROM '01/02/03 10:20:30');
+
+SELECT EXTRACT(YEAR FROM '01:02:03 10:20:30');
+SELECT EXTRACT(MONTH FROM '01:02:03 10:20:30');
+SELECT EXTRACT(DAY FROM '01:02:03 10:20:30');
+
+--echo # This still parses as DATETIME and returns NULL
+
+SELECT EXTRACT(YEAR FROM "2011-02-32 8:46:06.23434");
+SELECT EXTRACT(MONTH FROM "2011-02-32 8:46:06.23434");
+SELECT EXTRACT(DAY FROM "2011-02-32 8:46:06.23434");
+SELECT EXTRACT(HOUR FROM "2011-02-32 8:46:06.23434");
+
+--echo # This still parses as DATE
+
+SELECT EXTRACT(YEAR FROM '2001/02/03');
+SELECT EXTRACT(MONTH FROM '2001/02/03');
+SELECT EXTRACT(DAY FROM '2001/02/03');
+
+SELECT EXTRACT(YEAR FROM '01/02/03');
+SELECT EXTRACT(MONTH FROM '01/02/03');
+SELECT EXTRACT(DAY FROM '01/02/03');
+
+SELECT EXTRACT(YEAR FROM '01-02-03');
+SELECT EXTRACT(MONTH FROM '01-02-03');
+SELECT EXTRACT(DAY FROM '01-02-03');
+
+SELECT EXTRACT(YEAR FROM '1-2-3');
+SELECT EXTRACT(MONTH FROM '1-2-3');
+SELECT EXTRACT(DAY FROM '1-2-3');
+SELECT EXTRACT(HOUR FROM '1-2-3');
+
+SELECT EXTRACT(DAY FROM '2024-01-03 garbage /////');
+SELECT EXTRACT(DAY FROM '24-01-03 garbage /////');
+SELECT EXTRACT(DAY FROM '01-02-03');
+
+SELECT EXTRACT(DAY FROM '24:02:03T');
+SELECT EXTRACT(DAY FROM '24-02-03');
+SELECT EXTRACT(DAY FROM '24/02/03');
+
+SELECT EXTRACT(DAY FROM '11111');
+
+SELECT TIME('2001-01-01T'), TIME('2001-01-01T ');
+SELECT TIME('2001/01/01T'), TIME('2001/01/01T ');
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+
+SELECT EXTRACT(DAY FROM '2001-01-01T'), EXTRACT(DAY FROM '2001-01-01T ');
+SELECT EXTRACT(DAY FROM '2001/01/01T'), EXTRACT(DAY FROM '2001/01/01T ');
+SELECT EXTRACT(DAY FROM '2001:01:01T'), EXTRACT(DAY FROM '2001:01:01T ');
+
+
+SELECT TIME('2001:01:01T'), TIME('2001:01:01T ');
+SELECT EXTRACT(HOUR FROM '2001-01-01T'), EXTRACT(HOUR FROM '2001-01-01T ');
+SELECT EXTRACT(HOUR FROM '2001/01/01T'), EXTRACT(HOUR FROM '2001/01/01T ');
+SELECT EXTRACT(HOUR FROM '2001:01:01T'), EXTRACT(HOUR FROM '2001:01:01T ');
+
+--echo # This still parses as DATE and returns NULL (without trying TIME)
+SELECT EXTRACT(DAY FROM '100000:02:03T');
+SELECT EXTRACT(DAY FROM '100000/02/03');
+SELECT EXTRACT(DAY FROM '100000-02-03');
+
+SELECT EXTRACT(DAY FROM '1111');
+SELECT EXTRACT(DAY FROM '111');
+SELECT EXTRACT(DAY FROM '11');
+SELECT EXTRACT(DAY FROM '1');
+
+
+--echo # This still parses as TIME
+
+SELECT EXTRACT(HOUR FROM '11111');
+SELECT EXTRACT(HOUR FROM '1111');
+SELECT EXTRACT(HOUR FROM '111');
+SELECT EXTRACT(HOUR FROM '11');
+SELECT EXTRACT(HOUR FROM '1');
+
+SELECT TIME('01:02:03:');
+SELECT TIME('01:02:03-');
+SELECT TIME('01:02:03;');
+SELECT TIME('01:02:03/');
+
+SELECT EXTRACT(HOUR FROM '01:02:03:');
+SELECT EXTRACT(HOUR FROM '01:02:03-');
+SELECT EXTRACT(HOUR FROM '01:02:03;');
+SELECT EXTRACT(HOUR FROM '01:02:03/');
+
+--echo # Backward compatibility preserved for YEAR and MONTH only
+--echo # (behavior has changed for DAY, see below)
+SELECT EXTRACT(YEAR FROM '01:02:03');
+SELECT EXTRACT(MONTH FROM '01:02:03');
+
+SELECT EXTRACT(YEAR FROM '24:01:03 garbage /////');
+SELECT EXTRACT(MONTH FROM '24:01:03 garbage /////');
+
+--echo # This still parses as TIME 00:20:01
+
+SELECT TIME('2001/01/01');
+SELECT TIME('2001-01-01');
+
+--echo # This still parses as TIME and overflows to '838:59:59'
+SELECT TIME('2001:01:01');
+
+
+--echo # This used to parse as DATE, now parses as TIME interval
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2024:01:03 garbage /////'),
+('24:01:03 garbage /////'),
+('01:01:03 garbage /////'),
+('2024:02:03'),
+('100000:02:03'),
+('24:02:03'),
+('01:02:03'),
+('01:02:03:'),
+('01:02:03-'),
+('01:02:03;'),
+('01:02:03/'),
+('20 10:20:30');
+
+SELECT
+ EXTRACT(DAY FROM a),
+ EXTRACT(DAY_SECOND FROM a), a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cidm
+FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/main/func_group_innodb.result b/mysql-test/main/func_group_innodb.result
index 5be46ed95b3..a4c9b574585 100644
--- a/mysql-test/main/func_group_innodb.result
+++ b/mysql-test/main/func_group_innodb.result
@@ -251,8 +251,32 @@ MIN(c)
0
EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL b 263 NULL 3 Using index for group-by
+1 SIMPLE t1 range NULL b 263 NULL 2 Using index for group-by
DROP TABLE t1;
+#
+# MDEV-17589: Stack-buffer-overflow with indexed varchar (utf8) field
+#
+CREATE TABLE t1 (v1 varchar(1020), v2 varchar(2), v3 varchar(2),
+KEY k1 (v3,v2,v1)) ENGINE=InnoDB CHARACTER SET=utf8 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES ('king', 'qu','qu'), ('bad','go','go');
+explain
+SELECT MIN(t1.v1) FROM t1 where t1.v2='qu' and t1.v3='qu';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+SELECT MIN(t1.v1) FROM t1 where t1.v2='qu' and t1.v3='qu';
+MIN(t1.v1)
+king
+drop table t1;
+CREATE TABLE t1 (v1 varchar(1024) CHARACTER SET utf8, KEY v1 (v1)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES ('king'), ('bad');
+explain
+SELECT MIN(x.v1) FROM (SELECT t1.* FROM t1 WHERE t1.v1 >= 'p') x;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No matching min/max row
+SELECT MIN(x.v1) FROM (SELECT t1.* FROM t1 WHERE t1.v1 >= 'p') x;
+MIN(x.v1)
+NULL
+drop table t1;
End of 5.5 tests
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
diff --git a/mysql-test/main/func_group_innodb.test b/mysql-test/main/func_group_innodb.test
index 0aa657badc1..6141b4d85ed 100644
--- a/mysql-test/main/func_group_innodb.test
+++ b/mysql-test/main/func_group_innodb.test
@@ -201,6 +201,25 @@ EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b;
DROP TABLE t1;
+--echo #
+--echo # MDEV-17589: Stack-buffer-overflow with indexed varchar (utf8) field
+--echo #
+
+CREATE TABLE t1 (v1 varchar(1020), v2 varchar(2), v3 varchar(2),
+ KEY k1 (v3,v2,v1)) ENGINE=InnoDB CHARACTER SET=utf8 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES ('king', 'qu','qu'), ('bad','go','go');
+explain
+SELECT MIN(t1.v1) FROM t1 where t1.v2='qu' and t1.v3='qu';
+SELECT MIN(t1.v1) FROM t1 where t1.v2='qu' and t1.v3='qu';
+drop table t1;
+
+CREATE TABLE t1 (v1 varchar(1024) CHARACTER SET utf8, KEY v1 (v1)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES ('king'), ('bad');
+explain
+SELECT MIN(x.v1) FROM (SELECT t1.* FROM t1 WHERE t1.v1 >= 'p') x;
+SELECT MIN(x.v1) FROM (SELECT t1.* FROM t1 WHERE t1.v1 >= 'p') x;
+drop table t1;
+
--echo End of 5.5 tests
set global innodb_stats_persistent= @innodb_stats_persistent_save;
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index a86fd8d1d6f..129d49776a8 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -3753,6 +3753,24 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
+# MDEV-17759 Assertion `precision > 0' failed in decimal_bin_size upon CREATE TABLE .. SELECT
+#
+SET sql_mode='';
+CREATE TABLE t1 (d DECIMAL(43,0) UNSIGNED);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS SELECT
+IFNULL(SLEEP(0.01), NULL DIV d) AS f0,
+IFNULL(SLEEP(0.01), '' DIV d) AS f1
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f0` decimal(1,0) DEFAULT NULL,
+ `f1` decimal(1,0) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
+SET sql_mode=DEFAULT;
+#
# End of 10.3 tests
#
#
diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test
index 6b32f331d34..5281d846584 100644
--- a/mysql-test/main/func_hybrid_type.test
+++ b/mysql-test/main/func_hybrid_type.test
@@ -612,6 +612,22 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
--echo #
+--echo # MDEV-17759 Assertion `precision > 0' failed in decimal_bin_size upon CREATE TABLE .. SELECT
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (d DECIMAL(43,0) UNSIGNED);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS SELECT
+ IFNULL(SLEEP(0.01), NULL DIV d) AS f0,
+ IFNULL(SLEEP(0.01), '' DIV d) AS f1
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+SET sql_mode=DEFAULT;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index cc9fd146e63..3eae5be2492 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -811,6 +811,26 @@ SELECT JSON_MERGE('[1]', '[]');
JSON_MERGE('[1]', '[]')
[1]
#
+# MDEV-16174 Assertion `0' failed in Type_handler_string_result::
+# make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*)
+#
+SET sql_mode='';
+CREATE TABLE t1 (fld varchar(16) NOT NULL);
+CREATE TABLE t2 SELECT JSON_ARRAY_INSERT(fld, '$.[0]', '0') FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `JSON_ARRAY_INSERT(fld, '$.[0]', '0')` varchar(25) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
+SET sql_mode=default;
+#
+# MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1
+#
+select JSON_VALID( '{"a":1]' );
+JSON_VALID( '{"a":1]' )
+0
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 9a0699ac23d..09ae35ad653 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -467,6 +467,24 @@ SET @`json` := NULL, @`value` := NULL;
SELECT JSON_MERGE('[1]', '[]');
--echo #
+--echo # MDEV-16174 Assertion `0' failed in Type_handler_string_result::
+--echo # make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*)
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (fld varchar(16) NOT NULL);
+CREATE TABLE t2 SELECT JSON_ARRAY_INSERT(fld, '$.[0]', '0') FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+SET sql_mode=default;
+
+--echo #
+--echo # MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1
+--echo #
+
+select JSON_VALID( '{"a":1]' );
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index 832ca69d3ea..251979dba03 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -1285,3 +1285,43 @@ E59B9BE4BA94E585AD 2914501801
E4B883E585ABE4B99D 2374586519
DROP TABLE t1;
SET NAMES default;
+#
+# MDEV-17759 Assertion `precision > 0' failed in decimal_bin_size upon CREATE TABLE .. SELECT
+#
+SET sql_mode='';
+CREATE TABLE t1 (d DECIMAL(43,0) UNSIGNED);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS SELECT
+NULL DIV d AS d_null,
+'' DIV d AS d_empty_string,
+X'32' DIV d AS d_hex_string2,
+X'3232' DIV d AS d_hex_string4,
+TIME(0) DIV d AS d_time,
+CURRENT_DATE DIV d AS d_date,
+CURRENT_TIMESTAMP DIV d AS d_datetime
+FROM t1;
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `d_null` int(1) unsigned DEFAULT NULL,
+ `d_empty_string` int(1) unsigned DEFAULT NULL,
+ `d_hex_string2` int(1) unsigned DEFAULT NULL,
+ `d_hex_string4` int(2) unsigned DEFAULT NULL,
+ `d_time` int(7) unsigned DEFAULT NULL,
+ `d_date` int(8) unsigned DEFAULT NULL,
+ `d_datetime` bigint(14) unsigned DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1, t2;
+SET sql_mode=DEFAULT;
+#
+# MDEV-18150 Assertion `decimals_to_set <= 38' failed in Item_func_round::fix_length_and_dec_decimal
+#
+CREATE TABLE t1 (i INT(23));
+SELECT ROUND( i, 18446744073709551594 ) AS f FROM t1;
+f
+DROP TABLE t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index a2c54b58a67..5d7c593a63d 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -897,3 +897,36 @@ LOAD DATA INFILE '../../std_data/loaddata_utf8.dat' INTO TABLE t1 CHARACTER SET
SELECT HEX(a), CRC32(a) from t1;
DROP TABLE t1;
SET NAMES default;
+
+--echo #
+--echo # MDEV-17759 Assertion `precision > 0' failed in decimal_bin_size upon CREATE TABLE .. SELECT
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (d DECIMAL(43,0) UNSIGNED);
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 AS SELECT
+ NULL DIV d AS d_null,
+ '' DIV d AS d_empty_string,
+ X'32' DIV d AS d_hex_string2,
+ X'3232' DIV d AS d_hex_string4,
+ TIME(0) DIV d AS d_time,
+ CURRENT_DATE DIV d AS d_date,
+ CURRENT_TIMESTAMP DIV d AS d_datetime
+FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1, t2;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # MDEV-18150 Assertion `decimals_to_set <= 38' failed in Item_func_round::fix_length_and_dec_decimal
+--echo #
+
+CREATE TABLE t1 (i INT(23));
+SELECT ROUND( i, 18446744073709551594 ) AS f FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/main/func_set.result b/mysql-test/main/func_set.result
index 73e121f5f2b..3bd9f5e0c9a 100644
--- a/mysql-test/main/func_set.result
+++ b/mysql-test/main/func_set.result
@@ -172,8 +172,8 @@ INTERVAL( 9, 1, DATE_ADD( pk, INTERVAL pk MINUTE_SECOND ), 9, 8, 3, 5, 2, 1 )
8
8
Warnings:
-Warning 1292 Incorrect datetime value: '10' for column 'pk' at row 1
-Warning 1292 Incorrect datetime value: '11' for column 'pk' at row 2
+Warning 1292 Incorrect datetime value: '10' for column `test`.`t1`.`pk` at row 1
+Warning 1292 Incorrect datetime value: '11' for column `test`.`t1`.`pk` at row 2
DROP TABLE t1;
#
# End of 5.3 tests
diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result
index 484127a7414..e66d0ca5e3f 100644
--- a/mysql-test/main/func_str.result
+++ b/mysql-test/main/func_str.result
@@ -4961,3 +4961,15 @@ DROP TABLE t1;
#
# End of 10.3 tests
#
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
+#
+SELECT GROUP_CONCAT( UpdateXML( '<a>new year</a>', '/a', '2019-01-01 00:00:00' ), ENCODE('text','pass') ) AS f;
+f
+2019-01-01 00:00:00F}^i
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index 4165e147768..4809b0e872b 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -1951,3 +1951,19 @@ DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
+--echo #
+
+SELECT GROUP_CONCAT( UpdateXML( '<a>new year</a>', '/a', '2019-01-01 00:00:00' ), ENCODE('text','pass') ) AS f;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result
index a6e1ed9cb19..007f5585c27 100644
--- a/mysql-test/main/func_time.result
+++ b/mysql-test/main/func_time.result
@@ -367,9 +367,7 @@ extract(DAY_MINUTE FROM "02 10:11:12")
21011
select extract(DAY_SECOND FROM "225 10:11:12");
extract(DAY_SECOND FROM "225 10:11:12")
-34225959
-Warnings:
-Warning 1292 Truncated incorrect time value: '225 10:11:12'
+225101112
select extract(HOUR FROM "1999-01-02 10:11:12");
extract(HOUR FROM "1999-01-02 10:11:12")
10
@@ -1033,9 +1031,7 @@ Note 1105 Cast to unsigned converted negative integer to it's positive complemen
Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00'
SELECT EXTRACT(HOUR FROM '10000:02:03');
EXTRACT(HOUR FROM '10000:02:03')
-22
-Warnings:
-Warning 1292 Truncated incorrect time value: '10000:02:03'
+16
CREATE TABLE t1(f1 TIME);
INSERT IGNORE INTO t1 VALUES('916:00:00 a');
Warnings:
@@ -3432,7 +3428,61 @@ DROP TABLE t1,t2;
# End of 10.1 tests
#
#
-# Start of 10.3 tests
+# MDEV-16217: Assertion `!table || (!table->read_set ||
+# bitmap_is_set(table->read_set, field_index))'
+# failed in Field_num::get_date
+#
+CREATE TABLE t1 (pk int default 0, a1 date);
+INSERT INTO t1 VALUES (1,'1900-01-01'),(2,NULL),(3,NULL),(4,NULL);
+CREATE VIEW v1 AS
+SELECT t1.pk AS pk, t1.a1 AS a1 FROM t1;
+SELECT a1 BETWEEN (('2018-08-24')) AND (DEFAULT(pk)) FROM v1;
+a1 BETWEEN (('2018-08-24')) AND (DEFAULT(pk))
+0
+NULL
+NULL
+NULL
+SELECT a1 BETWEEN (('2018-08-24')) AND (~ DEFAULT(pk)) FROM v1;
+a1 BETWEEN (('2018-08-24')) AND (~ DEFAULT(pk))
+0
+NULL
+NULL
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '18446744073709551615'
+CREATE TABLE t2 (pk int default 1, a1 date);
+INSERT INTO t2 VALUES (4,NULL);
+CREATE view v2 as SELECT default(t1.pk), default(t2.pk), t1.pk from t1,t2;
+select * from v2;
+default(t1.pk) default(t2.pk) pk
+0 1 1
+0 1 2
+0 1 3
+0 1 4
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select default(`t1`.`pk`) AS `default(t1.pk)`,default(`t2`.`pk`) AS `default(t2.pk)`,`t1`.`pk` AS `pk` from (`t1` join `t2`) latin1 latin1_swedish_ci
+CREATE view v3 as SELECT default(pk) from t2;
+select * from v3;
+default(pk)
+1
+explain extended select * from v3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
+Warnings:
+Note 1003 select default(`test`.`t2`.`pk`) AS `default(pk)` from dual
+explain extended select default(pk) from t2;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
+Warnings:
+Note 1003 select default(`test`.`t2`.`pk`) AS `default(pk)` from dual
+show create view v3;
+View Create View character_set_client collation_connection
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select default(`t2`.`pk`) AS `default(pk)` from `t2` latin1 latin1_swedish_ci
+DROP VIEW v1,v2,v3;
+DROP TABLE t1,t2;
+#
+# End of 10.2 tests
#
#
# MDEV-12515 Wrong value when storing DATE_ADD() and ADDTIME() to a numeric field
@@ -3753,8 +3803,10 @@ CAST(CAST(LAST_DAY(TIME'00:00:00') AS DATE) AS TIME) AS c2,
CAST(LAST_DAY(TIME'00:00:00') AS TIME) AS c3;
c1 c2 c3
2018-08-31 00:00:00 00:00:00
+#
# End of 10.3 tests
#
+#
# MDEV-14032 SEC_TO_TIME executes side effect two times
#
SET @a=10000000;
@@ -6243,3 +6295,14 @@ Warning 1292 Truncated incorrect time value: '50326 garbage'
SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
TIME('- 01:00:00') TIME('- 1 01:00:00')
-01:00:00 -25:00:00
+#
+# MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on SELECT with NULLIF and FROM_UNIXTIME on incorrect time
+#
+SET time_zone='+00:00';
+SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
+NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14')
+1970-01-01 00:00:00
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'foo'
+Warning 1292 Truncated incorrect DECIMAL value: 'foo'
+SET time_zone=DEFAULT;
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index 4c9315629f1..630083ef97e 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -1914,9 +1914,36 @@ DROP TABLE t1,t2;
--echo # End of 10.1 tests
--echo #
+--echo #
+--echo # MDEV-16217: Assertion `!table || (!table->read_set ||
+--echo # bitmap_is_set(table->read_set, field_index))'
+--echo # failed in Field_num::get_date
+--echo #
+CREATE TABLE t1 (pk int default 0, a1 date);
+INSERT INTO t1 VALUES (1,'1900-01-01'),(2,NULL),(3,NULL),(4,NULL);
+
+CREATE VIEW v1 AS
+SELECT t1.pk AS pk, t1.a1 AS a1 FROM t1;
+
+SELECT a1 BETWEEN (('2018-08-24')) AND (DEFAULT(pk)) FROM v1;
+SELECT a1 BETWEEN (('2018-08-24')) AND (~ DEFAULT(pk)) FROM v1;
+
+CREATE TABLE t2 (pk int default 1, a1 date);
+INSERT INTO t2 VALUES (4,NULL);
+CREATE view v2 as SELECT default(t1.pk), default(t2.pk), t1.pk from t1,t2;
+select * from v2;
+show create view v2;
+CREATE view v3 as SELECT default(pk) from t2;
+select * from v3;
+explain extended select * from v3;
+explain extended select default(pk) from t2;
+show create view v3;
+
+DROP VIEW v1,v2,v3;
+DROP TABLE t1,t2;
--echo #
---echo # Start of 10.3 tests
+--echo # End of 10.2 tests
--echo #
--echo #
@@ -2217,7 +2244,9 @@ SELECT
CAST(CAST(LAST_DAY(TIME'00:00:00') AS DATE) AS TIME) AS c2,
CAST(LAST_DAY(TIME'00:00:00') AS TIME) AS c3;
+--echo #
--echo # End of 10.3 tests
+--echo #
--echo #
--echo # MDEV-14032 SEC_TO_TIME executes side effect two times
@@ -3094,3 +3123,12 @@ SELECT
CAST('50326 garbage' as time);
SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
+
+
+--echo #
+--echo # MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on SELECT with NULLIF and FROM_UNIXTIME on incorrect time
+--echo #
+
+SET time_zone='+00:00';
+SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
+SET time_zone=DEFAULT;
diff --git a/mysql-test/main/func_time_round.result b/mysql-test/main/func_time_round.result
new file mode 100644
index 00000000000..b335cf393ba
--- /dev/null
+++ b/mysql-test/main/func_time_round.result
@@ -0,0 +1,1374 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+CREATE TABLE t1_datetime_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_datetime_in_varchar (a) VALUES
+('2000-12-31 23:59:59'),
+('2000-12-31 23:59:59.9'),
+('2000-12-31 23:59:59.99'),
+('2000-12-31 23:59:59.999'),
+('2000-12-31 23:59:59.9999'),
+('2000-12-31 23:59:59.99999'),
+('2000-12-31 23:59:59.999999'),
+('2000-12-31 23:59:59.9999999');
+CREATE TABLE t1_datetime_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_datetime_in_decimal (a) VALUES
+(20001231235959),
+(20001231235959.9),
+(20001231235959.99),
+(20001231235959.999),
+(20001231235959.9999),
+(20001231235959.99999),
+(20001231235959.999999),
+(20001231235959.9999999);
+CREATE TABLE t1_time_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_time_in_varchar (a) VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.99'),
+('00:00:00.999'),
+('00:00:00.9999'),
+('00:00:00.99999'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+INSERT INTO t1_time_in_varchar (a) VALUES
+('837:59:59.9999999'),
+('838:59:59'),
+('838:59:59.9'),
+('838:59:59.99'),
+('838:59:59.999'),
+('838:59:59.9999'),
+('838:59:59.99999'),
+('838:59:59.999999'),
+('838:59:59.9999999'),
+('839:59:59.9999999'),
+('87649414:59:59.999999'),
+('87649414:59:59.9999999'),
+('87649415:59:59.999999'),
+('87649415:59:59.9999999');
+CREATE TABLE t1_time_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_time_in_decimal (a) VALUES
+(0),
+(0.9),
+(0.99),
+(0.999),
+(0.9999),
+(0.99999),
+(0.999999),
+(0.9999999);
+INSERT INTO t1_time_in_decimal (a) VALUES
+(8375959.9999999),
+(8385959),
+(8385959.9),
+(8385959.99),
+(8385959.999),
+(8385959.9999),
+(8385959.99999),
+(8385959.999999),
+(8385959.9999999),
+(8395959.9999999),
+(876494145959.999999),
+(876494145959.9999999),
+(876494155959.999999),
+(876494155959.9999999);
+#
+# TIME: LEAST/GREATEST
+#
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_varchar;
+GREATEST(TIME'00:00:00', a)
+00:00:00.000000
+00:00:00.900000
+00:00:00.990000
+00:00:00.999000
+00:00:00.999900
+00:00:00.999990
+00:00:00.999999
+00:00:01.000000
+838:00:00.000000
+838:59:59.000000
+838:59:59.900000
+838:59:59.990000
+838:59:59.999000
+838:59:59.999900
+838:59:59.999990
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '838:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '839:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_decimal;
+GREATEST(TIME'00:00:00', a)
+00:00:00.000000
+00:00:00.900000
+00:00:00.990000
+00:00:00.999000
+00:00:00.999900
+00:00:00.999990
+00:00:00.999999
+00:00:01.000000
+838:00:00.000000
+838:59:59.000000
+838:59:59.900000
+838:59:59.990000
+838:59:59.999000
+838:59:59.999900
+838:59:59.999990
+838:59:59.999999
+838:59:59.999999
+838:59:59.999999
+NULL
+NULL
+NULL
+NULL
+Warnings:
+Warning 1292 Incorrect time value: '8385959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 17
+Warning 1292 Incorrect time value: '8395959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 18
+Warning 1292 Incorrect time value: '876494145959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 19
+Warning 1292 Incorrect time value: '876494145959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 20
+Warning 1292 Incorrect time value: '876494155959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 21
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000004');
+GREATEST(TIME'00:00:00', '00:00:00.0000004')
+00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.0000004'
+SELECT GREATEST(TIME'00:00:00', 0.0000004);
+GREATEST(TIME'00:00:00', 0.0000004)
+00:00:00.000000
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000005');
+GREATEST(TIME'00:00:00', '00:00:00.0000005')
+00:00:00.000001
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.0000005'
+SELECT GREATEST(TIME'00:00:00', 0.0000005);
+GREATEST(TIME'00:00:00', 0.0000005)
+00:00:00.000001
+#
+# Functions with a single TIME input, conversion from DATETIME-in-VARCHAR
+#
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SECOND(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+MINUTE(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+HOUR(a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 2000-12-31 23:59:59
+23 23:59:59.900000 2000-12-31 23:59:59.9
+23 23:59:59.990000 2000-12-31 23:59:59.99
+23 23:59:59.999000 2000-12-31 23:59:59.999
+23 23:59:59.999900 2000-12-31 23:59:59.9999
+23 23:59:59.999990 2000-12-31 23:59:59.99999
+23 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+EXTRACT(SECOND FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+EXTRACT(MINUTE FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 2000-12-31 23:59:59
+59 23:59:59.900000 2000-12-31 23:59:59.9
+59 23:59:59.990000 2000-12-31 23:59:59.99
+59 23:59:59.999000 2000-12-31 23:59:59.999
+59 23:59:59.999900 2000-12-31 23:59:59.9999
+59 23:59:59.999990 2000-12-31 23:59:59.99999
+59 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+EXTRACT(HOUR FROM a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 2000-12-31 23:59:59
+23 23:59:59.900000 2000-12-31 23:59:59.9
+23 23:59:59.990000 2000-12-31 23:59:59.99
+23 23:59:59.999000 2000-12-31 23:59:59.999
+23 23:59:59.999900 2000-12-31 23:59:59.9999
+23 23:59:59.999990 2000-12-31 23:59:59.99999
+23 23:59:59.999999 2000-12-31 23:59:59.999999
+0 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+86399.000000 23:59:59.000000 2000-12-31 23:59:59
+86399.900000 23:59:59.900000 2000-12-31 23:59:59.9
+86399.990000 23:59:59.990000 2000-12-31 23:59:59.99
+86399.999000 23:59:59.999000 2000-12-31 23:59:59.999
+86399.999900 23:59:59.999900 2000-12-31 23:59:59.9999
+86399.999990 23:59:59.999990 2000-12-31 23:59:59.99999
+86399.999999 23:59:59.999999 2000-12-31 23:59:59.999999
+0.000000 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+#
+# Functions with a single TIME input, conversion from DATETIME-in-DECIMAL
+#
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SECOND(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+MINUTE(a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+HOUR(a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 20001231235959.0000000000
+23 23:59:59.900000 20001231235959.9000000000
+23 23:59:59.990000 20001231235959.9900000000
+23 23:59:59.999000 20001231235959.9990000000
+23 23:59:59.999900 20001231235959.9999000000
+23 23:59:59.999990 20001231235959.9999900000
+23 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+EXTRACT(SECOND FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+EXTRACT(MINUTE FROM a) CAST(a AS TIME(6)) a
+59 23:59:59.000000 20001231235959.0000000000
+59 23:59:59.900000 20001231235959.9000000000
+59 23:59:59.990000 20001231235959.9900000000
+59 23:59:59.999000 20001231235959.9990000000
+59 23:59:59.999900 20001231235959.9999000000
+59 23:59:59.999990 20001231235959.9999900000
+59 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+EXTRACT(HOUR FROM a) CAST(a AS TIME(6)) a
+23 23:59:59.000000 20001231235959.0000000000
+23 23:59:59.900000 20001231235959.9000000000
+23 23:59:59.990000 20001231235959.9900000000
+23 23:59:59.999000 20001231235959.9990000000
+23 23:59:59.999900 20001231235959.9999000000
+23 23:59:59.999990 20001231235959.9999900000
+23 23:59:59.999999 20001231235959.9999990000
+0 00:00:00.000000 20001231235959.9999999000
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+86399.000000 23:59:59.000000 20001231235959.0000000000
+86399.900000 23:59:59.900000 20001231235959.9000000000
+86399.990000 23:59:59.990000 20001231235959.9900000000
+86399.999000 23:59:59.999000 20001231235959.9990000000
+86399.999900 23:59:59.999900 20001231235959.9999000000
+86399.999990 23:59:59.999990 20001231235959.9999900000
+86399.999999 23:59:59.999999 20001231235959.9999990000
+0.000000 00:00:00.000000 20001231235959.9999999000
+#
+# Functions with a single TIME interval input, conversion from TIME-interval-in-VARCHAR
+#
+SELECT
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+CAST(a AS INTERVAL DAY_SECOND(6)),
+a
+FROM t1_time_in_varchar ORDER BY id;
+EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a) CAST(a AS INTERVAL DAY_SECOND(6)) a
+0 0 0 0 0 00:00:00.000000 00:00:00
+0 0 0 0 900000 00:00:00.900000 00:00:00.9
+0 0 0 0 990000 00:00:00.990000 00:00:00.99
+0 0 0 0 999000 00:00:00.999000 00:00:00.999
+0 0 0 0 999900 00:00:00.999900 00:00:00.9999
+0 0 0 0 999990 00:00:00.999990 00:00:00.99999
+0 0 0 0 999999 00:00:00.999999 00:00:00.999999
+0 0 0 1 0 00:00:01.000000 00:00:00.9999999
+34 22 0 0 0 34 22:00:00.000000 837:59:59.9999999
+34 22 59 59 0 34 22:59:59.000000 838:59:59
+34 22 59 59 900000 34 22:59:59.900000 838:59:59.9
+34 22 59 59 990000 34 22:59:59.990000 838:59:59.99
+34 22 59 59 999000 34 22:59:59.999000 838:59:59.999
+34 22 59 59 999900 34 22:59:59.999900 838:59:59.9999
+34 22 59 59 999990 34 22:59:59.999990 838:59:59.99999
+34 22 59 59 999999 34 22:59:59.999999 838:59:59.999999
+34 23 0 0 0 34 23:00:00.000000 838:59:59.9999999
+35 0 0 0 0 35 00:00:00.000000 839:59:59.9999999
+3652058 22 59 59 999999 3652058 22:59:59.999999 87649414:59:59.999999
+3652058 23 0 0 0 3652058 23:00:00.000000 87649414:59:59.9999999
+3652058 23 59 59 999999 3652058 23:59:59.999999 87649415:59:59.999999
+3652058 23 59 59 999999 3652058 23:59:59.999999 87649415:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '838:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '838:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '839:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649415:59:59.9999999'
+SELECT
+TIME_TO_SEC(a),
+CAST(a AS TIME(6)),
+a
+FROM t1_time_in_varchar ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+0.000000 00:00:00.000000 00:00:00
+0.900000 00:00:00.900000 00:00:00.9
+0.990000 00:00:00.990000 00:00:00.99
+0.999000 00:00:00.999000 00:00:00.999
+0.999900 00:00:00.999900 00:00:00.9999
+0.999990 00:00:00.999990 00:00:00.99999
+0.999999 00:00:00.999999 00:00:00.999999
+1.000000 00:00:01.000000 00:00:00.9999999
+3016800.000000 838:00:00.000000 837:59:59.9999999
+3020399.000000 838:59:59.000000 838:59:59
+3020399.900000 838:59:59.900000 838:59:59.9
+3020399.990000 838:59:59.990000 838:59:59.99
+3020399.999000 838:59:59.999000 838:59:59.999
+3020399.999900 838:59:59.999900 838:59:59.9999
+3020399.999990 838:59:59.999990 838:59:59.99999
+3020399.999999 838:59:59.999999 838:59:59.999999
+3020399.999999 838:59:59.999999 838:59:59.9999999
+3020399.999999 838:59:59.999999 839:59:59.9999999
+3020399.999999 838:59:59.999999 87649414:59:59.999999
+3020399.999999 838:59:59.999999 87649414:59:59.9999999
+3020399.999999 838:59:59.999999 87649415:59:59.999999
+3020399.999999 838:59:59.999999 87649415:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Note 1292 Truncated incorrect time value: '837:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '838:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '838:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '839:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '839:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649414:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+Warning 1292 Truncated incorrect time value: '87649415:59:59.9999999'
+#
+# Functions with a single TIME interval input, conversion from TIME-interval-in-DECIMAL
+#
+SELECT
+EXTRACT(DAY FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+CAST(a AS INTERVAL DAY_SECOND(6)),
+a
+FROM t1_time_in_decimal ORDER BY id;
+EXTRACT(DAY FROM a) EXTRACT(HOUR FROM a) EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a) CAST(a AS INTERVAL DAY_SECOND(6)) a
+0 0 0 0 0 00:00:00.000000 0.0000000000
+0 0 0 0 900000 00:00:00.900000 0.9000000000
+0 0 0 0 990000 00:00:00.990000 0.9900000000
+0 0 0 0 999000 00:00:00.999000 0.9990000000
+0 0 0 0 999900 00:00:00.999900 0.9999000000
+0 0 0 0 999990 00:00:00.999990 0.9999900000
+0 0 0 0 999999 00:00:00.999999 0.9999990000
+0 0 0 1 0 00:00:01.000000 0.9999999000
+34 22 0 0 0 34 22:00:00.000000 8375959.9999999000
+34 22 59 59 0 34 22:59:59.000000 8385959.0000000000
+34 22 59 59 900000 34 22:59:59.900000 8385959.9000000000
+34 22 59 59 990000 34 22:59:59.990000 8385959.9900000000
+34 22 59 59 999000 34 22:59:59.999000 8385959.9990000000
+34 22 59 59 999900 34 22:59:59.999900 8385959.9999000000
+34 22 59 59 999990 34 22:59:59.999990 8385959.9999900000
+34 22 59 59 999999 34 22:59:59.999999 8385959.9999990000
+34 23 0 0 0 34 23:00:00.000000 8385959.9999999000
+35 0 0 0 0 35 00:00:00.000000 8395959.9999999000
+3652058 22 59 59 999999 3652058 22:59:59.999999 876494145959.9999990000
+3652058 23 0 0 0 3652058 23:00:00.000000 876494145959.9999999000
+3652058 23 59 59 999999 3652058 23:59:59.999999 876494155959.9999990000
+3652058 23 59 59 999999 3652058 23:59:59.999999 876494155959.9999999000
+Warnings:
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.0000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9900000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9990000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999900000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8375959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.0000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9900000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9990000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999900000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494145959.9999990000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494145959.9999999000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494155959.9999990000'
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '876494155959.9999999000'
+SELECT
+TIME_TO_SEC(a),
+CAST(a AS TIME(6)),
+a
+FROM t1_time_in_decimal ORDER BY id;
+TIME_TO_SEC(a) CAST(a AS TIME(6)) a
+0.000000 00:00:00.000000 0.0000000000
+0.900000 00:00:00.900000 0.9000000000
+0.990000 00:00:00.990000 0.9900000000
+0.999000 00:00:00.999000 0.9990000000
+0.999900 00:00:00.999900 0.9999000000
+0.999990 00:00:00.999990 0.9999900000
+0.999999 00:00:00.999999 0.9999990000
+1.000000 00:00:01.000000 0.9999999000
+3016800.000000 838:00:00.000000 8375959.9999999000
+3020399.000000 838:59:59.000000 8385959.0000000000
+3020399.900000 838:59:59.900000 8385959.9000000000
+3020399.990000 838:59:59.990000 8385959.9900000000
+3020399.999000 838:59:59.999000 8385959.9990000000
+3020399.999900 838:59:59.999900 8385959.9999000000
+3020399.999990 838:59:59.999990 8385959.9999900000
+3020399.999999 838:59:59.999999 8385959.9999990000
+3020399.999999 838:59:59.999999 8385959.9999999000
+3020399.999999 838:59:59.999999 8395959.9999999000
+NULL NULL 876494145959.9999990000
+NULL NULL 876494145959.9999999000
+NULL NULL 876494155959.9999990000
+NULL NULL 876494155959.9999999000
+Warnings:
+Warning 1292 Incorrect time value: '8385959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 17
+Warning 1292 Incorrect time value: '8385959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 17
+Warning 1292 Incorrect time value: '8395959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 18
+Warning 1292 Incorrect time value: '8395959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 18
+Warning 1292 Incorrect time value: '876494145959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 19
+Warning 1292 Incorrect time value: '876494145959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 19
+Warning 1292 Incorrect time value: '876494145959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 20
+Warning 1292 Incorrect time value: '876494145959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 20
+Warning 1292 Incorrect time value: '876494155959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 21
+Warning 1292 Incorrect time value: '876494155959.9999990000' for column `test`.`t1_time_in_decimal`.`a` at row 21
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+Warning 1292 Incorrect time value: '876494155959.9999999000' for column `test`.`t1_time_in_decimal`.`a` at row 22
+#
+# Functions with a single DATE input, conversion from DATETIME-in-VARCHAR
+#
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+QUARTER(a) CAST(a AS DATE) a
+4 2000-12-31 2000-12-31 23:59:59
+4 2000-12-31 2000-12-31 23:59:59.9
+4 2000-12-31 2000-12-31 23:59:59.99
+4 2000-12-31 2000-12-31 23:59:59.999
+4 2000-12-31 2000-12-31 23:59:59.9999
+4 2000-12-31 2000-12-31 23:59:59.99999
+4 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+DAY(a) CAST(a AS DATE) a
+31 2000-12-31 2000-12-31 23:59:59
+31 2000-12-31 2000-12-31 23:59:59.9
+31 2000-12-31 2000-12-31 23:59:59.99
+31 2000-12-31 2000-12-31 23:59:59.999
+31 2000-12-31 2000-12-31 23:59:59.9999
+31 2000-12-31 2000-12-31 23:59:59.99999
+31 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+MONTH(a) CAST(a AS DATE) a
+12 2000-12-31 2000-12-31 23:59:59
+12 2000-12-31 2000-12-31 23:59:59.9
+12 2000-12-31 2000-12-31 23:59:59.99
+12 2000-12-31 2000-12-31 23:59:59.999
+12 2000-12-31 2000-12-31 23:59:59.9999
+12 2000-12-31 2000-12-31 23:59:59.99999
+12 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+YEAR(a) CAST(a AS DATE) a
+2000 2000-12-31 2000-12-31 23:59:59
+2000 2000-12-31 2000-12-31 23:59:59.9
+2000 2000-12-31 2000-12-31 23:59:59.99
+2000 2000-12-31 2000-12-31 23:59:59.999
+2000 2000-12-31 2000-12-31 23:59:59.9999
+2000 2000-12-31 2000-12-31 23:59:59.99999
+2000 2000-12-31 2000-12-31 23:59:59.999999
+2001 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+DAYNAME(a) CAST(a AS DATE) a
+Sunday 2000-12-31 2000-12-31 23:59:59
+Sunday 2000-12-31 2000-12-31 23:59:59.9
+Sunday 2000-12-31 2000-12-31 23:59:59.99
+Sunday 2000-12-31 2000-12-31 23:59:59.999
+Sunday 2000-12-31 2000-12-31 23:59:59.9999
+Sunday 2000-12-31 2000-12-31 23:59:59.99999
+Sunday 2000-12-31 2000-12-31 23:59:59.999999
+Monday 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+MONTHNAME(a) CAST(a AS DATE) a
+December 2000-12-31 2000-12-31 23:59:59
+December 2000-12-31 2000-12-31 23:59:59.9
+December 2000-12-31 2000-12-31 23:59:59.99
+December 2000-12-31 2000-12-31 23:59:59.999
+December 2000-12-31 2000-12-31 23:59:59.9999
+December 2000-12-31 2000-12-31 23:59:59.99999
+December 2000-12-31 2000-12-31 23:59:59.999999
+January 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+LAST_DAY(a) CAST(a AS DATE) a
+2000-12-31 2000-12-31 2000-12-31 23:59:59
+2000-12-31 2000-12-31 2000-12-31 23:59:59.9
+2000-12-31 2000-12-31 2000-12-31 23:59:59.99
+2000-12-31 2000-12-31 2000-12-31 23:59:59.999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.9999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.99999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.999999
+2000-12-31 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+TO_DAYS(a) CAST(a AS DATE) a
+730850 2000-12-31 2000-12-31 23:59:59
+730850 2000-12-31 2000-12-31 23:59:59.9
+730850 2000-12-31 2000-12-31 23:59:59.99
+730850 2000-12-31 2000-12-31 23:59:59.999
+730850 2000-12-31 2000-12-31 23:59:59.9999
+730850 2000-12-31 2000-12-31 23:59:59.99999
+730850 2000-12-31 2000-12-31 23:59:59.999999
+730851 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+DAYOFYEAR(a) CAST(a AS DATE) a
+366 2000-12-31 2000-12-31 23:59:59
+366 2000-12-31 2000-12-31 23:59:59.9
+366 2000-12-31 2000-12-31 23:59:59.99
+366 2000-12-31 2000-12-31 23:59:59.999
+366 2000-12-31 2000-12-31 23:59:59.9999
+366 2000-12-31 2000-12-31 23:59:59.99999
+366 2000-12-31 2000-12-31 23:59:59.999999
+1 2000-12-31 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+CREATE TABLE t1 (a VARCHAR(32));
+INSERT INTO t1 VALUES
+('2002-01-05 23:59:59'),
+('2002-01-05 23:59:59.999999'),
+('2002-01-05 23:59:59.9999999');
+SELECT YEARWEEK(a), a FROM t1;
+YEARWEEK(a) a
+200152 2002-01-05 23:59:59
+200152 2002-01-05 23:59:59.999999
+200201 2002-01-05 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2002-01-05 23:59:59.9999999'
+SELECT WEEK(a), a FROM t1;
+WEEK(a) a
+0 2002-01-05 23:59:59
+0 2002-01-05 23:59:59.999999
+1 2002-01-05 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2002-01-05 23:59:59.9999999'
+SELECT WEEKDAY(a), a FROM t1;
+WEEKDAY(a) a
+5 2002-01-05 23:59:59
+5 2002-01-05 23:59:59.999999
+6 2002-01-05 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2002-01-05 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20020105235959),
+(20020105235959.999999),
+(20020105235959.9999999);
+SELECT YEARWEEK(a), a FROM t1;
+YEARWEEK(a) a
+200152 20020105235959.000000000
+200152 20020105235959.999999000
+200201 20020105235959.999999900
+SELECT WEEK(a), a FROM t1;
+WEEK(a) a
+0 20020105235959.000000000
+0 20020105235959.999999000
+1 20020105235959.999999900
+SELECT WEEKDAY(a), a FROM t1;
+WEEKDAY(a) a
+5 20020105235959.000000000
+5 20020105235959.999999000
+6 20020105235959.999999900
+DROP TABLE t1;
+#
+# Functions with a single DATE input, conversion from DATETIME-in-DECIMAL
+#
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+QUARTER(a) CAST(a AS DATE) a
+4 2000-12-31 20001231235959.0000000000
+4 2000-12-31 20001231235959.9000000000
+4 2000-12-31 20001231235959.9900000000
+4 2000-12-31 20001231235959.9990000000
+4 2000-12-31 20001231235959.9999000000
+4 2000-12-31 20001231235959.9999900000
+4 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAY(a) CAST(a AS DATE) a
+31 2000-12-31 20001231235959.0000000000
+31 2000-12-31 20001231235959.9000000000
+31 2000-12-31 20001231235959.9900000000
+31 2000-12-31 20001231235959.9990000000
+31 2000-12-31 20001231235959.9999000000
+31 2000-12-31 20001231235959.9999900000
+31 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+MONTH(a) CAST(a AS DATE) a
+12 2000-12-31 20001231235959.0000000000
+12 2000-12-31 20001231235959.9000000000
+12 2000-12-31 20001231235959.9900000000
+12 2000-12-31 20001231235959.9990000000
+12 2000-12-31 20001231235959.9999000000
+12 2000-12-31 20001231235959.9999900000
+12 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+YEAR(a) CAST(a AS DATE) a
+2000 2000-12-31 20001231235959.0000000000
+2000 2000-12-31 20001231235959.9000000000
+2000 2000-12-31 20001231235959.9900000000
+2000 2000-12-31 20001231235959.9990000000
+2000 2000-12-31 20001231235959.9999000000
+2000 2000-12-31 20001231235959.9999900000
+2000 2000-12-31 20001231235959.9999990000
+2001 2000-12-31 20001231235959.9999999000
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAYNAME(a) CAST(a AS DATE) a
+Sunday 2000-12-31 20001231235959.0000000000
+Sunday 2000-12-31 20001231235959.9000000000
+Sunday 2000-12-31 20001231235959.9900000000
+Sunday 2000-12-31 20001231235959.9990000000
+Sunday 2000-12-31 20001231235959.9999000000
+Sunday 2000-12-31 20001231235959.9999900000
+Sunday 2000-12-31 20001231235959.9999990000
+Monday 2000-12-31 20001231235959.9999999000
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+MONTHNAME(a) CAST(a AS DATE) a
+December 2000-12-31 20001231235959.0000000000
+December 2000-12-31 20001231235959.9000000000
+December 2000-12-31 20001231235959.9900000000
+December 2000-12-31 20001231235959.9990000000
+December 2000-12-31 20001231235959.9999000000
+December 2000-12-31 20001231235959.9999900000
+December 2000-12-31 20001231235959.9999990000
+January 2000-12-31 20001231235959.9999999000
+SELECT YEARWEEK(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+YEARWEEK(a) CAST(a AS DATE) a
+200053 2000-12-31 20001231235959.0000000000
+200053 2000-12-31 20001231235959.9000000000
+200053 2000-12-31 20001231235959.9900000000
+200053 2000-12-31 20001231235959.9990000000
+200053 2000-12-31 20001231235959.9999000000
+200053 2000-12-31 20001231235959.9999900000
+200053 2000-12-31 20001231235959.9999990000
+200053 2000-12-31 20001231235959.9999999000
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+LAST_DAY(a) CAST(a AS DATE) a
+2000-12-31 2000-12-31 20001231235959.0000000000
+2000-12-31 2000-12-31 20001231235959.9000000000
+2000-12-31 2000-12-31 20001231235959.9900000000
+2000-12-31 2000-12-31 20001231235959.9990000000
+2000-12-31 2000-12-31 20001231235959.9999000000
+2000-12-31 2000-12-31 20001231235959.9999900000
+2000-12-31 2000-12-31 20001231235959.9999990000
+2000-12-31 2000-12-31 20001231235959.9999999000
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+TO_DAYS(a) CAST(a AS DATE) a
+730850 2000-12-31 20001231235959.0000000000
+730850 2000-12-31 20001231235959.9000000000
+730850 2000-12-31 20001231235959.9900000000
+730850 2000-12-31 20001231235959.9990000000
+730850 2000-12-31 20001231235959.9999000000
+730850 2000-12-31 20001231235959.9999900000
+730850 2000-12-31 20001231235959.9999990000
+730851 2000-12-31 20001231235959.9999999000
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAYOFYEAR(a) CAST(a AS DATE) a
+366 2000-12-31 20001231235959.0000000000
+366 2000-12-31 20001231235959.9000000000
+366 2000-12-31 20001231235959.9900000000
+366 2000-12-31 20001231235959.9990000000
+366 2000-12-31 20001231235959.9999000000
+366 2000-12-31 20001231235959.9999900000
+366 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+DAYOFMONTH(a) CAST(a AS DATE) a
+31 2000-12-31 20001231235959.0000000000
+31 2000-12-31 20001231235959.9000000000
+31 2000-12-31 20001231235959.9900000000
+31 2000-12-31 20001231235959.9990000000
+31 2000-12-31 20001231235959.9999000000
+31 2000-12-31 20001231235959.9999900000
+31 2000-12-31 20001231235959.9999990000
+1 2000-12-31 20001231235959.9999999000
+#
+# Functions with a single DATETIME input, conversion from DATETIME-in-VARCHAR
+#
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+TO_SECONDS(a) CAST(a AS DATETIME(6)) a
+63145526399 2000-12-31 23:59:59.000000 2000-12-31 23:59:59
+63145526399 2000-12-31 23:59:59.900000 2000-12-31 23:59:59.9
+63145526399 2000-12-31 23:59:59.990000 2000-12-31 23:59:59.99
+63145526399 2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999
+63145526399 2000-12-31 23:59:59.999900 2000-12-31 23:59:59.9999
+63145526399 2000-12-31 23:59:59.999990 2000-12-31 23:59:59.99999
+63145526399 2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+63145526400 2001-01-01 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+UNIX_TIMESTAMP(a) CAST(a AS DATETIME(6)) a
+978307199.000000 2000-12-31 23:59:59.000000 2000-12-31 23:59:59
+978307199.900000 2000-12-31 23:59:59.900000 2000-12-31 23:59:59.9
+978307199.990000 2000-12-31 23:59:59.990000 2000-12-31 23:59:59.99
+978307199.999000 2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999
+978307199.999900 2000-12-31 23:59:59.999900 2000-12-31 23:59:59.9999
+978307199.999990 2000-12-31 23:59:59.999990 2000-12-31 23:59:59.99999
+978307199.999999 2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+978307200.000000 2001-01-01 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SET time_zone=DEFAULT;
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+CONVERT_TZ(a, '+00:00','+00:00') CAST(a AS DATETIME(6)) a
+2000-12-31 23:59:59.000000 2000-12-31 23:59:59.000000 2000-12-31 23:59:59
+2000-12-31 23:59:59.900000 2000-12-31 23:59:59.900000 2000-12-31 23:59:59.9
+2000-12-31 23:59:59.990000 2000-12-31 23:59:59.990000 2000-12-31 23:59:59.99
+2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999
+2000-12-31 23:59:59.999900 2000-12-31 23:59:59.999900 2000-12-31 23:59:59.9999
+2000-12-31 23:59:59.999990 2000-12-31 23:59:59.999990 2000-12-31 23:59:59.99999
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999
+2001-01-01 00:00:00.000000 2001-01-01 00:00:00.000000 2000-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+#
+# Functions with a single DATETIME input, conversion from DATETIME-in-DECIMAL
+#
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+TO_SECONDS(a) CAST(a AS DATETIME(6)) a
+63145526399 2000-12-31 23:59:59.000000 20001231235959.0000000000
+63145526399 2000-12-31 23:59:59.900000 20001231235959.9000000000
+63145526399 2000-12-31 23:59:59.990000 20001231235959.9900000000
+63145526399 2000-12-31 23:59:59.999000 20001231235959.9990000000
+63145526399 2000-12-31 23:59:59.999900 20001231235959.9999000000
+63145526399 2000-12-31 23:59:59.999990 20001231235959.9999900000
+63145526399 2000-12-31 23:59:59.999999 20001231235959.9999990000
+63145526400 2001-01-01 00:00:00.000000 20001231235959.9999999000
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+UNIX_TIMESTAMP(a) CAST(a AS DATETIME(6)) a
+978307199.000000 2000-12-31 23:59:59.000000 20001231235959.0000000000
+978307199.900000 2000-12-31 23:59:59.900000 20001231235959.9000000000
+978307199.990000 2000-12-31 23:59:59.990000 20001231235959.9900000000
+978307199.999000 2000-12-31 23:59:59.999000 20001231235959.9990000000
+978307199.999900 2000-12-31 23:59:59.999900 20001231235959.9999000000
+978307199.999990 2000-12-31 23:59:59.999990 20001231235959.9999900000
+978307199.999999 2000-12-31 23:59:59.999999 20001231235959.9999990000
+978307200.000000 2001-01-01 00:00:00.000000 20001231235959.9999999000
+SET time_zone=DEFAULT;
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+CONVERT_TZ(a, '+00:00','+00:00') CAST(a AS DATETIME(6)) a
+2000-12-31 23:59:59.000000 2000-12-31 23:59:59.000000 20001231235959.0000000000
+2000-12-31 23:59:59.900000 2000-12-31 23:59:59.900000 20001231235959.9000000000
+2000-12-31 23:59:59.990000 2000-12-31 23:59:59.990000 20001231235959.9900000000
+2000-12-31 23:59:59.999000 2000-12-31 23:59:59.999000 20001231235959.9990000000
+2000-12-31 23:59:59.999900 2000-12-31 23:59:59.999900 20001231235959.9999000000
+2000-12-31 23:59:59.999990 2000-12-31 23:59:59.999990 20001231235959.9999900000
+2000-12-31 23:59:59.999999 2000-12-31 23:59:59.999999 20001231235959.9999990000
+2001-01-01 00:00:00.000000 2001-01-01 00:00:00.000000 20001231235959.9999999000
+DROP TABLE t1_datetime_in_varchar;
+DROP TABLE t1_datetime_in_decimal;
+DROP TABLE t1_time_in_varchar;
+DROP TABLE t1_time_in_decimal;
+#
+# Functions that construct DATETIME
+#
+SET time_zone='+00:00';
+CREATE TABLE t1_unix_timestamp (id SERIAL, a DECIMAL(30,10));
+INSERT INTO t1_unix_timestamp (a) VALUES
+(980639999),
+(980639999.9),
+(980639999.999999),
+(980639999.9999999),
+(2147483647),
+(2147483647.9),
+(2147483647.999999),
+(2147483647.9999999);
+SELECT a, FROM_UNIXTIME(a) FROM t1_unix_timestamp ORDER BY id;
+a FROM_UNIXTIME(a)
+980639999.0000000000 2001-01-27 23:59:59.000000
+980639999.9000000000 2001-01-27 23:59:59.900000
+980639999.9999990000 2001-01-27 23:59:59.999999
+980639999.9999999000 2001-01-28 00:00:00.000000
+2147483647.0000000000 2038-01-19 03:14:07.000000
+2147483647.9000000000 2038-01-19 03:14:07.900000
+2147483647.9999990000 2038-01-19 03:14:07.999999
+2147483647.9999999000 NULL
+DROP TABLE t1_unix_timestamp;
+SET time_zone=DEFAULT;
+#
+# Functions that construct TIME
+#
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(59),
+(59.9),
+(59.999999),
+(59.9999999),
+(3020398),
+(3020398.999999),
+(3020398.9999999),
+(3020399),
+(3020399.999999),
+(3020399.9999999),
+(9223372036854775807),
+(9223372036854775807.9),
+(9223372036854775807.999999),
+(9223372036854775807.9999999),
+(18446744073709551615),
+(18446744073709551615.9),
+(18446744073709551615.999999),
+(18446744073709551615.9999999);
+SELECT a, SEC_TO_TIME(a) FROM t1_sec ORDER BY id;
+a SEC_TO_TIME(a)
+59.0000000000 00:00:59.000000
+59.9000000000 00:00:59.900000
+59.9999990000 00:00:59.999999
+59.9999999000 00:01:00.000000
+3020398.0000000000 838:59:58.000000
+3020398.9999990000 838:59:58.999999
+3020398.9999999000 838:59:59.000000
+3020399.0000000000 838:59:59.000000
+3020399.9999990000 838:59:59.999999
+3020399.9999999000 838:59:59.999999
+9223372036854775807.0000000000 838:59:59.999999
+9223372036854775807.9000000000 838:59:59.999999
+9223372036854775807.9999990000 838:59:59.999999
+9223372036854775807.9999999000 838:59:59.999999
+18446744073709551615.0000000000 838:59:59.999999
+18446744073709551615.9000000000 838:59:59.999999
+18446744073709551615.9999990000 838:59:59.999999
+18446744073709551615.9999999000 838:59:59.999999
+Warnings:
+Warning 1292 Truncated incorrect seconds value: '3020400'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.0000000000'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.9000000000'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.9999990000'
+Warning 1292 Truncated incorrect seconds value: '9223372036854775807.9999999000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.0000000000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.9000000000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.9999990000'
+Warning 1292 Truncated incorrect seconds value: '18446744073709551615.9999999000'
+DROP TABLE t1_sec;
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, MAKETIME(0, 0, a) FROM t1_sec ORDER BY id;
+a MAKETIME(0, 0, a)
+0.0000000000 00:00:00.000000
+0.9000000000 00:00:00.900000
+0.9999990000 00:00:00.999999
+0.9999999000 00:00:01.000000
+DROP TABLE t1_sec;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+SELECT
+'----',
+a,
+DATE_FORMAT(a, '%Y') AS yyyy,
+DATE_FORMAT(a, '%Y-%m-%d') AS d,
+DATE_FORMAT(a, '%H:%i:%s') AS t0,
+DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+---- ----
+a 2017-12-31 23:59:59
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.000000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.000000
+---- ----
+a 2017-12-31 23:59:59.9
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.900000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.900000
+---- ----
+a 2017-12-31 23:59:59.999999
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.999999
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.999999
+---- ----
+a 2017-12-31 23:59:59.9999999
+yyyy 2018
+d 2018-01-01
+t0 00:00:00
+t6 00:00:00.000000
+dt0 2018-01-01 00:00:00
+dt6 2018-01-01 00:00:00.000000
+Warnings:
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Level Note
+Code 1292
+Message Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20171231235959),
+(20171231235959.9),
+(20171231235959.999999),
+(20171231235959.9999999);
+SELECT
+'----',
+a,
+DATE_FORMAT(a, '%Y') AS yyyy,
+DATE_FORMAT(a, '%Y-%m-%d') AS d,
+DATE_FORMAT(a, '%H:%i:%s') AS t0,
+DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+---- ----
+a 20171231235959.000000000
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.000000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.000000
+---- ----
+a 20171231235959.900000000
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.900000
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.900000
+---- ----
+a 20171231235959.999999000
+yyyy 2017
+d 2017-12-31
+t0 23:59:59
+t6 23:59:59.999999
+dt0 2017-12-31 23:59:59
+dt6 2017-12-31 23:59:59.999999
+---- ----
+a 20171231235959.999999900
+yyyy 2018
+d 2018-01-01
+t0 00:00:00
+t6 00:00:00.000000
+dt0 2018-01-01 00:00:00
+dt6 2018-01-01 00:00:00.000000
+DROP TABLE t1;
+#
+# Functions with two temporal parameters that round nanoseconds in both parameters in MySQL
+#
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMESTAMP(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMESTAMP(t1.a, t2.a) a a
+2017-12-31 23:59:59.000000 2017-12-31 23:59:59 00:00:00
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59 00:00:00.9
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59 00:00:00.999999
+2018-01-01 00:00:00.000000 2017-12-31 23:59:59 00:00:00.9999999
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59.9 00:00:00
+2018-01-01 00:00:00.800000 2017-12-31 23:59:59.9 00:00:00.9
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.9 00:00:00.999999
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9 00:00:00.9999999
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59.999999 00:00:00
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.999999 00:00:00.9
+2018-01-01 00:00:00.999998 2017-12-31 23:59:59.999999 00:00:00.999999
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.999999 00:00:00.9999999
+2018-01-01 00:00:00.000000 2017-12-31 23:59:59.9999999 00:00:00
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9999999 00:00:00.9
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.9999999 00:00:00.999999
+2018-01-01 00:00:01.000000 2017-12-31 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+SELECT ADDTIME(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+ADDTIME(t1.a, t2.a) a a
+2017-12-31 23:59:59 2017-12-31 23:59:59 00:00:00
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59 00:00:00.9
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59 00:00:00.999999
+2018-01-01 00:00:00 2017-12-31 23:59:59 00:00:00.9999999
+2017-12-31 23:59:59.900000 2017-12-31 23:59:59.9 00:00:00
+2018-01-01 00:00:00.800000 2017-12-31 23:59:59.9 00:00:00.9
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.9 00:00:00.999999
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9 00:00:00.9999999
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59.999999 00:00:00
+2018-01-01 00:00:00.899999 2017-12-31 23:59:59.999999 00:00:00.9
+2018-01-01 00:00:00.999998 2017-12-31 23:59:59.999999 00:00:00.999999
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.999999 00:00:00.9999999
+2018-01-01 00:00:00 2017-12-31 23:59:59.9999999 00:00:00
+2018-01-01 00:00:00.900000 2017-12-31 23:59:59.9999999 00:00:00.9
+2018-01-01 00:00:00.999999 2017-12-31 23:59:59.9999999 00:00:00.999999
+2018-01-01 00:00:01 2017-12-31 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '00:00:00.9999999'
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMEDIFF(t1.a, t2.a) a a
+23:59:59.000000 23:59:59 00:00:00
+23:59:58.100000 23:59:59 00:00:00.9
+23:59:58.000001 23:59:59 00:00:00.999999
+23:59:58.000000 23:59:59 00:00:00.9999999
+23:59:59.900000 23:59:59.9 00:00:00
+23:59:59.000000 23:59:59.9 00:00:00.9
+23:59:58.900001 23:59:59.9 00:00:00.999999
+23:59:58.900000 23:59:59.9 00:00:00.9999999
+23:59:59.999999 23:59:59.999999 00:00:00
+23:59:59.099999 23:59:59.999999 00:00:00.9
+23:59:59.000000 23:59:59.999999 00:00:00.999999
+23:59:58.999999 23:59:59.999999 00:00:00.9999999
+24:00:00.000000 23:59:59.9999999 00:00:00
+23:59:59.100000 23:59:59.9999999 00:00:00.9
+23:59:59.000001 23:59:59.9999999 00:00:00.999999
+23:59:59.000000 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+SELECT TIMESTAMPDIFF(MICROSECOND,t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMESTAMPDIFF(MICROSECOND,t1.a, t2.a) a a
+0 2001-12-31 23:59:59 2001-12-31 23:59:59
+900000 2001-12-31 23:59:59 2001-12-31 23:59:59.9
+999999 2001-12-31 23:59:59 2001-12-31 23:59:59.999999
+1000000 2001-12-31 23:59:59 2001-12-31 23:59:59.9999999
+-900000 2001-12-31 23:59:59.9 2001-12-31 23:59:59
+0 2001-12-31 23:59:59.9 2001-12-31 23:59:59.9
+99999 2001-12-31 23:59:59.9 2001-12-31 23:59:59.999999
+100000 2001-12-31 23:59:59.9 2001-12-31 23:59:59.9999999
+-999999 2001-12-31 23:59:59.999999 2001-12-31 23:59:59
+-99999 2001-12-31 23:59:59.999999 2001-12-31 23:59:59.9
+0 2001-12-31 23:59:59.999999 2001-12-31 23:59:59.999999
+1 2001-12-31 23:59:59.999999 2001-12-31 23:59:59.9999999
+-1000000 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59
+-100000 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59.9
+-1 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59.999999
+0 2001-12-31 23:59:59.9999999 2001-12-31 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-12-31 23:59:59.9999999'
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+TIMEDIFF(t1.a, t2.a) a a
+23:59:59.000000 23:59:59 00:00:00
+23:59:58.100000 23:59:59 00:00:00.9
+23:59:58.000001 23:59:59 00:00:00.999999
+23:59:58.000000 23:59:59 00:00:00.9999999
+23:59:59.900000 23:59:59.9 00:00:00
+23:59:59.000000 23:59:59.9 00:00:00.9
+23:59:58.900001 23:59:59.9 00:00:00.999999
+23:59:58.900000 23:59:59.9 00:00:00.9999999
+23:59:59.999999 23:59:59.999999 00:00:00
+23:59:59.099999 23:59:59.999999 00:00:00.9
+23:59:59.000000 23:59:59.999999 00:00:00.999999
+23:59:58.999999 23:59:59.999999 00:00:00.9999999
+24:00:00.000000 23:59:59.9999999 00:00:00
+23:59:59.100000 23:59:59.9999999 00:00:00.9
+23:59:59.000001 23:59:59.9999999 00:00:00.999999
+23:59:59.000000 23:59:59.9999999 00:00:00.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+Note 1292 Truncated incorrect time value: '23:59:59.9999999'
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1, t2;
+#
+# STR_TO_DATE behaviour is questionable in MySQL 5.6 (MySQL Bug #92474)
+#
+# It truncates nanoseconds, but this may change in the future.
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+SELECT
+a,
+STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s') AS c0,
+STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s.%f') AS c6
+FROM t1;
+a c0 c6
+2017-12-31 23:59:59 2017-12-31 23:59:59 2017-12-31 23:59:59.000000
+2017-12-31 23:59:59.9 2017-12-31 23:59:59 2017-12-31 23:59:59.900000
+2017-12-31 23:59:59.999999 2017-12-31 23:59:59 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59.9999999 2017-12-31 23:59:59 2017-12-31 23:59:59.999999
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9'
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.999999'
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Warning 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+DROP TABLE t1;
+#
+# DATE_ADD behaviour is questionable in MySQL 5.6 (MySQL Bug#92473)
+# It rounds nanoseconds in the first argument, but truncates nanoseconds in the second argument.
+# This may change in the future, to round both arguments.
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+CREATE TABLE t2 (b DECIMAL(32,9));
+INSERT INTO t2 VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, b, DATE_ADD(a, INTERVAL b SECOND) FROM t1,t2 ORDER BY a,b;
+a b DATE_ADD(a, INTERVAL b SECOND)
+2017-12-31 23:59:59 0.000000000 2017-12-31 23:59:59.000000
+2017-12-31 23:59:59 0.900000000 2017-12-31 23:59:59.900000
+2017-12-31 23:59:59 0.999999000 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59 0.999999900 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59.9 0.000000000 2017-12-31 23:59:59.900000
+2017-12-31 23:59:59.9 0.900000000 2018-01-01 00:00:00.800000
+2017-12-31 23:59:59.9 0.999999000 2018-01-01 00:00:00.899999
+2017-12-31 23:59:59.9 0.999999900 2018-01-01 00:00:00.899999
+2017-12-31 23:59:59.999999 0.000000000 2017-12-31 23:59:59.999999
+2017-12-31 23:59:59.999999 0.900000000 2018-01-01 00:00:00.899999
+2017-12-31 23:59:59.999999 0.999999000 2018-01-01 00:00:00.999998
+2017-12-31 23:59:59.999999 0.999999900 2018-01-01 00:00:00.999998
+2017-12-31 23:59:59.9999999 0.000000000 2018-01-01 00:00:00.000000
+2017-12-31 23:59:59.9999999 0.900000000 2018-01-01 00:00:00.900000
+2017-12-31 23:59:59.9999999 0.999999000 2018-01-01 00:00:00.999999
+2017-12-31 23:59:59.9999999 0.999999900 2018-01-01 00:00:00.999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2017-12-31 23:59:59.9999999'
+DROP TABLE t1, t2;
diff --git a/mysql-test/main/func_time_round.test b/mysql-test/main/func_time_round.test
new file mode 100644
index 00000000000..12d3a50a10f
--- /dev/null
+++ b/mysql-test/main/func_time_round.test
@@ -0,0 +1,461 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+CREATE TABLE t1_datetime_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_datetime_in_varchar (a) VALUES
+('2000-12-31 23:59:59'),
+('2000-12-31 23:59:59.9'),
+('2000-12-31 23:59:59.99'),
+('2000-12-31 23:59:59.999'),
+('2000-12-31 23:59:59.9999'),
+('2000-12-31 23:59:59.99999'),
+('2000-12-31 23:59:59.999999'),
+('2000-12-31 23:59:59.9999999');
+
+CREATE TABLE t1_datetime_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_datetime_in_decimal (a) VALUES
+(20001231235959),
+(20001231235959.9),
+(20001231235959.99),
+(20001231235959.999),
+(20001231235959.9999),
+(20001231235959.99999),
+(20001231235959.999999),
+(20001231235959.9999999);
+
+
+CREATE TABLE t1_time_in_varchar (id SERIAL, a VARCHAR(64));
+INSERT INTO t1_time_in_varchar (a) VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.99'),
+('00:00:00.999'),
+('00:00:00.9999'),
+('00:00:00.99999'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+INSERT INTO t1_time_in_varchar (a) VALUES
+('837:59:59.9999999'),
+('838:59:59'),
+('838:59:59.9'),
+('838:59:59.99'),
+('838:59:59.999'),
+('838:59:59.9999'),
+('838:59:59.99999'),
+('838:59:59.999999'),
+('838:59:59.9999999'),
+('839:59:59.9999999'),
+('87649414:59:59.999999'),
+('87649414:59:59.9999999'),
+('87649415:59:59.999999'),
+('87649415:59:59.9999999');
+
+
+CREATE TABLE t1_time_in_decimal (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_time_in_decimal (a) VALUES
+(0),
+(0.9),
+(0.99),
+(0.999),
+(0.9999),
+(0.99999),
+(0.999999),
+(0.9999999);
+INSERT INTO t1_time_in_decimal (a) VALUES
+(8375959.9999999),
+(8385959),
+(8385959.9),
+(8385959.99),
+(8385959.999),
+(8385959.9999),
+(8385959.99999),
+(8385959.999999),
+(8385959.9999999),
+(8395959.9999999),
+(876494145959.999999),
+(876494145959.9999999),
+(876494155959.999999),
+(876494155959.9999999);
+
+--echo #
+--echo # TIME: LEAST/GREATEST
+--echo #
+
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_varchar;
+SELECT GREATEST(TIME'00:00:00', a) FROM t1_time_in_decimal;
+
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000004');
+SELECT GREATEST(TIME'00:00:00', 0.0000004);
+
+SELECT GREATEST(TIME'00:00:00', '00:00:00.0000005');
+SELECT GREATEST(TIME'00:00:00', 0.0000005);
+
+
+--echo #
+--echo # Functions with a single TIME input, conversion from DATETIME-in-VARCHAR
+--echo #
+
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single TIME input, conversion from DATETIME-in-DECIMAL
+--echo #
+
+
+SELECT SECOND(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT MINUTE(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT HOUR(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT EXTRACT(SECOND FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT EXTRACT(MINUTE FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT EXTRACT(HOUR FROM a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT TIME_TO_SEC(a), CAST(a AS TIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single TIME interval input, conversion from TIME-interval-in-VARCHAR
+--echo #
+
+SELECT
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ CAST(a AS INTERVAL DAY_SECOND(6)),
+ a
+FROM t1_time_in_varchar ORDER BY id;
+
+SELECT
+ TIME_TO_SEC(a),
+ CAST(a AS TIME(6)),
+ a
+FROM t1_time_in_varchar ORDER BY id;
+
+--echo #
+--echo # Functions with a single TIME interval input, conversion from TIME-interval-in-DECIMAL
+--echo #
+
+SELECT
+ EXTRACT(DAY FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ CAST(a AS INTERVAL DAY_SECOND(6)),
+ a
+FROM t1_time_in_decimal ORDER BY id;
+
+SELECT
+ TIME_TO_SEC(a),
+ CAST(a AS TIME(6)),
+ a
+FROM t1_time_in_decimal ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single DATE input, conversion from DATETIME-in-VARCHAR
+--echo #
+
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
+
+
+CREATE TABLE t1 (a VARCHAR(32));
+INSERT INTO t1 VALUES
+('2002-01-05 23:59:59'),
+('2002-01-05 23:59:59.999999'),
+('2002-01-05 23:59:59.9999999');
+SELECT YEARWEEK(a), a FROM t1;
+SELECT WEEK(a), a FROM t1;
+SELECT WEEKDAY(a), a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20020105235959),
+(20020105235959.999999),
+(20020105235959.9999999);
+SELECT YEARWEEK(a), a FROM t1;
+SELECT WEEK(a), a FROM t1;
+SELECT WEEKDAY(a), a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # Functions with a single DATE input, conversion from DATETIME-in-DECIMAL
+--echo #
+
+SELECT QUARTER(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT MONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT YEARWEEK(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single DATETIME input, conversion from DATETIME-in-VARCHAR
+--echo #
+
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+SET time_zone=DEFAULT;
+
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_varchar ORDER BY id;
+
+
+--echo #
+--echo # Functions with a single DATETIME input, conversion from DATETIME-in-DECIMAL
+--echo #
+
+SELECT TO_SECONDS(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+SET time_zone='+00:00';
+SELECT UNIX_TIMESTAMP(a), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+SET time_zone=DEFAULT;
+
+SELECT CONVERT_TZ(a, '+00:00','+00:00'), CAST(a AS DATETIME(6)), a FROM t1_datetime_in_decimal ORDER BY id;
+
+DROP TABLE t1_datetime_in_varchar;
+DROP TABLE t1_datetime_in_decimal;
+DROP TABLE t1_time_in_varchar;
+DROP TABLE t1_time_in_decimal;
+
+
+--echo #
+--echo # Functions that construct DATETIME
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1_unix_timestamp (id SERIAL, a DECIMAL(30,10));
+INSERT INTO t1_unix_timestamp (a) VALUES
+(980639999),
+(980639999.9),
+(980639999.999999),
+(980639999.9999999),
+(2147483647),
+(2147483647.9),
+(2147483647.999999),
+(2147483647.9999999);
+SELECT a, FROM_UNIXTIME(a) FROM t1_unix_timestamp ORDER BY id;
+DROP TABLE t1_unix_timestamp;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # Functions that construct TIME
+--echo #
+
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(59),
+(59.9),
+(59.999999),
+(59.9999999),
+(3020398),
+(3020398.999999),
+(3020398.9999999),
+(3020399),
+(3020399.999999),
+(3020399.9999999),
+(9223372036854775807),
+(9223372036854775807.9),
+(9223372036854775807.999999),
+(9223372036854775807.9999999),
+(18446744073709551615),
+(18446744073709551615.9),
+(18446744073709551615.999999),
+(18446744073709551615.9999999);
+SELECT a, SEC_TO_TIME(a) FROM t1_sec ORDER BY id;
+DROP TABLE t1_sec;
+
+
+CREATE TABLE t1_sec (id SERIAL, a DECIMAL(38,10));
+INSERT INTO t1_sec (a) VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, MAKETIME(0, 0, a) FROM t1_sec ORDER BY id;
+DROP TABLE t1_sec;
+
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+--vertical_results
+SELECT
+ '----',
+ a,
+ DATE_FORMAT(a, '%Y') AS yyyy,
+ DATE_FORMAT(a, '%Y-%m-%d') AS d,
+ DATE_FORMAT(a, '%H:%i:%s') AS t0,
+ DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+--horizontal_results
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(20171231235959),
+(20171231235959.9),
+(20171231235959.999999),
+(20171231235959.9999999);
+--vertical_results
+SELECT
+ '----',
+ a,
+ DATE_FORMAT(a, '%Y') AS yyyy,
+ DATE_FORMAT(a, '%Y-%m-%d') AS d,
+ DATE_FORMAT(a, '%H:%i:%s') AS t0,
+ DATE_FORMAT(a, '%H:%i:%s.%f') AS t6,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s') AS dt0,
+ DATE_FORMAT(a, '%Y-%m-%d %H:%i:%s.%f') AS dt6
+FROM t1;
+--horizontal_results
+DROP TABLE t1;
+
+
+--echo #
+--echo # Functions with two temporal parameters that round nanoseconds in both parameters in MySQL
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+
+SELECT TIMESTAMP(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+SELECT ADDTIME(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+
+DROP TABLE t1, t2;
+
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+DROP TABLE t1, t2;
+
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+INSERT INTO t2 VALUES
+('2001-12-31 23:59:59'),
+('2001-12-31 23:59:59.9'),
+('2001-12-31 23:59:59.999999'),
+('2001-12-31 23:59:59.9999999');
+SELECT TIMESTAMPDIFF(MICROSECOND,t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+DROP TABLE t1, t2;
+
+CREATE TABLE t1 (a VARCHAR(64));
+CREATE TABLE t2 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('23:59:59'),
+('23:59:59.9'),
+('23:59:59.999999'),
+('23:59:59.9999999');
+INSERT INTO t2 VALUES
+('00:00:00'),
+('00:00:00.9'),
+('00:00:00.999999'),
+('00:00:00.9999999');
+SELECT TIMEDIFF(t1.a, t2.a), t1.a, t2.a FROM t1,t2 ORDER BY t1.a, t2.a;
+DROP TABLE t1, t2;
+
+
+--echo #
+--echo # STR_TO_DATE behaviour is questionable in MySQL 5.6 (MySQL Bug #92474)
+--echo #
+
+--echo # It truncates nanoseconds, but this may change in the future.
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+
+SELECT
+ a,
+ STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s') AS c0,
+ STR_TO_DATE(a, '%Y-%m-%d %H:%i:%s.%f') AS c6
+FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # DATE_ADD behaviour is questionable in MySQL 5.6 (MySQL Bug#92473)
+--echo # It rounds nanoseconds in the first argument, but truncates nanoseconds in the second argument.
+--echo # This may change in the future, to round both arguments.
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES
+('2017-12-31 23:59:59'),
+('2017-12-31 23:59:59.9'),
+('2017-12-31 23:59:59.999999'),
+('2017-12-31 23:59:59.9999999');
+CREATE TABLE t2 (b DECIMAL(32,9));
+INSERT INTO t2 VALUES
+(0),
+(0.9),
+(0.999999),
+(0.9999999);
+SELECT a, b, DATE_ADD(a, INTERVAL b SECOND) FROM t1,t2 ORDER BY a,b;
+DROP TABLE t1, t2;
diff --git a/mysql-test/main/gis-rtree.result b/mysql-test/main/gis-rtree.result
index 5d4708dd111..2ef8757339e 100644
--- a/mysql-test/main/gis-rtree.result
+++ b/mysql-test/main/gis-rtree.result
@@ -744,6 +744,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index 05e6e41852a..7695cef15c5 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -1679,7 +1679,7 @@ NULL
#
create table t1 (pt point);
insert into t1 values(Geomfromtext('POLYGON((1 1, 2 2, 2 1, 1 1))'));
-ERROR 22007: Incorrect POINT value: 'POLYGON' for column 'pt' at row 1
+ERROR 22007: Incorrect POINT value: 'POLYGON' for column `test`.`t1`.`pt` at row 1
drop table t1;
SELECT st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100));
st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100))
diff --git a/mysql-test/main/gis2.result b/mysql-test/main/gis2.result
index c0b476e080b..cb919ecdeb1 100644
--- a/mysql-test/main/gis2.result
+++ b/mysql-test/main/gis2.result
@@ -27,12 +27,12 @@ drop table t1;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
set timestamp=10;
insert into t1 values(default);
-ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column 'p' at row 1
+ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
drop table t1;
SET timestamp=default;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
set timestamp=10;
alter table t1 add column i int;
-ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column 'p' at row 1
+ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`(temporary)`.`p` at row 1
drop table t1;
SET timestamp=default;
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index 74f86edd4ea..46d87a4777f 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -2,6 +2,7 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1;
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
drop table if exists t1;
drop database if exists mysqltest;
connect master,localhost,root,,;
@@ -298,12 +299,7 @@ ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
select 1;
1
1
-insert into mysql.user (host, user) values ('localhost', 'test11');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert into mysql.global_priv (host, user) values ('localhost', 'test11');
insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc;
@@ -842,9 +838,6 @@ drop database db27515;
End of 4.1 tests
use test;
create table t1 (a int);
-create table t2 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
create user mysqltest_8@'';
create user mysqltest_8@host8;
create user mysqltest_8@'';
@@ -854,7 +847,7 @@ ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'%'
create user mysqltest_8@host8;
ERROR HY000: Operation CREATE USER failed for 'mysqltest_8'@'host8'
select user, QUOTE(host) from mysql.user where user="mysqltest_8";
-user QUOTE(host)
+User QUOTE(host)
mysqltest_8 '%'
mysqltest_8 'host8'
Schema privileges
@@ -1044,9 +1037,6 @@ ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%'
drop user mysqltest_8@host8;
show grants for mysqltest_8@host8;
ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host 'host8'
-insert into mysql.user select * from t2;
-flush privileges;
-drop table t2;
drop table t1;
connection master;
CREATE DATABASE mysqltest3;
@@ -1453,7 +1443,6 @@ CURRENT_USER()
root@localhost
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
-update mysql.user set plugin='';
# Bug#57952
@@ -1925,7 +1914,7 @@ DROP DATABASE db2;
grant usage on Foo.* to myuser@Localhost identified by 'foo';
grant select on Foo.* to myuser@localhost;
select host,user from mysql.user where User='myuser';
-host user
+Host User
localhost myuser
revoke select on Foo.* from myuser@localhost;
delete from mysql.user where User='myuser';
@@ -2733,7 +2722,7 @@ DROP USER untrusted@localhost;
DROP DATABASE secret;
set GLOBAL sql_mode=default;
#
-# Start of 10.2 tests
+# End of 10.1 tests
#
#
# MDEV-10134 Add full support for DEFAULT
@@ -2762,3 +2751,24 @@ DROP USER dummy@localhost;
#
# End of 10.2 tests
#
+#
+# MDEV-17932 : Assertion upon double RENAME USER
+#
+CREATE USER foo@localhost;
+CREATE USER bar2@localhost;
+RENAME USER foo@localhost TO bar1@localhost, bar1@localhost TO bar3@localhost;
+DROP USER bar2@localhost;
+DROP USER bar3@localhost;
+#
+# MDEV-17946 : Unsorted acl_dbs after RENAME USER
+#
+CREATE USER foo;
+GRANT SELECT ON test.* TO foo;
+RENAME USER '' TO 'name';
+GRANT UPDATE ON test.* TO foo;
+RENAME USER 'name' to '';
+DROP USER foo;
+#
+# End of 10.4 tests
+#
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test
index f54c4bd981d..8ae64c9ad4d 100644
--- a/mysql-test/main/grant.test
+++ b/mysql-test/main/grant.test
@@ -10,6 +10,7 @@ set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
SET GLOBAL log_bin_trust_function_creators = 1;
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
# Cleanup
--disable_warnings
@@ -131,7 +132,7 @@ select 1; # To test that the previous command didn't cause problems
#
# Bug#4898 User privileges depending on ORDER BY Settings of table db
#
-insert into mysql.user (host, user) values ('localhost', 'test11');
+insert into mysql.global_priv (host, user) values ('localhost', 'test11');
insert into mysql.db (host, db, user, select_priv) values
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
alter table mysql.db order by db asc;
@@ -581,12 +582,6 @@ drop database db27515;
use test;
create table t1 (a int);
-# Backup anonymous users and remove them. (They get in the way of
-# the one we test with here otherwise.)
-create table t2 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
-
# Create some users with different hostnames
create user mysqltest_8@'';
create user mysqltest_8@host8;
@@ -700,10 +695,6 @@ drop user mysqltest_8@host8;
--error ER_NONEXISTING_GRANT
show grants for mysqltest_8@host8;
-# Restore the anonymous users.
-insert into mysql.user select * from t2;
-flush privileges;
-drop table t2;
drop table t1;
#
@@ -1265,9 +1256,6 @@ SELECT CURRENT_USER();
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
-
#
# Bug#57952: privilege change is not taken into account by EXECUTE.
#
@@ -2233,7 +2221,7 @@ set GLOBAL sql_mode=default;
--source include/wait_until_count_sessions.inc
--echo #
---echo # Start of 10.2 tests
+--echo # End of 10.1 tests
--echo #
--echo #
@@ -2258,3 +2246,28 @@ DROP USER dummy@localhost;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-17932 : Assertion upon double RENAME USER
+--echo #
+CREATE USER foo@localhost;
+CREATE USER bar2@localhost;
+RENAME USER foo@localhost TO bar1@localhost, bar1@localhost TO bar3@localhost;
+DROP USER bar2@localhost;
+DROP USER bar3@localhost;
+
+--echo #
+--echo # MDEV-17946 : Unsorted acl_dbs after RENAME USER
+--echo #
+CREATE USER foo;
+GRANT SELECT ON test.* TO foo;
+RENAME USER '' TO 'name';
+GRANT UPDATE ON test.* TO foo;
+RENAME USER 'name' to '';
+DROP USER foo;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result
index 4fd1a6c3fe7..5d168a04455 100644
--- a/mysql-test/main/grant2.result
+++ b/mysql-test/main/grant2.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET NAMES binary;
@@ -182,10 +183,10 @@ grant insert on test.* to 'mysqltest_2';
grant update on test.t1 to 'mysqltest_2';
grant update (c2) on test.t2 to 'mysqltest_2';
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
-host user password plugin authentication_string
+Host User Password plugin authentication_string
% mysqltest_1 mysql_native_password
-% mysqltest_2 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff
+% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
+% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%';
host db user
% test mysqltest_2
@@ -207,9 +208,9 @@ 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_%';
-host user password plugin authentication_string
-% mysqltest_2 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff
+Host User Password plugin authentication_string
+% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
+% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%';
host db user
% test mysqltest_2
@@ -224,9 +225,9 @@ show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
rename user 'mysqltest_2' to 'mysqltest_1';
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
-host user password plugin authentication_string
-% mysqltest_1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff
+Host User Password plugin authentication_string
+% mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
+% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff mysql_native_password fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%' ;
host db user
% test mysqltest_1
@@ -328,12 +329,7 @@ GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost'
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
-insert into mysql.user set host='%', user='mysqltest_B';
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert into mysql.global_priv set host='%', user='mysqltest_B';
create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%';
@@ -373,7 +369,7 @@ set password = password('changed');
disconnect b12302;
connection default;
select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1';
-host length(authentication_string)
+Host length(authentication_string)
127.0.0.1 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.1';
delete from mysql.user where user like 'mysqltest\_1';
@@ -388,7 +384,7 @@ set password = password('changed');
disconnect b12302_2;
connection default;
select host, length(authentication_string) from mysql.user where user like 'mysqltest\_1';
-host length(authentication_string)
+Host length(authentication_string)
127.0.0.0/255.0.0.0 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.0/255.0.0.0';
delete from mysql.user where user like 'mysqltest\_1';
@@ -428,15 +424,10 @@ disconnect con2root;
disconnect con3root;
create database TESTDB;
create table t2(a int);
-create temporary table t1 as select * from mysql.user;
-delete from mysql.user where host='localhost';
-INSERT INTO mysql.user (host, user, password) VALUES
-('%','mysqltest_1',password('password'));
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+create temporary table t1 as select * from mysql.global_priv;
+delete from mysql.global_priv where host='localhost';
+INSERT INTO mysql.global_priv (host, user, priv) VALUES
+('%','mysqltest_1',json_object('authentication_string', password('password')));
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES;
@@ -445,9 +436,9 @@ create database TEStdb;
Got one of the listed errors
connection default;
disconnect con1;
-delete from mysql.user;
+delete from mysql.global_priv;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
-insert into mysql.user select * from t1;
+insert into mysql.global_priv select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
@@ -556,25 +547,17 @@ USE mysql;
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password plugin authentication_string insert_priv
+User Host Password plugin authentication_string Insert_priv
root localhost Y
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
-SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password plugin authentication_string insert_priv
-root localhost N
GRANT INSERT ON *.* TO CURRENT_USER();
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password plugin authentication_string insert_priv
+User Host Password plugin authentication_string Insert_priv
root localhost mysql_native_password Y
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password plugin authentication_string insert_priv
-root localhost mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
-UPDATE user SET plugin='', authentication_string='' WHERE user=@u AND host=@h;
-SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-user host password plugin authentication_string insert_priv
-root localhost Y
+User Host Password plugin authentication_string Insert_priv
+root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
+UPDATE global_priv SET priv=@root_priv;
FLUSH PRIVILEGES;
USE test;
End of 5.1 tests
diff --git a/mysql-test/main/grant2.test b/mysql-test/main/grant2.test
index f0b58da4cb5..b33d7d63992 100644
--- a/mysql-test/main/grant2.test
+++ b/mysql-test/main/grant2.test
@@ -4,7 +4,7 @@
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
-
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
set GLOBAL sql_mode="";
set LOCAL sql_mode="";
SET NAMES binary;
@@ -361,7 +361,7 @@ connection user4;
show grants;
--error ER_TABLEACCESS_DENIED_ERROR
select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
-insert into mysql.user set host='%', user='mysqltest_B';
+insert into mysql.global_priv set host='%', user='mysqltest_B';
create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%';
drop user mysqltest_C@'%';
@@ -481,10 +481,10 @@ disconnect con3root;
create database TESTDB;
create table t2(a int);
-create temporary table t1 as select * from mysql.user;
-delete from mysql.user where host='localhost';
-INSERT INTO mysql.user (host, user, password) VALUES
-('%','mysqltest_1',password('password'));
+create temporary table t1 as select * from mysql.global_priv;
+delete from mysql.global_priv where host='localhost';
+INSERT INTO mysql.global_priv (host, user, priv) VALUES
+('%','mysqltest_1',json_object('authentication_string', password('password')));
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y');
FLUSH PRIVILEGES;
@@ -500,9 +500,9 @@ create database TEStdb;
# Clean-up
connection default;
disconnect con1;
-delete from mysql.user;
+delete from mysql.global_priv;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
-insert into mysql.user select * from t1;
+insert into mysql.global_priv select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
@@ -661,22 +661,15 @@ SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
# show current privs.
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-# toggle INSERT
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
-SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-
# show that GRANT ... TO CURRENT_USER() no longer crashes
GRANT INSERT ON *.* TO CURRENT_USER();
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
# show that GRANT ... TO CURRENT_USER() IDENTIFIED BY ... works now
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-UPDATE user SET plugin='', authentication_string='' WHERE user=@u AND host=@h;
-SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
-
+UPDATE global_priv SET priv=@root_priv;
FLUSH PRIVILEGES;
USE test;
diff --git a/mysql-test/main/grant3.result b/mysql-test/main/grant3.result
index 4c99fb02f19..1bc6e7572c5 100644
--- a/mysql-test/main/grant3.result
+++ b/mysql-test/main/grant3.result
@@ -29,7 +29,7 @@ grant select on test.* to CUser@localhost;
grant select on test.* to CUser@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
@@ -37,14 +37,14 @@ CUser localhost test Y
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
@@ -56,7 +56,7 @@ grant select on test.t1 to CUser@localhost;
grant select on test.t1 to CUser@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -64,14 +64,14 @@ CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -82,7 +82,7 @@ grant select(a) on test.t1 to CUser@localhost;
grant select(a) on test.t1 to CUser@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -90,14 +90,14 @@ CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
-user host
+User Host
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
@@ -109,7 +109,7 @@ grant select on test.* to CUser2@localhost;
grant select on test.* to CUser2@LOCALHOST;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
-user host
+User Host
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
@@ -117,7 +117,7 @@ CUser2 localhost test Y
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
-user host
+User Host
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
@@ -125,7 +125,7 @@ REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
-user host
+User Host
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
diff --git a/mysql-test/main/grant4.result b/mysql-test/main/grant4.result
index 735b8260fce..9aad70205ec 100644
--- a/mysql-test/main/grant4.result
+++ b/mysql-test/main/grant4.result
@@ -198,15 +198,15 @@ grant select on test.* to foo6 identified by password '2222222222222222';
grant select on test.* to foo7 identified via mysql_native_password using '11111111111111111111111111111111111111111';
grant select on test.* to foo8 identified via mysql_old_password using '2222222222222222';
select user,password,plugin,authentication_string from mysql.user where user like 'foo%';
-user password plugin authentication_string
-foo1 mysql_native_password 11111111111111111111111111111111111111111
-foo2 mysql_old_password 2222222222222222
-foo3 mysql_native_password 11111111111111111111111111111111111111111
-foo4 mysql_old_password 2222222222222222
-foo5 mysql_native_password 11111111111111111111111111111111111111111
-foo6 mysql_old_password 2222222222222222
-foo7 mysql_native_password 11111111111111111111111111111111111111111
-foo8 mysql_old_password 2222222222222222
+User Password plugin authentication_string
+foo1 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo2 2222222222222222 mysql_old_password 2222222222222222
+foo3 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo4 2222222222222222 mysql_old_password 2222222222222222
+foo5 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo6 2222222222222222 mysql_old_password 2222222222222222
+foo7 11111111111111111111111111111111111111111 mysql_native_password 11111111111111111111111111111111111111111
+foo8 2222222222222222 mysql_old_password 2222222222222222
drop user foo1;
drop user foo2;
drop user foo3;
diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result
index af7b75277b8..5bf7b2d1934 100644
--- a/mysql-test/main/grant5.result
+++ b/mysql-test/main/grant5.result
@@ -18,6 +18,13 @@ ERROR 42000: Access denied for user 'test'@'%' to database 'mysql'
connection default;
drop user test, foo;
drop role foo;
+CREATE TABLE t1 (a INT);
+LOCK TABLE t1 WRITE;
+REVOKE EXECUTE ON PROCEDURE sp FROM u;
+ERROR HY000: Table 'procs_priv' was not locked with LOCK TABLES
+REVOKE PROCESS ON *.* FROM u;
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
+DROP TABLE t1;
create user u1@h identified with 'mysql_native_password' using 'pwd';
ERROR HY000: Password hash should be a 41-digit hexadecimal number
create user u1@h identified with 'mysql_native_password' using password('pwd');
@@ -38,19 +45,19 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number
set password for u7@h = old_password('pwd');
create user u8@h identified with 'mysql_old_password';
set password for u8@h = '78a302dd267f6044';
-select user,host,password,plugin,authentication_string from mysql.user where host='h';
-user host password plugin authentication_string
-u1 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
-u2 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
-u3 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
-u4 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
-u5 h mysql_old_password 78a302dd267f6044
-u6 h mysql_old_password 78a302dd267f6044
-u7 h mysql_old_password 78a302dd267f6044
-u8 h mysql_old_password 78a302dd267f6044
-update mysql.user set authentication_string='bad' where user='u1';
-update mysql.user set authentication_string='bad' where user='u5';
-update mysql.user set plugin='nonexistent' where user='u8';
+select user,host,plugin,authentication_string from mysql.user where host='h';
+User Host plugin authentication_string
+u1 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u2 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u3 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u4 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
+u5 h mysql_old_password 78a302dd267f6044
+u6 h mysql_old_password 78a302dd267f6044
+u7 h mysql_old_password 78a302dd267f6044
+u8 h mysql_old_password 78a302dd267f6044
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u5';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') where user='u8';
flush privileges;
Warnings:
Error 1372 Password hash should be a 41-digit hexadecimal number
@@ -89,7 +96,7 @@ grant select on *.* to u7@h;
grant select on *.* to u8@h;
ERROR 28000: Can't find any matching row in the user table
select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_';
-user select_priv plugin authentication_string
+User Select_priv plugin authentication_string
u1 N mysql_native_password bad
u2 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
u3 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index 1ab68b82066..daf972dbe4b 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -24,6 +24,17 @@ drop user test, foo;
drop role foo;
#
+# MDEV-17975 Assertion `! is_set()' or `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon REVOKE under LOCK TABLE
+#
+CREATE TABLE t1 (a INT);
+LOCK TABLE t1 WRITE;
+--error ER_TABLE_NOT_LOCKED
+REVOKE EXECUTE ON PROCEDURE sp FROM u;
+--error ER_TABLE_NOT_LOCKED
+REVOKE PROCESS ON *.* FROM u;
+DROP TABLE t1;
+
+#
# MDEV-12321 authentication plugin: SET PASSWORD support
#
error ER_PASSWD_LENGTH;
@@ -49,11 +60,11 @@ set password for u7@h = old_password('pwd');
create user u8@h identified with 'mysql_old_password';
eval set password for u8@h = '$p';
sorted_result;
-select user,host,password,plugin,authentication_string from mysql.user where host='h';
+select user,host,plugin,authentication_string from mysql.user where host='h';
# test with invalid entries
-update mysql.user set authentication_string='bad' where user='u1';
-update mysql.user set authentication_string='bad' where user='u5';
-update mysql.user set plugin='nonexistent' where user='u8';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'bad') where user='u5';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') where user='u8';
flush privileges;
# invalid entries are skipped, users don't exist
error ER_PASSWORD_NO_MATCH;
diff --git a/mysql-test/main/grant_4332.result b/mysql-test/main/grant_4332.result
index b62ca1a20cc..af6b23088f5 100644
--- a/mysql-test/main/grant_4332.result
+++ b/mysql-test/main/grant_4332.result
@@ -1,5 +1,5 @@
-set GLOBAL sql_mode="";
-set LOCAL sql_mode="";
+set global sql_mode="";
+set local sql_mode="";
alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default '';
alter table mysql.tables_priv modify User char(16) binary not null default '';
@@ -32,4 +32,4 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def user() 253 141 14 N 1 39 8
user()
root@localhost
-set GLOBAL sql_mode=default;
+set global sql_mode=default;
diff --git a/mysql-test/main/grant_4332.test b/mysql-test/main/grant_4332.test
index 41e0b822f98..f723e4afe44 100644
--- a/mysql-test/main/grant_4332.test
+++ b/mysql-test/main/grant_4332.test
@@ -6,8 +6,9 @@
#
--source include/not_embedded.inc
-set GLOBAL sql_mode="";
-set LOCAL sql_mode="";
+--source include/switch_to_mysql_user.inc
+set global sql_mode="";
+set local sql_mode="";
alter table mysql.user modify User char(16) binary not null default '';
alter table mysql.db modify User char(16) binary not null default '';
@@ -42,4 +43,5 @@ flush privileges;
select user();
--disable_metadata
-set GLOBAL sql_mode=default;
+set global sql_mode=default;
+--source include/switch_to_mysql_global_priv.inc
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index 5cf79b0de4e..a6878e8c3a1 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -536,17 +536,17 @@ a b
select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
a b
1 3
+1 1
3 1
2 2
-1 1
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
-1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t2 ALL a NULL NULL NULL 4 Using temporary; Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary
-1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t2 ALL a NULL NULL NULL 4 Using temporary
+1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
create table t1 (a int, b int);
insert into t1 values (1, 4),(10, 40),(1, 4),(10, 43),(1, 4),(10, 41),(1, 4),(10, 43),(1, 4);
@@ -1330,6 +1330,7 @@ INSERT INTO t1 SELECT a + 64,b FROM t1;
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT a FROM t1 WHERE a < 2;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2753,6 +2754,7 @@ create table t2 (c int, col1 int, key(c));
insert into t2 select t1.a, 100000 from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain
select
@@ -2836,6 +2838,16 @@ select distinct 1 from t1 group by a,b with rollup limit 1;
1
1
drop table t1;
+CREATE TABLE t1 ( pk int, i1 int, v1 varchar(1));
+explain
+SELECT 1 FROM t1
+GROUP BY REPEAT((BINARY pk), v1), AES_DECRYPT((@A := i1), 20852) WITH ROLLUP HAVING LOAD_FILE('a') ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+SELECT 1 FROM t1
+GROUP BY REPEAT((BINARY pk), v1), AES_DECRYPT((@A := i1), 20852) WITH ROLLUP HAVING LOAD_FILE('a') ;
+1
+drop table t1;
#
# MDEV-16170
# Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test
index c14023f817a..6686166e00e 100644
--- a/mysql-test/main/group_by.test
+++ b/mysql-test/main/group_by.test
@@ -1950,6 +1950,19 @@ insert into t1 values(-126,7),(1,1),(0,0),(-1,1),(351,65534);
select distinct 1 from t1 group by a,b with rollup limit 1;
drop table t1;
+#
+# MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free
+# or Invalid write in JOIN::make_aggr_tables_info
+#
+
+CREATE TABLE t1 ( pk int, i1 int, v1 varchar(1));
+explain
+SELECT 1 FROM t1
+GROUP BY REPEAT((BINARY pk), v1), AES_DECRYPT((@A := i1), 20852) WITH ROLLUP HAVING LOAD_FILE('a') ;
+SELECT 1 FROM t1
+GROUP BY REPEAT((BINARY pk), v1), AES_DECRYPT((@A := i1), 20852) WITH ROLLUP HAVING LOAD_FILE('a') ;
+drop table t1;
+
--echo #
--echo # MDEV-16170
--echo # Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
diff --git a/mysql-test/main/group_by_innodb.result b/mysql-test/main/group_by_innodb.result
index 034866b63d5..f935d4da45b 100644
--- a/mysql-test/main/group_by_innodb.result
+++ b/mysql-test/main/group_by_innodb.result
@@ -151,6 +151,7 @@ KEY idx3 (a, b)
INSERT INTO t1 (a, b) SELECT t01.a, t02.a FROM t0 t01, t0 t02;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT a, MAX(b) FROM t1 WHERE a >= 0 GROUP BY a,a;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/main/group_min_max.result b/mysql-test/main/group_min_max.result
index 4667c4b6daa..7a49dbdf3f8 100644
--- a/mysql-test/main/group_min_max.result
+++ b/mysql-test/main/group_min_max.result
@@ -40,6 +40,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
drop table if exists t2;
create table t2 (
@@ -68,6 +69,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
drop table if exists t3;
create table t3 (
@@ -130,6 +132,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1, min(a2) from t1 group by a1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -684,10 +687,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
@@ -804,10 +807,10 @@ b h212 e212
c h312 e312
explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 5 Using where; Using index for group-by
+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 6 Using where; Using index for group-by
explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
@@ -1662,7 +1665,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using index
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -1713,7 +1716,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by
explain extended select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 50.78 Using where; Using index
+1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 0.39 Using where; Using index
Warnings:
Note 1003 select distinct `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where `test`.`t1`.`b` = 'a' and `test`.`t1`.`c` = 'i121' and `test`.`t1`.`a2` >= 'b'
explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
@@ -1730,7 +1733,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain extended select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 50.61 Using where; Using index
+1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 0.28 Using where; Using index
Warnings:
Note 1003 select distinct `test`.`t2`.`a1` AS `a1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where `test`.`t2`.`b` = 'a' and `test`.`t2`.`c` = 'i121' and `test`.`t2`.`a2` >= 'b'
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
@@ -1876,7 +1879,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
explain select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using index
+1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -2075,19 +2078,19 @@ id select_type table type possible_keys key key_len ref rows Extra
explain extended select a1,a2,min(b),max(b) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 77 85.71 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 77 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,min(`test`.`t1`.`b`) AS `min(b)`,max(`test`.`t1`.`b`) AS `max(b)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`
explain extended select a1,a2,b,min(c),max(c) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 51.56 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 40.10 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,min(`test`.`t1`.`c`) AS `min(c)`,max(`test`.`t1`.`c`) AS `max(c)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain extended select a1,a2,b,c from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b,c;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 51.56 Using where; Using temporary; Using filesort
+1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 40.10 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`,`test`.`t1`.`c`
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b < 'b') group by a1;
@@ -2095,7 +2098,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
explain extended select a1,a2,b from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2,b;
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 77 85.71 Using where; Using index
+1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 77 100.00 Using where; Using index
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
explain select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
@@ -2286,6 +2289,7 @@ INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT a,a FROM t1 ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2353,6 +2357,7 @@ INSERT INTO t1 VALUES
(1,-1),(1,-2),(1,-3),(1,-4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain SELECT MAX(b), a FROM t1 WHERE b < 2 AND a = 1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2377,10 +2382,11 @@ INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 4 Using index for group-by
+1 SIMPLE t1 index NULL a 10 NULL 15 Using index
FLUSH STATUS;
SELECT max(b), a FROM t1 GROUP BY a;
max(b) a
@@ -2390,18 +2396,18 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL a 5 NULL 4 Using index for group-by
+1 SIMPLE t1 index NULL a 10 NULL 15 Using index
FLUSH STATUS;
CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b;
@@ -2412,8 +2418,8 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
(SELECT max(b), a FROM t1 GROUP BY a) UNION
@@ -2425,20 +2431,20 @@ max(b) a
6 4
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 16
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 30
Handler_read_retry 0
EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
(SELECT max(b), a FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range NULL a 5 NULL 4 Using index for group-by
-2 UNION t1 range NULL a 5 NULL 4 Using index for group-by
+1 PRIMARY t1 index NULL a 10 NULL 15 Using index
+2 UNION t1 index NULL a 10 NULL 15 Using index
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1 AS t1_outer;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
-2 SUBQUERY t1 range NULL a 5 NULL 4 Using index for group-by
+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
@@ -2448,38 +2454,38 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY t1 range NULL a 5 NULL 4 Using index for group-by
+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 4
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 4 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 4 Using index for group-by
+1 PRIMARY t1_outer index a a 10 NULL 15 Using where; Using index
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t1_outer.a 1
+2 MATERIALIZED t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1_outer range NULL a 5 NULL 4 Using index for group-by
-2 SUBQUERY t1 range NULL a 5 NULL 4 Using index for group-by
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
AND t1_outer1.b = t1_outer2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer (flat, BNL join)
-2 SUBQUERY t1 range NULL a 5 NULL 4 Using index for group-by
+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index
2 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index
-3 SUBQUERY t1 range NULL a 5 NULL 4 Using index for group-by
+3 SUBQUERY t1 index NULL a 10 NULL 15 Using index
CREATE TABLE t3 LIKE t1;
FLUSH STATUS;
INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 5
+Handler_read_next 15
Handler_read_retry 0
DELETE FROM t3;
FLUSH STATUS;
@@ -2487,15 +2493,15 @@ INSERT INTO t3 SELECT 1, (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2)
FROM t1 LIMIT 1;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 0
+Handler_read_key 0
+Handler_read_next 15
Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
@@ -2503,8 +2509,8 @@ FROM t1) > 10000;
ERROR 21000: Subquery returns more than 1 row
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
-Handler_read_key 8
-Handler_read_next 1
+Handler_read_key 0
+Handler_read_next 16
Handler_read_retry 0
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (a int, INDEX idx(a));
@@ -2513,6 +2519,7 @@ INSERT INTO t1 VALUES
(4), (2), (1), (2), (2), (4), (1), (4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT(a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2537,6 +2544,7 @@ INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN
SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
@@ -2666,6 +2674,7 @@ INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT a,b,c+1,d FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT DISTINCT c FROM t1 WHERE d=4;
id select_type table type possible_keys key key_len ref rows Extra
@@ -2685,6 +2694,7 @@ INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
# test MIN
#should use range with index for group by
@@ -2712,7 +2722,7 @@ INSERT INTO t SELECT a, 2 FROM t;
EXPLAIN
SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t range NULL a 10 NULL 3 Using where; Using index for group-by
+1 SIMPLE t range NULL a 10 NULL 2 Using where; Using index for group-by
#should return 1 row
SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
a MAX(b)
@@ -2745,6 +2755,7 @@ CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL, KEY (b));
INSERT INTO t1 VALUES(1,1),(2,1);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT 1 AS c, b FROM t1 WHERE b IN (1,2) GROUP BY c, b;
c b
@@ -3323,7 +3334,9 @@ CREATE TABLE t2 (c int) ;
INSERT INTO t2 VALUES (0),(1);
ANALYZE TABLE t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT MIN(a), b FROM t1 WHERE a > 0 GROUP BY b;
@@ -3377,7 +3390,9 @@ INSERT INTO t2 SELECT a, b + 4, c,d,e,f FROM t2;
INSERT INTO t2 SELECT a + 1, b, c,d,e,f FROM t2;
ANALYZE TABLE t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN SELECT COUNT(DISTINCT a) FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3658,6 +3673,7 @@ CREATE TABLE t (a INT, b INT, KEY(a,b));
INSERT INTO t VALUES (1,1), (2,2), (3,3), (4,4), (1,0), (3,2), (4,5);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
a SUM(DISTINCT a) MIN(b)
@@ -3736,6 +3752,7 @@ INSERT INTO t1 SELECT a + 1, b FROM t1;
INSERT INTO t1 SELECT a + 2, b FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE INDEX break_it ON t1 (a, b);
EXPLAIN
@@ -3795,6 +3812,7 @@ INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
INSERT INTO t1 SELECT * FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @save_use_stat_tables= @@use_stat_tables;
@@ -3802,18 +3820,18 @@ set @@optimizer_use_condition_selectivity=4;
set @@use_stat_tables=PREFERABLY;
explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 4 100.00
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 8 100.00 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 4 100.00 Using index for group-by
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 100.00
+1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 7 100.00 Using index
+2 MATERIALIZED t1 range NULL a 5 NULL 5 100.00 Using index for group-by
Warnings:
Note 1003 /* select#1 */ select `test`.`t1_outer`.`a` AS `a` from <materialize> (/* select#2 */ select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where `test`.`t1_outer`.`a` = `<subquery2>`.`max(b)`
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set @@use_stat_tables=@save_use_stat_tables;
explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 4 100.00
-1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 8 100.00 Using index
-2 MATERIALIZED t1 range NULL a 5 NULL 4 100.00 Using index for group-by
+1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 100.00
+1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 7 100.00 Using index
+2 MATERIALIZED t1 range NULL a 5 NULL 5 100.00 Using index for group-by
Warnings:
Note 1003 /* select#1 */ select `test`.`t1_outer`.`a` AS `a` from <materialize> (/* select#2 */ select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where `test`.`t1_outer`.`a` = `<subquery2>`.`max(b)`
drop table t1;
@@ -3845,6 +3863,7 @@ INSERT INTO t1 VALUES (4,'2001-01-03');
INSERT INTO t1 VALUES (4,'2001-01-04');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>='2001-01-04' GROUP BY id;
id select_type table type possible_keys key key_len ref rows Extra
@@ -3899,6 +3918,7 @@ INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT id,MIN(a),MAX(a) FROM t1 WHERE a BETWEEN ' 2001-01-04' AND '2001-01-05' GROUP BY id;
id MIN(a) MAX(a)
diff --git a/mysql-test/main/group_min_max_innodb.result b/mysql-test/main/group_min_max_innodb.result
index ed90c137b33..3586ad5237f 100644
--- a/mysql-test/main/group_min_max_innodb.result
+++ b/mysql-test/main/group_min_max_innodb.result
@@ -46,6 +46,7 @@ create index idx12672_1 on t4 (a1,a2,b,c);
create index idx12672_2 on t4 (a1,a2,b);
analyze table t4;
Table Op Msg_type Msg_text
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
select distinct a1 from t4 where pk_col not in (1,2,3,4);
a1
diff --git a/mysql-test/main/handlersocket.result b/mysql-test/main/handlersocket.result
index 1b3fc573548..8ef9b289cd0 100644
--- a/mysql-test/main/handlersocket.result
+++ b/mysql-test/main/handlersocket.result
@@ -5,7 +5,7 @@ plugin_version 1.0
plugin_status ACTIVE
plugin_type DAEMON
plugin_library handlersocket.so
-plugin_library_version 1.13
+plugin_library_version 1.14
plugin_author higuchi dot akira at dena dot jp
plugin_description Direct access into InnoDB
plugin_license BSD
diff --git a/mysql-test/main/having.result b/mysql-test/main/having.result
index f37cc48772e..a220068bc38 100644
--- a/mysql-test/main/having.result
+++ b/mysql-test/main/having.result
@@ -835,6 +835,7 @@ INSERT INTO t1 VALUES(10, 10), (11, 11), (12, 12), (12, 13),(14, 15), (15, 16),
(16, 17), (17, 17);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t)
GROUP BY t HAVING r = 1 ORDER BY t1.u;
diff --git a/mysql-test/main/huge_frm-6224.result b/mysql-test/main/huge_frm-6224.result
index 3772317c04d..bbb650bc5b4 100644
--- a/mysql-test/main/huge_frm-6224.result
+++ b/mysql-test/main/huge_frm-6224.result
@@ -1 +1,6 @@
+set global max_allowed_packet=1024*1024*10;
+connect con1,localhost,root;
ERROR HY000: The definition for table `t1` is too big
+connection default;
+disconnect con1;
+set global max_allowed_packet=default;
diff --git a/mysql-test/main/huge_frm-6224.test b/mysql-test/main/huge_frm-6224.test
index 418722a7b51..322abd01738 100644
--- a/mysql-test/main/huge_frm-6224.test
+++ b/mysql-test/main/huge_frm-6224.test
@@ -4,17 +4,24 @@
# verify that huge frms are rejected during creation, not on opening
#
--source include/have_partition.inc
+set global max_allowed_packet=1024*1024*10;
+connect con1,localhost,root;
-let $n=5646;
+let $n=8164;
let $a=create table t1 (a int) engine=myisam partition by hash(a) partitions $n (;
dec $n;
while ($n)
{
- let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n,;
+ let $a=$a partition p01234567890123456789012345678901234567890123456789012345678$n COMMENT 'partition p01234567890123456789012345678901234567890123456789012345678$n',;
dec $n;
}
--disable_query_log
--error ER_TABLE_DEFINITION_TOO_BIG
eval $a partition foo);
+--enable_query_log
+
+connection default;
+disconnect con1;
+set global max_allowed_packet=default;
diff --git a/mysql-test/main/index_merge_innodb.result b/mysql-test/main/index_merge_innodb.result
index 26b51ba444b..1562fa84c34 100644
--- a/mysql-test/main/index_merge_innodb.result
+++ b/mysql-test/main/index_merge_innodb.result
@@ -107,6 +107,7 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1;
count(*)
@@ -314,6 +315,7 @@ alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra
@@ -700,8 +702,8 @@ SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX(primary,idx)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6145
-2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 6145 Using sort_union(idx,PRIMARY); Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL #
+2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL # Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX(primary,idx)
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
diff --git a/mysql-test/main/index_merge_innodb.test b/mysql-test/main/index_merge_innodb.test
index e8dc8378ffe..2581cccced0 100644
--- a/mysql-test/main/index_merge_innodb.test
+++ b/mysql-test/main/index_merge_innodb.test
@@ -73,6 +73,7 @@ set optimizer_switch='derived_merge=off,derived_with_keys=off';
# We have to use FORCE INDEX here as Innodb gives inconsistent estimates
# which causes different query plans.
+--replace_column 9 #
EXPLAIN
SELECT COUNT(*) FROM
(SELECT * FROM t1 FORCE INDEX(primary,idx)
diff --git a/mysql-test/main/index_merge_myisam.result b/mysql-test/main/index_merge_myisam.result
index 8e83bdf6bbb..77d6ae22aa4 100644
--- a/mysql-test/main/index_merge_myisam.result
+++ b/mysql-test/main/index_merge_myisam.result
@@ -19,6 +19,7 @@ alter table t0 add key8 int not null, add index i8(key8);
update t0 set key2=key1,key3=key1,key4=key1,key5=key1,key6=key1,key7=key1,key8=1024-key1;
analyze table t0;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
explain select * from t0 where key1 < 3 or key1 > 920 and key1 < 924;
id select_type table type possible_keys key key_len ref rows Extra
@@ -950,6 +951,7 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
select key1a, key1b, key2a, key2b, key3a, key3b from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1;
count(*)
@@ -1157,6 +1159,7 @@ alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
id select_type table type possible_keys key key_len ref rows Extra
@@ -1751,6 +1754,7 @@ alter table t0 add key8 int not null, add index i8(key8);
update t0 set key2=key1,key3=key1,key8=1024-key1;
analyze table t0;
Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
test.t0 analyze status OK
set @optimizer_switch_save=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off';
diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result
index b6e331a0382..b76d9f64a9f 100644
--- a/mysql-test/main/information_schema.result
+++ b/mysql-test/main/information_schema.result
@@ -96,6 +96,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -563,6 +564,7 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION;
create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION;
select * from information_schema.views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
+def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
def test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
@@ -593,6 +595,7 @@ information_schema.tables;
s1
10
11
+NULL
drop table t1;
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table
@@ -664,7 +667,7 @@ proc body longblob
proc definer char(141)
proc created timestamp
proc modified timestamp
-proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
proc comment text
proc character_set_client char(32)
proc collation_connection char(32)
@@ -824,7 +827,7 @@ NULL
select table_type from information_schema.tables
where table_schema="mysql" and table_name="user";
table_type
-BASE TABLE
+VIEW
show open tables where `table` like "user";
Database Table In_use Name_locked
mysql user 0 0
@@ -874,6 +877,14 @@ information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST
information_schema TRIGGERS ACTION_CONDITION
information_schema TRIGGERS ACTION_STATEMENT
information_schema VIEWS VIEW_DEFINITION
+mysql global_priv Priv
+mysql user Password
+mysql user ssl_cipher
+mysql user x509_issuer
+mysql user x509_subject
+mysql user plugin
+mysql user authentication_string
+mysql user default_role
select table_name, column_name, data_type from information_schema.columns
where data_type = 'datetime' and table_name not like 'innodb_%'
order by binary table_name, ordinal_position;
@@ -1253,7 +1264,7 @@ CREATE VIEW v1 AS SELECT 1 FROM t1
WHERE f3 = (SELECT func2 ());
SELECT func1();
func1()
-1
+2
DROP TABLE t1;
DROP VIEW v1;
DROP FUNCTION func1;
@@ -1404,6 +1415,7 @@ create table t2 (f1 int, f2 int);
create view v2 as select f1+1 as a, f2 as b from t2;
select table_name, is_updatable from information_schema.views order by table_name;
table_name is_updatable
+user YES
v1 NO
v2 YES
delete from v1;
@@ -1957,8 +1969,9 @@ lock table t1 read;
connect con1, localhost, root,,;
connection con1;
flush tables;
+flush tables t1;
connection default;
-select * from information_schema.views;
+select * from information_schema.views where table_schema='test';
TABLE_CATALOG def
TABLE_SCHEMA test
TABLE_NAME v1
diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test
index 1f72d0b6129..95b6f253058 100644
--- a/mysql-test/main/information_schema.test
+++ b/mysql-test/main/information_schema.test
@@ -8,6 +8,10 @@
# on the presence of the log tables (which are CSV-based).
--source include/have_csv.inc
+# Without aria_used_for_temp_tables some I_S tables will be MyISAM,
+# while the test expects them to be Aria
+-- source include/have_aria_used_for_temp_tables.inc
+
-- source include/have_innodb.inc
# Save the initial number of concurrent sessions
@@ -1618,15 +1622,16 @@ alter table t1 change b c int;
lock table t1 read;
connect(con1, localhost, root,,);
connection con1;
-send flush tables;
+flush tables;
+send flush tables t1;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables";
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t1";
--source include/wait_condition.inc
--vertical_results
-select * from information_schema.views;
+select * from information_schema.views where table_schema='test';
--horizontal_results
unlock tables;
diff --git a/mysql-test/main/information_schema_all_engines.result b/mysql-test/main/information_schema_all_engines.result
index 0ce9f15f753..2916858b5a6 100644
--- a/mysql-test/main/information_schema_all_engines.result
+++ b/mysql-test/main/information_schema_all_engines.result
@@ -460,4 +460,4 @@ Wildcard: inf_rmation_schema
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA;
table_schema count(*)
information_schema 65
-mysql 30
+mysql 31
diff --git a/mysql-test/main/init_file_set_password-7656.result b/mysql-test/main/init_file_set_password-7656.result
index 99a16a395d7..fba65b036fd 100644
--- a/mysql-test/main/init_file_set_password-7656.result
+++ b/mysql-test/main/init_file_set_password-7656.result
@@ -1,8 +1,8 @@
create user foo@localhost;
select user,host,password from mysql.user where user='foo';
-user host password
+User Host Password
foo localhost
select user,host,password,plugin,authentication_string from mysql.user where user='foo';
-user host password plugin authentication_string
-foo localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+User Host Password plugin authentication_string
+foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
drop user foo@localhost;
diff --git a/mysql-test/main/innodb_ext_key.result b/mysql-test/main/innodb_ext_key.result
index 3339e00e7bf..b6fd9b040f1 100644
--- a/mysql-test/main/innodb_ext_key.result
+++ b/mysql-test/main/innodb_ext_key.result
@@ -877,7 +877,9 @@ alter table t3 add primary key (pk1, pk2);
alter table t3 add key (col1, col2);
analyze table t1,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
set optimizer_switch='extended_keys=off';
explain
@@ -1098,6 +1100,7 @@ from
t0 A, t0 B, t0 C;
drop table t0,t1;
#
+#
# MDEV-10360: Extended keys: index properties depend on index order
#
create table t0 (a int);
@@ -1180,7 +1183,7 @@ EXPLAIN
"key_length": "3070",
"used_key_parts": ["f2", "pk1"],
"rows": 1,
- "filtered": 100,
+ "filtered": 50,
"index_condition": "t1.pk1 <= 5 and t1.pk2 <= 5 and t1.f2 = 'abc'",
"attached_condition": "t1.f1 <= '3'"
}
@@ -1210,7 +1213,7 @@ EXPLAIN
"key_length": "3011",
"used_key_parts": ["pk1", "f2", "pk2"],
"rows": 1,
- "filtered": 100,
+ "filtered": 50,
"index_condition": "t1.f2 <= 5 and t1.pk2 <= 5 and t1.pk1 = 'abc'",
"attached_condition": "t1.f1 <= '3'"
}
diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test
index 9ec9f569210..333214ed0be 100644
--- a/mysql-test/main/innodb_ext_key.test
+++ b/mysql-test/main/innodb_ext_key.test
@@ -735,6 +735,7 @@ if ($rows < 2)
drop table t0,t1;
--echo #
+--echo #
--echo # MDEV-10360: Extended keys: index properties depend on index order
--echo #
create table t0 (a int);
diff --git a/mysql-test/main/innodb_icp.result b/mysql-test/main/innodb_icp.result
index c65e4d1f7f2..07d317925cd 100644
--- a/mysql-test/main/innodb_icp.result
+++ b/mysql-test/main/innodb_icp.result
@@ -597,7 +597,9 @@ PRIMARY KEY (pk)
INSERT INTO t2 VALUES (4,1);
ANALYZE TABLE t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1
@@ -806,7 +808,9 @@ INSERT INTO t2 (g,h) VALUES
(7,'f'),(5,'j'),(3,'e'),(1,'u'),(4,'v'),(9,'u');
ANALYZE TABLE t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SET @save_optimize_switch=@@optimizer_switch;
SET optimizer_switch='materialization=on';
@@ -817,7 +821,7 @@ AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)
OR a = 0 AND h < 'z' );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
-1 PRIMARY t2 ref g g 5 test.t.c 9 Using where
+1 PRIMARY t2 ref g g 5 test.t.c 18 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY d 3 NULL 64 Using where; Using index
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
@@ -864,7 +868,7 @@ DROP TABLE t1;
create table t1 (a int,b char(5),primary key (a), key (b(1)));
insert ignore into t1 values ('a','b');
Warnings:
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`a` at row 1
select 1 from t1 where a and b >= 'aa';
1
drop table t1;
diff --git a/mysql-test/main/innodb_mysql_sync.result b/mysql-test/main/innodb_mysql_sync.result
index a8a264d6580..3f284edde86 100644
--- a/mysql-test/main/innodb_mysql_sync.result
+++ b/mysql-test/main/innodb_mysql_sync.result
@@ -489,7 +489,9 @@ DROP TABLE t1;
SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded';
#Setup a table with FULLTEXT index.
connection default;
-CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1)) ENGINE= INNODB;
+CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1), FULLTEXT(fld1)) ENGINE= INNODB;
+Warnings:
+Note 1831 Duplicate index `fld1_2`. This is deprecated and will be disallowed in a future release
INSERT INTO t1 VALUES("String1");
#OPTIMIZE TABLE operation.
OPTIMIZE TABLE t1;
diff --git a/mysql-test/main/innodb_mysql_sync.test b/mysql-test/main/innodb_mysql_sync.test
index 66935f811d7..4026080c4b4 100644
--- a/mysql-test/main/innodb_mysql_sync.test
+++ b/mysql-test/main/innodb_mysql_sync.test
@@ -650,7 +650,7 @@ SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded';
--echo #Setup a table with FULLTEXT index.
--connection default
-CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1)) ENGINE= INNODB;
+CREATE TABLE t1(fld1 CHAR(10), FULLTEXT(fld1), FULLTEXT(fld1)) ENGINE= INNODB;
INSERT INTO t1 VALUES("String1");
--echo #OPTIMIZE TABLE operation.
diff --git a/mysql-test/main/insert.result b/mysql-test/main/insert.result
index 736aa917cae..4aea81262d2 100644
--- a/mysql-test/main/insert.result
+++ b/mysql-test/main/insert.result
@@ -92,14 +92,14 @@ create table t1(number int auto_increment primary key, original_value varchar(50
set @value= "aa";
insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
-Warning 1366 Incorrect double value: 'aa' for column 'f_double' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_float' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_double_7_2' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_float_4_3' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_double_u' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_float_u' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_double_15_1_u' at row 1
-Warning 1366 Incorrect double value: 'aa' for column 'f_float_3_1_u' at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_double` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_float` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_double_7_2` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_float_4_3` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_double_u` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_float_u` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_double_15_1_u` at row 1
+Warning 1366 Incorrect double value: 'aa' for column `test`.`t1`.`f_float_3_1_u` at row 1
select * from t1 where number =last_insert_id();
number 1
original_value aa
@@ -136,14 +136,14 @@ f_float_3_1_u 1.0
set @value= "aa1";
insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
-Warning 1366 Incorrect double value: 'aa1' for column 'f_double' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_float' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_double_7_2' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_float_4_3' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_double_u' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_float_u' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_double_15_1_u' at row 1
-Warning 1366 Incorrect double value: 'aa1' for column 'f_float_3_1_u' at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_double` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_float` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_double_7_2` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_float_4_3` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_double_u` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_float_u` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_double_15_1_u` at row 1
+Warning 1366 Incorrect double value: 'aa1' for column `test`.`t1`.`f_float_3_1_u` at row 1
select * from t1 where number =last_insert_id();
number 3
original_value aa1
diff --git a/mysql-test/main/invisible_field.result b/mysql-test/main/invisible_field.result
index 8090258c081..36e62645ef2 100644
--- a/mysql-test/main/invisible_field.result
+++ b/mysql-test/main/invisible_field.result
@@ -404,8 +404,8 @@ b int(11) YES NULL
c int(11) YES NULL
explain select * from t1,t2 where t1.b = t2.c and t1.c = t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 10
-1 SIMPLE t1 ALL b,c NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t1 ALL b,c NULL NULL NULL 10
+1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
select * from t1,t2 where t1.b = t2.c and t1.c = t2.b;
a a b c
1 1 1 1
diff --git a/mysql-test/main/invisible_field_debug.result b/mysql-test/main/invisible_field_debug.result
index 64f1d7f720e..32eb3a274d8 100644
--- a/mysql-test/main/invisible_field_debug.result
+++ b/mysql-test/main/invisible_field_debug.result
@@ -17,6 +17,8 @@ a invisible
1 9
insert into t1(a, invisible) values(99,99);
ERROR 42S22: Unknown column 'invisible' in 'field list'
+select default(invisible) from t1;
+ERROR 42S22: Unknown column 'invisible' in 'field list'
insert into t1(invisible) values(99);
ERROR 42S22: Unknown column 'invisible' in 'field list'
insert into t_tmp select a, invisible from t1;
diff --git a/mysql-test/main/invisible_field_debug.test b/mysql-test/main/invisible_field_debug.test
index 48cccb1d2cc..77e65cf7a6b 100644
--- a/mysql-test/main/invisible_field_debug.test
+++ b/mysql-test/main/invisible_field_debug.test
@@ -13,6 +13,8 @@ select a , invisible from t1;
--error ER_BAD_FIELD_ERROR
insert into t1(a, invisible) values(99,99);
--error ER_BAD_FIELD_ERROR
+select default(invisible) from t1;
+--error ER_BAD_FIELD_ERROR
insert into t1(invisible) values(99);
insert into t_tmp select a, invisible from t1;
--error ER_WRONG_VALUE_COUNT_ON_ROW
diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result
index 0a0afe6c71d..57ed343ca7b 100644
--- a/mysql-test/main/join.result
+++ b/mysql-test/main/join.result
@@ -260,8 +260,8 @@ PRIMARY KEY (id)
INSERT INTO t2 VALUES (1,'s1'),(2,'s2'),(3,'s3'),(4,'s4'),(5,'s5');
select t1.*, t2.* from t1, t2 where t2.id=t1.t2_id limit 2;
t1_id t2_id type cost_unit min_value max_value t3_id item_id id name
-22 1 Percent Cost 100 -1 6 291 1 s1
-23 1 Percent Cost 100 -1 21 291 1 s1
+12 5 Percent Cost -1 0 -1 -1 5 s5
+14 4 Percent Cost -1 0 -1 -1 4 s4
drop table t1,t2;
CREATE TABLE t1 (
siteid varchar(25) NOT NULL default '',
@@ -755,10 +755,10 @@ ERROR 42S22: Unknown column 't1.b' in 'on clause'
select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
-from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
+from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
-user Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
-user User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
+global_priv Host def mysql 0 mysql PRIMARY 1 A NULL NULL BTREE def mysql '' NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
+global_priv User def mysql 0 mysql PRIMARY 2 A NULL NULL BTREE def mysql '' NO char 80 240 NULL NULL utf8 utf8_bin char(80) PRI
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test
index ffb997260cd..6b0481d859b 100644
--- a/mysql-test/main/join.test
+++ b/mysql-test/main/join.test
@@ -555,7 +555,7 @@ select * from v1a join v1b on t1.b = t2.b;
select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
- from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
+ from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='global_priv';
drop table t1;
drop table t2;
diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result
index d079cc8ba3a..681d6f1fca2 100644
--- a/mysql-test/main/join_cache.result
+++ b/mysql-test/main/join_cache.result
@@ -84,9 +84,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
+1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where
+1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where; Using join buffer (flat, BNL join)
1 SIMPLE CountryLanguage ALL NULL NULL NULL NULL 984 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where; Using join buffer (flat, BNL join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -162,9 +162,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage ALL NULL NULL NULL NULL 984 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where; Using join buffer (incremental, BNL join)
+1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where
+1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE CountryLanguage ALL NULL NULL NULL NULL 984 Using where; Using join buffer (incremental, BNL join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -241,8 +241,8 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.Country.Code 984 Using where; Using join buffer (flat, BNLH join)
1 SIMPLE City hash_ALL NULL #hash#$hj 3 world.Country.Code 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.Country.Code 984 Using where; Using join buffer (flat, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -319,8 +319,8 @@ CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.Country.Code 984 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL NULL #hash#$hj 3 world.Country.Code 4079 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE City hash_ALL NULL #hash#$hj 3 world.Country.Code 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.Country.Code 984 Using where; Using join buffer (incremental, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -502,9 +502,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
+1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where
1 SIMPLE CountryLanguage ALL NULL NULL NULL NULL 984 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where; Using join buffer (flat, BNL join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -580,9 +580,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
+1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where
1 SIMPLE CountryLanguage ALL NULL NULL NULL NULL 984 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where; Using join buffer (incremental, BNL join)
+1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where; Using join buffer (incremental, BNL join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -658,9 +658,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.Country.Code 984 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL NULL #hash#$hj 3 world.Country.Code 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.City.Country 984 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE Country hash_ALL NULL #hash#$hj 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -736,9 +736,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.Country.Code 984 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL NULL #hash#$hj 3 world.Country.Code 4079 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE City ALL NULL NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage hash_ALL NULL #hash#$hj 3 world.City.Country 984 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE Country hash_ALL NULL #hash#$hj 3 world.City.Country 239 Using where; Using join buffer (incremental, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -853,9 +853,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage hash_ALL PRIMARY,Percentage #hash#PRIMARY 3 world.City.Country 984 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1053,9 +1053,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage hash_ALL PRIMARY,Percentage #hash#PRIMARY 3 world.City.Country 984 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (incremental, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1283,7 +1283,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -1312,9 +1312,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1323,41 +1323,41 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
-La Matanza Argentina Spanish
Lomas de Zamora Argentina Spanish
+La Matanza Argentina Spanish
Lauro de Freitas Brazil Portuguese
Los Angeles Chile Spanish
Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
Lleida (Lérida) Spain Spanish
+L´Hospitalet de Llobregat Spain Spanish
Liupanshui China Chinese
-Lianyungang China Chinese
Liangcheng China Chinese
+Lianyungang China Chinese
Lengshuijiang China Chinese
Lázaro Cárdenas Mexico Spanish
Lagos de Moreno Mexico Spanish
Las Margaritas Mexico Spanish
Lashio (Lasho) Myanmar Burmese
Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
Leverkusen Germany German
+Ludwigshafen am Rhein Germany German
Luchou Taiwan Min
Lungtan Taiwan Min
Lower Hutt New Zealand English
Los Teques Venezuela Spanish
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
Long Beach United States English
Lexington-Fayette United States English
Louisville United States English
Little Rock United States English
+Los Angeles United States English
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -1480,7 +1480,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -1509,9 +1509,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1520,41 +1520,41 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
Name Name Language
-La Matanza Argentina Spanish
Lomas de Zamora Argentina Spanish
+La Matanza Argentina Spanish
Lauro de Freitas Brazil Portuguese
Los Angeles Chile Spanish
Las Palmas de Gran Canaria Spain Spanish
-L´Hospitalet de Llobregat Spain Spanish
Lleida (Lérida) Spain Spanish
+L´Hospitalet de Llobregat Spain Spanish
Liupanshui China Chinese
-Lianyungang China Chinese
Liangcheng China Chinese
Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
-Lagos de Moreno Mexico Spanish
+Lianyungang China Chinese
Las Margaritas Mexico Spanish
+Lagos de Moreno Mexico Spanish
+Lázaro Cárdenas Mexico Spanish
Lashio (Lasho) Myanmar Burmese
Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
Leverkusen Germany German
+Ludwigshafen am Rhein Germany German
Luchou Taiwan Min
Lungtan Taiwan Min
Lower Hutt New Zealand English
Los Teques Venezuela Spanish
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
-Lexington-Fayette United States English
-Louisville United States English
Little Rock United States English
+Louisville United States English
+Lexington-Fayette United States English
+Long Beach United States English
+Los Angeles United States English
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -1677,7 +1677,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -1706,9 +1706,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1721,37 +1721,37 @@ La Matanza Argentina Spanish
Lomas de Zamora Argentina Spanish
Lauro de Freitas Brazil Portuguese
Los Angeles Chile Spanish
+Lleida (Lérida) Spain Spanish
Las Palmas de Gran Canaria Spain Spanish
L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
Lianyungang China Chinese
Liangcheng China Chinese
Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
+Liupanshui China Chinese
Lagos de Moreno Mexico Spanish
Las Margaritas Mexico Spanish
+Lázaro Cárdenas Mexico Spanish
Lashio (Lasho) Myanmar Burmese
Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
Leverkusen Germany German
+Ludwigshafen am Rhein Germany German
Luchou Taiwan Min
Lungtan Taiwan Min
Lower Hutt New Zealand English
Los Teques Venezuela Spanish
Leninsk-Kuznetski Russian Federation Russian
-Los Angeles United States English
-Long Beach United States English
Lexington-Fayette United States English
Louisville United States English
+Los Angeles United States English
Little Rock United States English
+Long Beach United States English
EXPLAIN
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -1874,7 +1874,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -1903,9 +1903,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1918,28 +1918,28 @@ La Matanza Argentina Spanish
Lomas de Zamora Argentina Spanish
Lauro de Freitas Brazil Portuguese
Los Angeles Chile Spanish
+Lleida (Lérida) Spain Spanish
Las Palmas de Gran Canaria Spain Spanish
L´Hospitalet de Llobregat Spain Spanish
-Lleida (Lérida) Spain Spanish
-Liupanshui China Chinese
Lianyungang China Chinese
Liangcheng China Chinese
Lengshuijiang China Chinese
-Lázaro Cárdenas Mexico Spanish
+Liupanshui China Chinese
Lagos de Moreno Mexico Spanish
+Lázaro Cárdenas Mexico Spanish
Las Margaritas Mexico Spanish
Lashio (Lasho) Myanmar Burmese
Lalitapur Nepal Nepali
-Ludwigshafen am Rhein Germany German
Leverkusen Germany German
+Ludwigshafen am Rhein Germany German
Luchou Taiwan Min
Lungtan Taiwan Min
Lower Hutt New Zealand English
Los Teques Venezuela Spanish
Leninsk-Kuznetski Russian Federation Russian
+Lexington-Fayette United States English
Los Angeles United States English
Long Beach United States English
-Lexington-Fayette United States English
Louisville United States English
Little Rock United States English
EXPLAIN
@@ -1948,7 +1948,7 @@ WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AN
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2104,9 +2104,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage hash_ALL PRIMARY,Percentage #hash#PRIMARY 3 world.City.Country 984 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (flat, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2208,9 +2208,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.CountryLanguage.Country 239 Using where; Using join buffer (flat, BNLH join)
-1 SIMPLE City hash_ALL Country #hash#Country 3 world.CountryLanguage.Country 4079 Using where; Using join buffer (incremental, BNLH join)
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage hash_ALL PRIMARY,Percentage #hash#PRIMARY 3 world.City.Country 984 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE Country hash_ALL PRIMARY #hash#PRIMARY 3 world.City.Country 239 Using where; Using join buffer (incremental, BNLH join)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2283,7 +2283,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -2312,9 +2312,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2357,7 +2357,7 @@ WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AN
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2387,7 +2387,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -2416,9 +2416,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2461,7 +2461,7 @@ WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AN
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2491,7 +2491,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -2520,9 +2520,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2539,12 +2539,12 @@ Las Palmas de Gran Canaria Spain Spanish
L´Hospitalet de Llobregat Spain Spanish
Lleida (Lérida) Spain Spanish
Liupanshui China Chinese
-Lianyungang China Chinese
Liangcheng China Chinese
+Lianyungang China Chinese
Lengshuijiang China Chinese
Lázaro Cárdenas Mexico Spanish
-Lagos de Moreno Mexico Spanish
Las Margaritas Mexico Spanish
+Lagos de Moreno Mexico Spanish
Lashio (Lasho) Myanmar Burmese
Lalitapur Nepal Nepali
Ludwigshafen am Rhein Germany German
@@ -2554,9 +2554,9 @@ Lungtan Taiwan Min
Lower Hutt New Zealand English
Los Teques Venezuela Spanish
Leninsk-Kuznetski Russian Federation Russian
+Lexington-Fayette United States English
Los Angeles United States English
Long Beach United States English
-Lexington-Fayette United States English
Louisville United States English
Little Rock United States English
EXPLAIN
@@ -2565,7 +2565,7 @@ WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AN
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -2595,7 +2595,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -2624,9 +2624,9 @@ City.Name LIKE 'L%' AND Country.Population > 3000000 AND
CountryLanguage.Percentage > 50 AND
LENGTH(Language) < LENGTH(City.Name) - 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
-1 SIMPLE City ref Country Country 3 world.CountryLanguage.Country 18 Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE City ALL Country NULL NULL NULL 4079 Using where
+1 SIMPLE CountryLanguage ref PRIMARY,Percentage PRIMARY 3 world.City.Country 4 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using where; Using join buffer (incremental, BKAH join); Key-ordered Rowid-ordered scan
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -2669,7 +2669,7 @@ WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AN
City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Rowid-ordered scan
-1 PRIMARY City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
+1 PRIMARY City ref Population,Country Country 3 world.Country.Code 17 Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan
SELECT Name FROM City
WHERE City.Country IN (SELECT Code FROM Country WHERE Country.Name LIKE 'L%') AND
City.Population > 100000;
@@ -3670,8 +3670,8 @@ where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
1 SIMPLE t2 ref idx idx 5 test.t1.b 1
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1
1 SIMPLE t4 ref idx idx 5 test.t1.c 1
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -3683,8 +3683,8 @@ where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -6042,12 +6042,12 @@ drop table t1;
SET join_cache_level = 3;
# The following should have
# - table order PROFILING,user,
-# - table user accessed with hash_ALL:
+# - table db accessed with hash_ALL:
explain
-SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR;
+SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL Using where
-1 SIMPLE user hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 4 Using where; Using join buffer (flat, BNLH join)
+1 SIMPLE db hash_ALL NULL #hash#$hj 1 information_schema.PROFILING.PAGE_FAULTS_MINOR 2 Using where; Using join buffer (flat, BNLH join)
set join_cache_level=default;
create table t1 (c1 date not null, key (c1)) engine=innodb;
insert t1 values ('2017-12-27');
diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test
index 82c438a96c1..b69be56a435 100644
--- a/mysql-test/main/join_cache.test
+++ b/mysql-test/main/join_cache.test
@@ -3979,9 +3979,9 @@ drop table t1;
SET join_cache_level = 3;
--echo # The following should have
--echo # - table order PROFILING,user,
---echo # - table user accessed with hash_ALL:
+--echo # - table db accessed with hash_ALL:
explain
-SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user WHERE password_expired = PAGE_FAULTS_MINOR;
+SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.db WHERE Select_priv = PAGE_FAULTS_MINOR;
set join_cache_level=default;
diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result
index 11bc380e6e6..6e59d8845a8 100644
--- a/mysql-test/main/join_outer.result
+++ b/mysql-test/main/join_outer.result
@@ -1790,8 +1790,11 @@ insert into t3 values (11, 100), (33, 301), (44, 402), (11, 102), (11, 101);
insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
flush status;
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
@@ -1800,7 +1803,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 10
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
@@ -1815,7 +1818,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 6
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
diff --git a/mysql-test/main/join_outer_innodb.result b/mysql-test/main/join_outer_innodb.result
index 6f3fb09329d..9ab8bde1236 100644
--- a/mysql-test/main/join_outer_innodb.result
+++ b/mysql-test/main/join_outer_innodb.result
@@ -440,18 +440,18 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
1 SIMPLE t8 eq_ref PRIMARY PRIMARY 1 test.t1.a4 1 Using index
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 1 test.t1.a7 1
-1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t1.a5 1
1 SIMPLE t12 eq_ref PRIMARY PRIMARY 4 test.t11.k3 1 Using where
1 SIMPLE l2 eq_ref PRIMARY PRIMARY 4 test.t11.k4 1 Using where
1 SIMPLE t13 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
+1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE l4 eq_ref PRIMARY PRIMARY 4 test.t13.m2 1 Using where; Using index
1 SIMPLE m2 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
-1 SIMPLE l3 eq_ref PRIMARY PRIMARY 4 test.m2.m2 1 Using where
+1 SIMPLE l3 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE t14 eq_ref PRIMARY PRIMARY 2 test.t1.a8 1 Using where
1 SIMPLE t15 eq_ref PRIMARY PRIMARY 2 test.t1.a9 1 Using where; Using index
1 SIMPLE t16 ref PRIMARY PRIMARY 2 test.t15.o1 1 Using where
-1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
explain select * from v1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a4,a6,a5,a7 NULL NULL NULL 3 Using where
@@ -462,18 +462,18 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where; Using index
1 SIMPLE t8 eq_ref PRIMARY PRIMARY 1 test.t1.a4 1 Using index
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 1 test.t1.a7 1
-1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t1.a5 1
1 SIMPLE t12 eq_ref PRIMARY PRIMARY 4 test.t11.k3 1 Using where
1 SIMPLE l2 eq_ref PRIMARY PRIMARY 4 test.t11.k4 1 Using where
1 SIMPLE t13 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
+1 SIMPLE t9 ref PRIMARY PRIMARY 1 test.t1.a4 1
1 SIMPLE l4 eq_ref PRIMARY PRIMARY 4 test.t13.m2 1 Using where; Using index
1 SIMPLE m2 ref PRIMARY,m3 PRIMARY 4 test.t1.a1 1 Using where; Using index
-1 SIMPLE l3 eq_ref PRIMARY PRIMARY 4 test.m2.m2 1 Using where
+1 SIMPLE l3 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (incremental, BNL join)
1 SIMPLE t14 eq_ref PRIMARY PRIMARY 2 test.t1.a8 1 Using where
1 SIMPLE t15 eq_ref PRIMARY PRIMARY 2 test.t1.a9 1 Using where; Using index
1 SIMPLE t16 ref PRIMARY PRIMARY 2 test.t15.o1 1 Using where
-1 SIMPLE t10 ALL PRIMARY NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
drop view v1;
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16;
#
diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result
index bca340ad2cc..0b8c9fa93a5 100644
--- a/mysql-test/main/join_outer_jcl6.result
+++ b/mysql-test/main/join_outer_jcl6.result
@@ -1801,8 +1801,11 @@ insert into t3 values (11, 100), (33, 301), (44, 402), (11, 102), (11, 101);
insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
flush status;
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
@@ -1811,7 +1814,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 10
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
@@ -1826,7 +1829,7 @@ sum(t3.b)
show status like "handler_read%";
Variable_name Value
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 6
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
diff --git a/mysql-test/main/kill.result b/mysql-test/main/kill.result
index dc1cb9252da..4775d111b79 100644
--- a/mysql-test/main/kill.result
+++ b/mysql-test/main/kill.result
@@ -324,7 +324,7 @@ connection blocker;
lock tables t1 read;
connection ddl;
# Let us mark locked table t1 as old
-flush tables;
+flush tables t1;
connection dml;
select * from t1;
connection default;
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index b6000ffced1..059d8d40b11 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -538,18 +538,18 @@ connection blocker;
lock tables t1 read;
connection ddl;
--echo # Let us mark locked table t1 as old
---send flush tables
+--send flush tables t1
connection dml;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables";
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t1";
--source include/wait_condition.inc
--send select * from t1
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
+ where state = "Waiting for table metadata lock" and
info = "select * from t1";
--source include/wait_condition.inc
--replace_result $ID2 ID2
diff --git a/mysql-test/main/limit_rows_examined.result b/mysql-test/main/limit_rows_examined.result
index 8458e063d97..71b99d066ff 100644
--- a/mysql-test/main/limit_rows_examined.result
+++ b/mysql-test/main/limit_rows_examined.result
@@ -49,10 +49,11 @@ explain
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1i index PRIMARY PRIMARY 2 NULL 4 Using index
-1 SIMPLE t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t2i eq_ref PRIMARY PRIMARY 2 test.t1i.c1 1 Using index
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
c1 c2
bb bb
+cc cc
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
set @@join_cache_level=6;
@@ -69,10 +70,11 @@ explain
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1i index PRIMARY PRIMARY 2 NULL 4 Using index
-1 SIMPLE t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 SIMPLE t2i eq_ref PRIMARY PRIMARY 2 test.t1i.c1 1 Using index
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
c1 c2
bb bb
+cc cc
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
Mix LIMIT ROWS EXAMINED with LIMIT
@@ -254,12 +256,13 @@ where c1 IN (select * from t2i where c2 > ' ')
LIMIT ROWS EXAMINED 6;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index
-1 PRIMARY t2i index PRIMARY PRIMARY 2 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t2i eq_ref PRIMARY PRIMARY 2 test.t1i.c1 1 Using index
select * from t1i
where c1 IN (select * from t2i where c2 > ' ')
LIMIT ROWS EXAMINED 6;
c1
bb
+cc
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
Subqueries with IN-TO-EXISTS
@@ -836,7 +839,7 @@ WHERE c = (SELECT MAX(b) FROM t2)
LIMIT ROWS EXAMINED 3;
(SELECT MAX(c) FROM t1, t2)
Warnings:
-Warning 1931 Query execution was interrupted. The query examined at least 10 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
+Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
drop table t1, t2;
MDEV-178: LIMIT ROWS EXAMINED: Assertion `0' failed in net_end_statement(THD*) on the
diff --git a/mysql-test/main/loaddata.result b/mysql-test/main/loaddata.result
index 98b8f2de4a5..4c5cee0aa25 100644
--- a/mysql-test/main/loaddata.result
+++ b/mysql-test/main/loaddata.result
@@ -45,10 +45,10 @@ load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated
Warnings:
Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
-Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
+Warning 1366 Incorrect integer value: 'error ' for column `test`.`t1`.`a` at row 3
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
Note 1265 Data truncated for column 'a' at row 4
-Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5
+Warning 1366 Incorrect integer value: 'wrong end ' for column `test`.`t1`.`a` at row 5
Warning 1262 Row 5 was truncated; it contained more data than there were input columns
select * from t1;
a b
@@ -64,7 +64,7 @@ Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
Note 1265 Data truncated for column 'a' at row 3
Warning 1366 Incorrect integer value: '
-' for column 'a' at row 4
+' for column `test`.`t1`.`a` at row 4
Warning 1261 Row 4 doesn't contain data for all columns
select * from t1;
a b
diff --git a/mysql-test/main/lock.result b/mysql-test/main/lock.result
index 339cfcaa441..6edb86bfa3f 100644
--- a/mysql-test/main/lock.result
+++ b/mysql-test/main/lock.result
@@ -457,6 +457,7 @@ connection default;
LOCK TABLE t1 WRITE;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
connection con2;
LOCK TABLE t2 WRITE;
@@ -499,7 +500,7 @@ connect con1,localhost,root,,test;
LOCK TABLE t2 WRITE;
SET lock_wait_timeout= 1;
FLUSH TABLES;
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+FLUSH TABLES t2;
UNLOCK TABLES;
disconnect con1;
connection default;
diff --git a/mysql-test/main/lock.test b/mysql-test/main/lock.test
index ff77b4991c0..8a59f4082b1 100644
--- a/mysql-test/main/lock.test
+++ b/mysql-test/main/lock.test
@@ -609,8 +609,8 @@ LOCK TABLE t1 READ;
--connect (con1,localhost,root,,test)
LOCK TABLE t2 WRITE;
SET lock_wait_timeout= 1;
---error ER_LOCK_WAIT_TIMEOUT
FLUSH TABLES;
+FLUSH TABLES t2;
# Cleanup
UNLOCK TABLES;
diff --git a/mysql-test/main/lock_multi.result b/mysql-test/main/lock_multi.result
index 52b4608fdd2..30cd63e60ed 100644
--- a/mysql-test/main/lock_multi.result
+++ b/mysql-test/main/lock_multi.result
@@ -118,17 +118,17 @@ LOCK TABLES columns_priv WRITE, db WRITE, user WRITE;
FLUSH TABLES;
connection reader;
USE mysql;
-SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
+SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1;
connection locker;
-OPTIMIZE TABLES columns_priv, db, user;
+OPTIMIZE TABLES columns_priv, db, global_priv;
Table Op Msg_type Msg_text
mysql.columns_priv optimize status OK
mysql.db optimize status OK
-mysql.user optimize status OK
+mysql.global_priv optimize status OK
UNLOCK TABLES;
connection reader;
-Select_priv
-N
+host
+localhost
USE test;
connection locker;
use test;
@@ -218,6 +218,7 @@ connection con2;
unlock tables;
connection con3;
a
+connection con4;
connection default;
disconnect con5;
disconnect con4;
@@ -247,6 +248,7 @@ flush table t2;
connection default;
unlock tables;
connection con1;
+connection con2;
#
# LOCK TABLES .. WRITE
#
@@ -299,7 +301,7 @@ connection default;
alter table t1 add column j int;
connect insert,localhost,root,,test,,;
connection insert;
-insert into t1 values (1,2);;
+insert into t1 values (1,2);
connection default;
unlock tables;
connection flush;
@@ -531,8 +533,9 @@ connect con3, localhost, root;
connection default;
LOCK TABLE t1 READ;
connection con3;
-# Sending:
FLUSH TABLES;
+# Sending:
+FLUSH TABLES t1;
connection con2;
SELECT * FROM t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
diff --git a/mysql-test/main/lock_multi.test b/mysql-test/main/lock_multi.test
index ce901126ce5..5cc7219b01d 100644
--- a/mysql-test/main/lock_multi.test
+++ b/mysql-test/main/lock_multi.test
@@ -191,18 +191,18 @@ connection reader;
USE mysql;
# Note: This must be a multi-table select, otherwise the deadlock will not occur
send
-SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
+SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1;
#
connection locker;
# Sleep a bit till the select of connection reader is in work and hangs
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
WHERE state = "Waiting for table metadata lock" AND info =
- "SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1";
+ "SELECT global_priv.host FROM global_priv, db WHERE global_priv.user = db.user LIMIT 1";
--source include/wait_condition.inc
# Make test case independent from earlier grants.
--replace_result "Table is already up to date" "OK"
-OPTIMIZE TABLES columns_priv, db, user;
+OPTIMIZE TABLES columns_priv, db, global_priv;
UNLOCK TABLES;
#
connection reader;
@@ -229,7 +229,7 @@ connection writer;
# Sleep a bit till the flush of connection locker is in work and hangs
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "FLUSH TABLES WITH READ LOCK";
--source include/wait_condition.inc
# This must not block.
@@ -261,7 +261,7 @@ connection writer;
# Sleep a bit till the flush of connection locker is in work and hangs
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "FLUSH TABLES WITH READ LOCK";
--source include/wait_condition.inc
--error ER_TABLE_NOT_LOCKED
@@ -298,10 +298,10 @@ DROP DATABASE mysqltest_1;
# When fixed: Reject dropping db because of the read lock.
connection con1;
# Wait a bit so that the session con2 is in state
-# "Waiting for global read lock"
+# "Waiting for backup lock"
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock"
+ where state = "Waiting for backup lock"
and info = "DROP DATABASE mysqltest_1";
--source include/wait_condition.inc
--error ER_CANT_UPDATE_WITH_READLOCK
@@ -377,7 +377,7 @@ send flush tables with read lock;
connection con5;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
--echo # global read lock is taken
@@ -386,14 +386,19 @@ send select * from t2 for update;
connection con5;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "select * from t2 for update";
--source include/wait_condition.inc
--echo # waiting for release of read lock
connection con4;
--echo # would hang and later cause a deadlock
-flush tables t2;
+--send flush tables t2
connection con1;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t2";
+--source include/wait_condition.inc
--echo # clean up
unlock tables;
connection con2;
@@ -401,6 +406,8 @@ connection con2;
unlock tables;
connection con3;
--reap
+connection con4;
+--reap
connection default;
disconnect con5;
disconnect con4;
@@ -432,16 +439,23 @@ send update t2 set a = 1;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "update t2 set a = 1";
--source include/wait_condition.inc
--echo # statement is waiting for release of read lock
connection con2;
-flush table t2;
+--send flush table t2
connection default;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "flush table t2";
+--source include/wait_condition.inc
unlock tables;
connection con1;
--reap
+connection con2;
+--reap
--echo #
--echo # LOCK TABLES .. WRITE
@@ -454,7 +468,7 @@ send lock tables t2 write;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "lock tables t2 write";
--source include/wait_condition.inc
--echo # statement is waiting for release of read lock
@@ -542,7 +556,7 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
alter table t1 add column j int;
@@ -550,14 +564,14 @@ connect (insert,localhost,root,,test,,);
connection insert;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "flush tables with read lock";
--source include/wait_condition.inc
---send insert into t1 values (1,2);
+--send insert into t1 values (1,2)
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for table metadata lock" and
info = "insert into t1 values (1,2)";
--source include/wait_condition.inc
unlock tables;
@@ -565,7 +579,7 @@ connection flush;
--reap
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock" and
+ where state = "Waiting for backup lock" and
info = "insert into t1 values (1,2)";
--source include/wait_condition.inc
select * from t1;
@@ -598,12 +612,12 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
flush tables;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
unlock tables;
connection flush;
@@ -664,12 +678,12 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
flush tables;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
drop table t1;
connection flush;
@@ -931,13 +945,19 @@ connection default;
LOCK TABLE t1 READ;
connection con3;
+
+# first test that flush tables doesn't block
+FLUSH TABLES;
+
+# Check the FLUSH TABLES t1 waits until table lock is released
+
--echo # Sending:
---send FLUSH TABLES
+--send FLUSH TABLES t1
connection con2;
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
- WHERE state = "Waiting for table flush" AND info = "FLUSH TABLES";
+ WHERE state = "Waiting for table metadata lock" AND info = "FLUSH TABLES t1";
--source include/wait_condition.inc
--error ER_LOCK_WAIT_TIMEOUT
SELECT * FROM t1;
diff --git a/mysql-test/main/lock_sync.result b/mysql-test/main/lock_sync.result
index 93182399958..bbdc1d43ba5 100644
--- a/mysql-test/main/lock_sync.result
+++ b/mysql-test/main/lock_sync.result
@@ -782,7 +782,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET DEBUG_SYNC= 'now SIGNAL dropped';
SET DEBUG_SYNC= 'now WAIT_FOR opened';
# Sending:
-FLUSH TABLES;
+FLUSH TABLES t1;
connection default;
# Waiting for FLUSH TABLES to be blocked.
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/lock_sync.test b/mysql-test/main/lock_sync.test
index af8435f7fbb..1a8cd7bdbd3 100644
--- a/mysql-test/main/lock_sync.test
+++ b/mysql-test/main/lock_sync.test
@@ -974,12 +974,12 @@ SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET DEBUG_SYNC= 'now SIGNAL dropped';
SET DEBUG_SYNC= 'now WAIT_FOR opened';
--echo # Sending:
---send FLUSH TABLES
+--send FLUSH TABLES t1
connection default;
--echo # Waiting for FLUSH TABLES to be blocked.
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state= 'Waiting for table flush' AND info= 'FLUSH TABLES';
+ WHERE state= 'Waiting for table metadata lock' AND info= 'FLUSH TABLES t1';
--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/log_tables_upgrade.result b/mysql-test/main/log_tables_upgrade.result
index df6ea72f3ca..8d7b08a11bd 100644
--- a/mysql-test/main/log_tables_upgrade.result
+++ b/mysql-test/main/log_tables_upgrade.result
@@ -19,6 +19,7 @@ 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
@@ -42,9 +43,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/lowercase_fs_off.result b/mysql-test/main/lowercase_fs_off.result
index e05fd50caeb..6ff8c1b7f93 100644
--- a/mysql-test/main/lowercase_fs_off.result
+++ b/mysql-test/main/lowercase_fs_off.result
@@ -94,6 +94,7 @@ 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
@@ -122,7 +123,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -136,6 +136,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/max_password_errors.result b/mysql-test/main/max_password_errors.result
new file mode 100644
index 00000000000..020761b4f2e
--- /dev/null
+++ b/mysql-test/main/max_password_errors.result
@@ -0,0 +1,45 @@
+set @old_max_password_errors=@@max_password_errors;
+set global max_password_errors=2;
+create user u identified by 'good_pass';
+connect(localhost,u,bas_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bas_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect(localhost,u,good_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, good_pass;
+ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
+FLUSH PRIVILEGES;
+connect con1, localhost, u, good_pass;
+disconnect con1;
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect con1, localhost, u, good_pass;
+disconnect con1;
+connect(localhost,u,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, u, bad_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+connect con1, localhost, u, good_pass;
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
+ERROR HY000: User is blocked because of too many credential errors; unblock with 'FLUSH PRIVILEGES'
+disconnect con1;
+connection default;
+FLUSH PRIVILEGES;
+connect(localhost,root,bas_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, root, bas_pass;
+ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
+connect(localhost,root,bad_pass,test,MASTER_PORT,MASTER_SOCKET);
+connect con1, localhost, root, bad_pass;
+ERROR 28000: Access denied for user 'root'@'localhost' (using password: YES)
+connect con1, localhost, u, good_pass;
+disconnect con1;
+connection default;
+DROP USER u;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/main/max_password_errors.test b/mysql-test/main/max_password_errors.test
new file mode 100644
index 00000000000..1debca0258d
--- /dev/null
+++ b/mysql-test/main/max_password_errors.test
@@ -0,0 +1,64 @@
+--source include/not_embedded.inc
+set @old_max_password_errors=@@max_password_errors;
+set global max_password_errors=2;
+create user u identified by 'good_pass';
+
+# Test that user is blocked after 'max_password_errors' bad passwords
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect(con1, localhost, u, bas_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, u, bad_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_USER_IS_BLOCKED;
+connect(con1, localhost, u, good_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_USER_IS_BLOCKED;
+connect(con1, localhost, u, bad_pass);
+
+
+# Test that FLUSH PRIVILEGES clears the error
+FLUSH PRIVILEGES;
+connect (con1, localhost, u, good_pass);
+disconnect con1;
+
+# Test that good login clears the error
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, u, bad_pass);
+connect (con1, localhost, u, good_pass);
+disconnect con1;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, u, bad_pass);
+connect (con1, localhost, u, good_pass);
+
+# Test the behavior of change_user
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+change_user u,bad_pass;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+change_user u,bad_pass;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_USER_IS_BLOCKED;
+change_user u,good_pass;
+disconnect con1;
+
+connection default;
+FLUSH PRIVILEGES;
+
+#Test that root@localhost is not blocked, with password errors
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect(con1, localhost, root, bas_pass);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_ERROR;
+connect (con1, localhost, root, bad_pass);
+connect (con1, localhost, u, good_pass);
+disconnect con1;
+connection default;
+DROP USER u;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors; \ No newline at end of file
diff --git a/mysql-test/main/mdev-504.result b/mysql-test/main/mdev-504.result
index 9b8b6795e0f..e34e57be6ed 100644
--- a/mysql-test/main/mdev-504.result
+++ b/mysql-test/main/mdev-504.result
@@ -1,3 +1,4 @@
+set @save_use_stat_tables=@@global.use_stat_tables;
SET GLOBAL net_write_timeout = 900;
CREATE TABLE A (
pk INTEGER AUTO_INCREMENT PRIMARY KEY,
@@ -20,5 +21,5 @@ connection default;
DROP TABLE A;
DROP PROCEDURE p_analyze;
DROP FUNCTION rnd3;
-SET GLOBAL use_stat_tables = DEFAULT;
+SET GLOBAL use_stat_tables = @save_use_stat_tables;
SET GLOBAL net_write_timeout = DEFAULT;
diff --git a/mysql-test/main/mdev-504.test b/mysql-test/main/mdev-504.test
index 551c21c37d0..277b5a038a0 100644
--- a/mysql-test/main/mdev-504.test
+++ b/mysql-test/main/mdev-504.test
@@ -1,6 +1,8 @@
--source include/not_valgrind.inc
--source include/no_protocol.inc
+set @save_use_stat_tables=@@global.use_stat_tables;
+
SET GLOBAL net_write_timeout = 900;
CREATE TABLE A (
@@ -76,5 +78,5 @@ while ($trial)
DROP TABLE A;
DROP PROCEDURE p_analyze;
DROP FUNCTION rnd3;
-SET GLOBAL use_stat_tables = DEFAULT;
+SET GLOBAL use_stat_tables = @save_use_stat_tables;
SET GLOBAL net_write_timeout = DEFAULT;
diff --git a/mysql-test/main/mdev13607.result b/mysql-test/main/mdev13607.result
index 0d573b06b93..43fc473c84d 100644
--- a/mysql-test/main/mdev13607.result
+++ b/mysql-test/main/mdev13607.result
@@ -14,8 +14,11 @@ CREATE TABLE t3 (id INT) ENGINE=InnoDB;
INSERT INTO t3 VALUES (1),(2);
ANALYZE TABLE t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain SELECT * FROM
(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1
diff --git a/mysql-test/main/mdl.result b/mysql-test/main/mdl.result
index d93bfd5c729..883f35674c0 100644
--- a/mysql-test/main/mdl.result
+++ b/mysql-test/main/mdl.result
@@ -6,17 +6,85 @@
# failed in MDL_context::upgrade_shared_lock
#
CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-MDL_INTENTION_EXCLUSIVE Global read lock
+MDL_BACKUP_TRANS_DML Backup lock
MDL_SHARED_NO_READ_WRITE Table metadata lock test t1
UNLOCK TABLES;
LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
-MDL_INTENTION_EXCLUSIVE Global read lock
+MDL_BACKUP_TRANS_DML Backup lock
MDL_SHARED_WRITE Table metadata lock test t1
MDL_SHARED_READ_ONLY Table metadata lock test t1
UNLOCK TABLES;
-DROP TABLE t1;
+LOCK TABLES t1 WRITE CONCURRENT, t3 WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_BACKUP_DML Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_NO_READ_WRITE Table metadata lock test t3
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+UNLOCK TABLES;
+LOCK TABLES t3 WRITE, t1 WRITE CONCURRENT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_BACKUP_DML Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+MDL_SHARED_NO_READ_WRITE Table metadata lock test t3
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+UNLOCK TABLES;
+LOCK TABLES t1 WRITE, mysql.user WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_SHARED_NO_READ_WRITE Table metadata lock mysql user
+MDL_SHARED_NO_READ_WRITE Table metadata lock test t1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock mysql
+MDL_SHARED_NO_READ_WRITE Table metadata lock mysql global_priv
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+UNLOCK TABLES;
+LOCK TABLES mysql.general_log WRITE;
+ERROR HY000: You can't use locks with log tables
+LOCK TABLES t1 WRITE,information_schema.tables READ;
+UNLOCK TABLES;
+DROP TABLE t1,t3;
+#
+# Check MDL locks taken for different kind of tables by open
+#
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
+connect locker,localhost,root,,;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+insert into t1 values (1);
+connection default;
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FTWRL2 Backup lock
+MDL_SHARED_WRITE Table metadata lock test t1
+unlock tables;
+connection locker;
+unlock tables;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+insert into t3 values (2);
+connection default;
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FTWRL2 Backup lock
+MDL_SHARED_WRITE Table metadata lock test t3
+unlock tables;
+connection locker;
+unlock tables;
+connection default;
+disconnect locker;
+DROP TABLE t1,t3;
diff --git a/mysql-test/main/mdl.test b/mysql-test/main/mdl.test
index b90c74a8f7f..23a862f5212 100644
--- a/mysql-test/main/mdl.test
+++ b/mysql-test/main/mdl.test
@@ -10,10 +10,72 @@
--echo #
CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
LOCK TABLES t1 AS t2 READ, t1 WRITE CONCURRENT;
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
UNLOCK TABLES;
-DROP TABLE t1;
+LOCK TABLES t1 WRITE CONCURRENT, t3 WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+UNLOCK TABLES;
+LOCK TABLES t3 WRITE, t1 WRITE CONCURRENT;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+UNLOCK TABLES;
+LOCK TABLES t1 WRITE, mysql.user WRITE;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+UNLOCK TABLES;
+--error ER_CANT_LOCK_LOG_TABLE
+LOCK TABLES mysql.general_log WRITE;
+# The following may work in embedded server
+--error 0,ER_DBACCESS_DENIED_ERROR
+LOCK TABLES t1 WRITE,information_schema.tables READ;
+UNLOCK TABLES;
+DROP TABLE t1,t3;
+
+--echo #
+--echo # Check MDL locks taken for different kind of tables by open
+--echo #
+
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+CREATE TABLE t3(a INT) ENGINE=myisam;
+connect (locker,localhost,root,,);
+connection default;
+
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+--send insert into t1 values (1)
+connection default;
+# Wait till above update gets blocked on a user lock.
+let $wait_condition=
+ select count(*) > 0 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+unlock tables;
+connection locker;
+--reap
+unlock tables;
+connection default;
+
+FLUSH TABLES WITH READ LOCK;
+connection locker;
+--send insert into t3 values (2)
+connection default;
+# Wait till above update gets blocked on a user lock.
+let $wait_condition=
+ select count(*) > 0 from information_schema.processlist
+ where state = "Waiting for backup lock";
+--source include/wait_condition.inc
+connection default;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+unlock tables;
+connection locker;
+--reap
+unlock tables;
+connection default;
+
+disconnect locker;
+DROP TABLE t1,t3;
diff --git a/mysql-test/main/mdl_sync.result b/mysql-test/main/mdl_sync.result
index 3880fc5ef91..5203fdddb2d 100644
--- a/mysql-test/main/mdl_sync.result
+++ b/mysql-test/main/mdl_sync.result
@@ -2146,10 +2146,11 @@ flush tables t1, t2 with read lock;
connection con1;
# Wait till FLUSH TABLES <list> WITH READ LOCK stops.
set debug_sync='now WAIT_FOR parked';
+flush tables;
# Start a statement which will flush all tables and thus
# invalidate table t1 open by FLUSH TABLES <list> WITH READ LOCK.
# Sending:
-flush tables;
+flush tables t1;
connection default;
# Wait till the above FLUSH TABLES blocks.
# Resume FLUSH TABLES <list> WITH READ LOCK, so it tries to open t2
@@ -2513,6 +2514,12 @@ connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
# Check that FLUSH must wait to get the GRL
# and let DROP PROCEDURE continue
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_DDL Backup lock
+MDL_EXCLUSIVE Stored procedure metadata lock test p1
+MDL_INTENTION_EXCLUSIVE Schema metadata lock test
+MDL_SHARED_WRITE Table metadata lock mysql proc
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
FLUSH TABLES WITH READ LOCK;
connection default;
@@ -2527,6 +2534,43 @@ connection con2;
UNLOCK TABLES;
connection default;
SET DEBUG_SYNC= 'RESET';
+#
+# UPDATE should wait for FTWRL with non transactional table second
+#
+create table t1 (a int) engine=myisam;
+create table t2 (a int) engine=innodb;
+insert into t1 values (1);
+insert into t2 values (1);
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+update t1,t2 set t1.a=2,t2.a=3;
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+connection default;
+# Reaping UPDATE
+connection con2;
+UNLOCK TABLES;
+connection default;
+SET DEBUG_SYNC= 'RESET';
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+update t2,t1 set t1.a=2,t2.a=3;
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+LOCK_MODE LOCK_TYPE TABLE_SCHEMA TABLE_NAME
+MDL_BACKUP_FTWRL2 Backup lock
+unlock tables;
+connection default;
+# Reaping UPDATE
+SET DEBUG_SYNC= 'RESET';
+drop table t1,t2;
disconnect con2;
#
# Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
@@ -2534,7 +2578,6 @@ disconnect con2;
#
# Supress warnings written to the log file
call mtr.add_suppression("Wait on a lock was aborted due to a pending exclusive lock");
-DROP TABLE IF EXISTS t1, t2;
connect con1,localhost,root;
connect con2,localhost,root;
connect con3,localhost,root;
@@ -3055,7 +3098,7 @@ disconnect con3;
#
CREATE TABLE t1(a INT) ENGINE=InnoDB;
SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
-SELECT * FROM t1;
+INSERT INTO t1 values (1);
connect con1,localhost,root,,;
SET debug_sync='now WAIT_FOR ready';
SET lock_wait_timeout=1;
@@ -3063,7 +3106,21 @@ FLUSH TABLES WITH READ LOCK;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET debug_sync='now SIGNAL go';
connection default;
+# After MDEV-5536, SELECT will not block FLUSH TABLES
+SET debug_sync='RESET';
+SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
+SELECT * FROM t1;
+connection con1;
+SET debug_sync='now WAIT_FOR ready';
+SET lock_wait_timeout=1;
+FLUSH TABLES WITH READ LOCK;
+SET debug_sync='now SIGNAL go';
+connection default;
a
+1
+connection con1;
+unlock tables;
+connection default;
SET debug_sync='RESET';
DROP TABLE t1;
disconnect con1;
diff --git a/mysql-test/main/mdl_sync.test b/mysql-test/main/mdl_sync.test
index fbecd6bf547..2a1e488ab44 100644
--- a/mysql-test/main/mdl_sync.test
+++ b/mysql-test/main/mdl_sync.test
@@ -2,6 +2,7 @@
# We need the Debug Sync Facility.
#
--source include/have_debug_sync.inc
+--source include/have_metadata_lock_info.inc
# We need InnoDB tables for some of the tests.
--source include/have_innodb.inc
@@ -2690,17 +2691,20 @@ connection con1;
--echo # Wait till FLUSH TABLES <list> WITH READ LOCK stops.
set debug_sync='now WAIT_FOR parked';
+# Simple flush tables should not block
+flush tables;
+
--echo # Start a statement which will flush all tables and thus
--echo # invalidate table t1 open by FLUSH TABLES <list> WITH READ LOCK.
--echo # Sending:
-send flush tables;
+send flush tables t1;
connection default;
--echo # Wait till the above FLUSH TABLES blocks.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush" and
- info = "flush tables";
+ where state = "Waiting for table metadata lock" and
+ info = "flush tables t1";
--source include/wait_condition.inc
--echo # Resume FLUSH TABLES <list> WITH READ LOCK, so it tries to open t2
@@ -3245,6 +3249,7 @@ connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
--echo # Check that FLUSH must wait to get the GRL
--echo # and let DROP PROCEDURE continue
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
--send FLUSH TABLES WITH READ LOCK
@@ -3261,12 +3266,63 @@ connection con2;
--echo # Reaping FTWRL.
--reap
UNLOCK TABLES;
+connection default;
+SET DEBUG_SYNC= 'RESET';
+
+--echo #
+--echo # UPDATE should wait for FTWRL with non transactional table second
+--echo #
+
+create table t1 (a int) engine=myisam;
+create table t2 (a int) engine=innodb;
+insert into t1 values (1);
+insert into t2 values (1);
+
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+--send update t1,t2 set t1.a=2,t2.a=3
+
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+
+connection default;
+--echo # Reaping UPDATE
+--reap
+
+connection con2;
+UNLOCK TABLES;
connection default;
SET DEBUG_SYNC= 'RESET';
-disconnect con2;
+# This will cause a wait as we first get lock for innodb table t2 but FTWRL
+# will cause lock for t1 to wait
+
+SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
+--send update t2,t1 set t1.a=2,t2.a=3
+
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'now SIGNAL grlwait';
+SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
+FLUSH TABLES WITH READ LOCK;
+let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info;
+--source include/wait_condition.inc
+SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
+
+unlock tables;
+
+connection default;
+--echo # Reaping UPDATE
+--reap
+SET DEBUG_SYNC= 'RESET';
+drop table t1,t2;
+disconnect con2;
--echo #
--echo # Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
@@ -3275,9 +3331,6 @@ disconnect con2;
--echo # Supress warnings written to the log file
call mtr.add_suppression("Wait on a lock was aborted due to a pending exclusive lock");
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
connect (con1,localhost,root);
connect (con2,localhost,root);
@@ -3966,7 +4019,7 @@ connection con2;
connection default;
let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state='Waiting for global read lock'
+ WHERE state='Waiting for backup lock'
AND info='CREATE TABLE db1.t2(a INT)';
--source include/wait_condition.inc
UNLOCK TABLES;
@@ -3984,7 +4037,7 @@ connection con2;
connection default;
let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state='Waiting for global read lock'
+ WHERE state='Waiting for backup lock'
AND info='ALTER DATABASE db1 DEFAULT CHARACTER SET utf8';
--source include/wait_condition.inc
UNLOCK TABLES;
@@ -4079,9 +4132,10 @@ disconnect con3;
--echo # MDEV-12620 - set lock_wait_timeout = 1;flush tables with read lock;
--echo # lock not released after timeout
--echo #
+
CREATE TABLE t1(a INT) ENGINE=InnoDB;
SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
-send SELECT * FROM t1;
+send INSERT INTO t1 values (1);
connect (con1,localhost,root,,);
SET debug_sync='now WAIT_FOR ready';
@@ -4093,12 +4147,31 @@ SET debug_sync='now SIGNAL go';
connection default;
reap;
+
+--echo # After MDEV-5536, SELECT will not block FLUSH TABLES
+
+SET debug_sync='RESET';
+SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
+send SELECT * FROM t1;
+
+connection con1;
+SET debug_sync='now WAIT_FOR ready';
+# lock_wait_timeout should be 0 in 10.3, so that we don't have to wait at all
+SET lock_wait_timeout=1;
+FLUSH TABLES WITH READ LOCK;
+SET debug_sync='now SIGNAL go';
+
+connection default;
+reap;
+connection con1;
+unlock tables;
+connection default;
+
SET debug_sync='RESET';
DROP TABLE t1;
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.
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/merge.result b/mysql-test/main/merge.result
index b3cc731a6a9..7891ffa1723 100644
--- a/mysql-test/main/merge.result
+++ b/mysql-test/main/merge.result
@@ -2117,6 +2117,7 @@ CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES(0),(1),(2),(3),(4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE m1(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1';
@@ -3818,11 +3819,15 @@ CREATE TABLE tmerge (f1 INT) ENGINE=MERGE UNION=(t1);
PREPARE stmt FROM "ANALYZE TABLE tmerge, t1";
EXECUTE stmt;
Table Op Msg_type Msg_text
+test.tmerge analyze status Engine-independent statistics collected
test.tmerge analyze note The storage engine for the table doesn't support analyze
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
EXECUTE stmt;
Table Op Msg_type Msg_text
+test.tmerge analyze status Engine-independent statistics collected
test.tmerge analyze note The storage engine for the table doesn't support analyze
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
DEALLOCATE PREPARE stmt;
DROP TABLE t1, tmerge;
diff --git a/mysql-test/main/mix2_myisam.result b/mysql-test/main/mix2_myisam.result
index 34764466d2a..5acec2616fa 100644
--- a/mysql-test/main/mix2_myisam.result
+++ b/mysql-test/main/mix2_myisam.result
@@ -211,6 +211,7 @@ create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result
index 9f9af8f79f8..d2a33619900 100644
--- a/mysql-test/main/multi_update.result
+++ b/mysql-test/main/multi_update.result
@@ -998,8 +998,8 @@ a b c a b c
set optimizer_switch='firstmatch=off';
explain update t1, t2 set t2.c=1 where t1.a=t2.a and t1.b in (select b from t3 where t3.c< t2.c) order by t2.c, t1.c limit 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 PRIMARY t1 ALL a NULL NULL NULL 10 Using where
+1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary; Using filesort
+1 PRIMARY t1 ref a a 5 test.t2.a 1
1 PRIMARY t3 ALL NULL NULL NULL NULL 10 Using where; Start temporary; End temporary
update t1, t2 set t2.c=1 where t1.a=t2.a and t1.b in (select b from t3 where t3.c<=t2.c) order by t2.c, t1.c limit 5;
select * from t2;
diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result
index 498536c1862..b4ad9121ea6 100644
--- a/mysql-test/main/myisam.result
+++ b/mysql-test/main/myisam.result
@@ -676,6 +676,7 @@ insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -696,6 +697,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -707,7 +709,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t1 1 a 1 a A 5 NULL NULL YES BTREE
+t1 1 a 1 a A 10 NULL NULL YES BTREE
set myisam_stats_method=DEFAULT;
show variables like 'myisam_stats_method';
Variable_name Value
@@ -716,6 +718,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -743,6 +746,7 @@ insert into t1 values ('bce','def1', 'yuu', NULL);
insert into t1 values ('bce','def2', NULL, 'quux');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -753,6 +757,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -1801,6 +1806,7 @@ create table t1 (a int, key(a));
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/main/myisam_explain_non_select_all.result b/mysql-test/main/myisam_explain_non_select_all.result
index 939d6c417eb..bfc8370a218 100644
--- a/mysql-test/main/myisam_explain_non_select_all.result
+++ b/mysql-test/main/myisam_explain_non_select_all.result
@@ -28,10 +28,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
@@ -58,6 +60,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 10;
@@ -67,14 +70,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 3
+Handler_read_key 2
Handler_read_rnd_next 4
DROP TABLE t1;
@@ -97,6 +103,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 1;
@@ -106,14 +113,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 2
Handler_read_rnd_next 4
DROP TABLE t1;
@@ -150,10 +160,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -196,10 +208,12 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` where `test`.`t11`.`a` = 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -242,11 +256,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -290,10 +305,12 @@ Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`b` = `test`.`t1`.`a` and `test`.`t1`.`a` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -340,11 +357,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join (`test`.`t2`) join `test`.`t2` where `test`.`t2`.`b` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 12
# Status of testing query execution:
Variable_name Value
@@ -388,10 +406,12 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -438,11 +458,13 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t11`.`a` AS `a`,1 AS `1` from `test`.`t1` `t11`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
@@ -486,10 +508,12 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` `t11` join `test`.`t2` where `test`.`t11`.`a` > 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -516,6 +540,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > 1 LIMIT 1;
@@ -525,14 +550,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1 limit 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 2
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 2
Handler_read_rnd_next 2
DROP TABLE t1;
@@ -555,6 +583,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 0;
@@ -564,12 +593,15 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
DROP TABLE t1;
#13
@@ -591,6 +623,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 0;
@@ -600,12 +633,15 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
DROP TABLE t1;
#14
@@ -627,6 +663,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range a a 5 NULL 1 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 5
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a = 3;
@@ -636,16 +673,16 @@ Warnings:
Note 1003 select 3 AS `a`,3 AS `b` from `test`.`t1` where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
# Status of testing query execution:
Variable_name Value
Handler_delete 1
-Handler_read_key 1
+Handler_read_key 6
DROP TABLE t1;
#15
@@ -667,6 +704,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range a a 5 NULL 1 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 5
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 3;
@@ -676,14 +714,15 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` < 3
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 5
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
# Status of testing query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 6
DROP TABLE t1;
#16
@@ -704,6 +743,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
@@ -713,14 +753,17 @@ Warnings:
Note 1003 select NULL AS `a` from `test`.`t1` where 0 order by NULL
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 1
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 3
INSERT INTO t1 VALUES (1), (2), (3), (-1), (-2), (-3);
#
@@ -739,6 +782,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
@@ -748,16 +792,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 0 order by `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 3
# Status of testing query execution:
Variable_name Value
Handler_delete 3
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 3
DROP TABLE t1;
@@ -780,6 +825,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE (@a:= a) ORDER BY a LIMIT 1;
@@ -789,15 +835,18 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where @a:=`test`.`t1`.`a` order by `test`.`t1`.`a` limit 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 3
# Status of testing query execution:
Variable_name Value
Handler_delete 1
Handler_read_first 1
+Handler_read_key 3
DROP TABLE t1;
#18
@@ -820,6 +869,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 7
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 ORDER BY a ASC, b ASC LIMIT 1;
@@ -829,10 +879,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` order by `test`.`t1`.`a`,`test`.`t1`.`b` limit 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 11
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -840,6 +892,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 7
Handler_read_rnd 1
Handler_read_rnd_next 11
Sort_rows 10
@@ -873,6 +926,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.b2,test.t1.b1 1 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 13
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1,t2,t3 WHERE a1=a2 AND b2=a3 AND b1=b3;
@@ -884,17 +938,18 @@ Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`b1` AS `b1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b2` AS `b2`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t2`.`a2` = `test`.`t1`.`a1` and `test`.`t3`.`a3` = `test`.`t2`.`b2` and `test`.`t3`.`b3` = `test`.`t1`.`b1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 13
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 6
+Handler_read_key 19
Handler_read_next 3
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 8
-Handler_read_key 6
+Handler_read_key 19
Handler_read_next 3
Handler_read_rnd 5
Handler_read_rnd_next 4
@@ -934,11 +989,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
@@ -970,6 +1026,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2);
@@ -980,15 +1037,17 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`>(<in_optimizer>(`test`.`t1`.`a1`,<exists>(/* select#2 */ select `test`.`t2`.`a2` from `test`.`t2` where `test`.`t2`.`a2` > 2 and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`a2`)))
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 5
+Handler_read_key 9
Handler_read_rnd_next 30
# Status of testing query execution:
Variable_name Value
Handler_delete 3
+Handler_read_key 4
Handler_read_rnd_next 30
SET @@optimizer_switch= @save_optimizer_switch;
@@ -1012,6 +1071,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a1 IN (SELECT a2 FROM t2 WHERE a2 > 2);
@@ -1022,14 +1082,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1` from `test`.`t1` semi join (`test`.`t2`) where `test`.`t2`.`a2` > 2 and `test`.`t1`.`a1` = `test`.`t2`.`a2`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 12
# Status of testing query execution:
Variable_name Value
Handler_delete 3
+Handler_read_key 4
Handler_read_rnd_next 30
DROP TABLE t1, t2;
@@ -1061,10 +1124,12 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`j` AS `j` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
@@ -1091,6 +1156,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL 5 NULL Deleting all rows
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -1100,13 +1166,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`j` AS `j` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
+Handler_read_key 3
DROP TABLE t1;
#24
@@ -1133,6 +1202,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1142,16 +1212,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
DROP TABLE t1, t2;
@@ -1175,6 +1248,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -1184,13 +1258,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 4
Handler_write 3
@@ -1215,6 +1292,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -1224,13 +1302,16 @@ Warnings:
Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 4
Handler_write 3
@@ -1251,8 +1332,10 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_write 1
DROP TABLE t1;
@@ -1272,8 +1355,10 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_write 1
DROP TABLE t1;
@@ -1298,6 +1383,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1307,16 +1393,17 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
DROP TABLE t1;
@@ -1341,6 +1428,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1350,10 +1438,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
@@ -1361,6 +1451,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 5
+Handler_read_key 4
Handler_read_rnd 5
Handler_read_rnd_next 27
Sort_rows 8
@@ -1390,6 +1481,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1399,10 +1491,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -1410,6 +1504,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_rows 1
@@ -1440,6 +1535,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1449,16 +1545,19 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
DROP TABLE t1, t2;
@@ -1485,6 +1584,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1494,10 +1594,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -1505,6 +1607,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_rows 1
@@ -1535,6 +1638,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -1544,10 +1648,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -1556,6 +1662,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 1
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_rows 1
@@ -1586,6 +1693,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
@@ -1595,11 +1703,12 @@ Warnings:
Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`key1` AS `key1`,`test`.`t2`.`key2` AS `key2` from `test`.`t2` where `test`.`t2`.`key1` < 13 or `test`.`t2`.`key2` < 14 order by `test`.`t2`.`key1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 4
Sort_range 1
@@ -1607,7 +1716,7 @@ Sort_rows 4
# Status of testing query execution:
Variable_name Value
Handler_delete 4
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 8
Sort_range 1
@@ -1637,6 +1746,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
@@ -1646,16 +1756,17 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
DROP TABLE t1, t2;
@@ -1682,6 +1793,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5;
@@ -1691,10 +1803,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a`,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
@@ -1702,6 +1816,7 @@ Sort_scan 1
# Status of testing query execution:
Variable_name Value
Handler_delete 5
+Handler_read_key 6
Handler_read_rnd 5
Handler_read_rnd_next 27
Sort_rows 26
@@ -1732,6 +1847,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 6 NULL 5 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5;
@@ -1741,15 +1857,18 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a` desc,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
Handler_delete 5
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
@@ -1786,11 +1905,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
@@ -1832,10 +1952,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
@@ -1882,10 +2004,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -1933,11 +2057,13 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 8
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
@@ -1979,10 +2105,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 1
@@ -2029,10 +2157,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 8
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -2080,11 +2210,12 @@ Warnings:
Note 1003 select `test`.`t2`.`i` AS `i`,`test`.`t2`.`key1` AS `key1`,`test`.`t2`.`key2` AS `key2` from `test`.`t2` where `test`.`t2`.`key1` < 13 or `test`.`t2`.`key2` < 14 order by `test`.`t2`.`key1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 8
Handler_read_next 7
Handler_read_rnd 4
Sort_range 1
@@ -2131,11 +2262,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 5
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
@@ -2177,10 +2309,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a`,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
Sort_rows 5
@@ -2228,10 +2362,12 @@ Warnings:
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` order by `test`.`t2`.`a` desc,`test`.`t2`.`b` desc limit 5
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
# Status of testing query execution:
@@ -2276,11 +2412,12 @@ Warnings:
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1_idx` AS `c1_idx`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where `test`.`t1`.`c1_idx` = 'y' order by `test`.`t1`.`pk` desc limit 2
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Sort_priority_queue_sorts 1
Sort_range 1
@@ -2311,6 +2448,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2;
@@ -2320,11 +2458,12 @@ Warnings:
Note 1003 select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`c1_idx` AS `c1_idx`,`test`.`t1`.`c2` AS `c2` from `test`.`t1` where `test`.`t1`.`c1_idx` = 'y' order by `test`.`t1`.`pk` desc limit 2
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Sort_priority_queue_sorts 1
Sort_range 1
@@ -2332,7 +2471,7 @@ Sort_rows 2
# Status of testing query execution:
Variable_name Value
Handler_delete 2
-Handler_read_key 1
+Handler_read_key 7
Handler_read_next 2
Handler_read_rnd 2
Sort_range 1
@@ -2367,11 +2506,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 34
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 1
+Handler_read_key 4
Handler_read_next 2
# Status of testing query execution:
Variable_name Value
@@ -2414,11 +2554,13 @@ Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 1
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
@@ -2453,11 +2595,13 @@ Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` AS `c2`,`test`.`t1`.`c3` AS `c3`,NULL AS `c1`,NULL AS `c2` from `test`.`t1` where `test`.`t1`.`c3` = 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 1
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 7
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
@@ -2501,11 +2645,12 @@ Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select <expr_cache><`test`.`t1`.`f1`>((/* select#2 */ select max(`test`.`t2`.`f4`) from `test`.`t2` where `test`.`t2`.`f3` = `test`.`t1`.`f1`)) AS `(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1)` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 7
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 2
+Handler_read_key 9
Handler_read_rnd_next 9
# Status of testing query execution:
Variable_name Value
@@ -2568,10 +2713,12 @@ Warnings:
Note 1003 select `test`.`t11`.`a` AS `a`,`test`.`t12`.`a` AS `b` from `test`.`t1` `t11` join `test`.`t1` `t12` where `test`.`t11`.`a` > 0
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
@@ -2610,10 +2757,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t11`.`a` AS `a`,`test`.`t12`.`a` AS `b` from `test`.`t1` join `test`.`t1` `t11` join `test`.`t1` `t12` where `test`.`t11`.`a` = `test`.`t1`.`a`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 9
# Status of testing query execution:
Variable_name Value
@@ -2644,6 +2793,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM v1 WHERE a < 4;
@@ -2653,16 +2803,19 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 4
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 3
Handler_read_next 3
# Status of testing query execution:
Variable_name Value
Handler_delete 3
Handler_read_first 1
+Handler_read_key 3
Handler_read_next 3
DROP TABLE t1;
@@ -2691,6 +2844,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2, v1 WHERE t2.x = v1.a;
@@ -2701,16 +2855,17 @@ Warnings:
Note 1003 select `test`.`t2`.`x` AS `x`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` + 1 AS `c` from `test`.`t2` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`x`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
Handler_delete 4
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd 4
Handler_read_rnd_next 5
@@ -2740,6 +2895,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.x 1 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2, v1 WHERE t2.x = v1.a;
@@ -2750,16 +2906,17 @@ Warnings:
Note 1003 select `test`.`t2`.`x` AS `x`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` + 1 AS `c` from `test`.`t2` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`x`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 6
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
Handler_delete 4
-Handler_read_key 4
+Handler_read_key 10
Handler_read_rnd 4
Handler_read_rnd_next 5
@@ -2782,6 +2939,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 INSERT t1 ALL NULL NULL NULL NULL NULL 100.00 NULL
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT NULL;
@@ -2795,6 +2953,7 @@ Variable_name Value
Variable_name Value
# Status of testing query execution:
Variable_name Value
+Handler_read_key 2
Handler_write 1
DROP TABLE t1;
@@ -2820,6 +2979,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 Const row not found
# Status of EXPLAIN EXTENDED query
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -2830,14 +2990,17 @@ Warnings:
Note 1003 select NULL AS `a` from `test`.`t1`
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 2
Handler_read_rnd_next 1
# Status of testing query execution:
Variable_name Value
+Handler_read_key 4
Handler_read_rnd_next 1
DROP TABLE t1, t2;
@@ -2885,11 +3048,12 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` semi join ((/* select#3 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -2940,11 +3104,12 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join ((/* select#3 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) join `test`.`t2` where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -2996,11 +3161,12 @@ Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` semi join ((/* select#4 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`b` limit 2,2) `x`) join `test`.`t2` where 1
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 4
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
-Handler_read_key 3
+Handler_read_key 7
Handler_read_rnd_next 10
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -3068,11 +3234,13 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `t1` from `test`.`t1` where `test`.`t1`.`a` > 10
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
Handler_read_first 1
+Handler_read_key 3
Handler_read_next 5
# Status of testing query execution:
Variable_name Value
@@ -3104,10 +3272,12 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `t1` from `test`.`t1` where `test`.`t1`.`a` > 10 order by `test`.`t1`.`a` + 20
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
Variable_name Value
+Handler_read_key 3
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
# Status of "equivalent" SELECT query execution:
Variable_name Value
+Handler_read_key 3
Handler_read_rnd_next 6
Sort_scan 1
# Status of testing query execution:
diff --git a/mysql-test/main/myisam_icp.result b/mysql-test/main/myisam_icp.result
index b9b4926455c..804a039a35c 100644
--- a/mysql-test/main/myisam_icp.result
+++ b/mysql-test/main/myisam_icp.result
@@ -857,7 +857,7 @@ DROP TABLE t1;
create table t1 (a int,b char(5),primary key (a), key (b(1)));
insert ignore into t1 values ('a','b');
Warnings:
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`a` at row 1
select 1 from t1 where a and b >= 'aa';
1
drop table t1;
diff --git a/mysql-test/main/mysql_install_db_win.result b/mysql-test/main/mysql_install_db_win.result
new file mode 100644
index 00000000000..63c922a9184
--- /dev/null
+++ b/mysql-test/main/mysql_install_db_win.result
@@ -0,0 +1,13 @@
+Running bootstrap
+Removing default user
+Allowing remote access for user root
+Setting root password
+Creating my.ini file
+Creation of the database was successful
+# Kill the server
+connect root,localhost,root,foo;
+SELECT @@datadir;
+@@datadir
+DATADIR/
+# Kill the server
+connection default;
diff --git a/mysql-test/main/mysql_install_db_win.test b/mysql-test/main/mysql_install_db_win.test
new file mode 100644
index 00000000000..7bf62903219
--- /dev/null
+++ b/mysql-test/main/mysql_install_db_win.test
@@ -0,0 +1,24 @@
+--source include/windows.inc
+
+# Create database in tmp directory using mysql_install_db.exe,
+# and start server from this directory.
+let $ddir= $MYSQLTEST_VARDIR/tmp/ddir;
+exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R;
+
+--source include/kill_mysqld.inc
+let $restart_parameters=--datadir=$ddir --loose-innodb;
+--source include/start_mysqld.inc
+
+connect root,localhost,root,foo;
+# Smoke test - check that we're actually using datadir
+# we've created (i.e restart_parameters worked)
+--replace_result $ddir DATADIR
+SELECT @@datadir;
+
+# restart in the original datadir again
+--source include/kill_mysqld.inc
+rmdir $ddir;
+let $restart_parameters=;
+connection default;
+--source include/start_mysqld.inc
+
diff --git a/mysql-test/main/mysql_upgrade-6984.result b/mysql-test/main/mysql_upgrade-6984.result
index a7b5bcb86bf..87f3c1a5359 100644
--- a/mysql-test/main/mysql_upgrade-6984.result
+++ b/mysql-test/main/mysql_upgrade-6984.result
@@ -1,4 +1,4 @@
-update mysql.user set password=password("foo") where user='root';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo'));
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
@@ -7,6 +7,7 @@ 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
@@ -35,7 +36,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -49,6 +49,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -62,6 +63,6 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
connect con1,localhost,root,foo,,,;
-update mysql.user set password='' where user='root';
+update mysql.global_priv set priv=json_remove(priv, '$.plugin', '$.authentication_string');
flush privileges;
set global event_scheduler=OFF;
diff --git a/mysql-test/main/mysql_upgrade-6984.test b/mysql-test/main/mysql_upgrade-6984.test
index 9bbfbeb3f87..a036b7a08a0 100644
--- a/mysql-test/main/mysql_upgrade-6984.test
+++ b/mysql-test/main/mysql_upgrade-6984.test
@@ -11,13 +11,13 @@
# In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES
#
-update mysql.user set password=password("foo") where user='root';
+update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo'));
--exec $MYSQL_UPGRADE
connect(con1,localhost,root,foo,,,);
-update mysql.user set password='' where user='root';
+update mysql.global_priv set priv=json_remove(priv, '$.plugin', '$.authentication_string');
flush privileges;
# Load event table
set global event_scheduler=OFF;
diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result
index 54146787123..a99895f53d7 100644
--- a/mysql-test/main/mysql_upgrade.result
+++ b/mysql-test/main/mysql_upgrade.result
@@ -8,6 +8,7 @@ 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
@@ -30,9 +31,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -46,7 +47,7 @@ test
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
Run it again - should say already completed
-This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
+This installation of MariaDB is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
Force should run it regardless of whether it has been run before
Phase 1/7: Checking and upgrading mysql database
Processing databases
@@ -56,6 +57,7 @@ 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
@@ -78,9 +80,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -104,6 +106,7 @@ 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
@@ -126,9 +129,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -157,6 +160,7 @@ 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
@@ -179,9 +183,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -211,6 +215,7 @@ 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
@@ -233,9 +238,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -268,6 +273,7 @@ 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
@@ -290,9 +296,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -320,6 +326,7 @@ 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
@@ -342,7 +349,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables'
@@ -364,6 +370,7 @@ 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
@@ -386,9 +393,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -429,6 +436,7 @@ 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
@@ -451,9 +459,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -511,6 +519,7 @@ 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
@@ -533,9 +542,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
@@ -566,7 +575,7 @@ Start of 10.3 tests
# Ensure that mysql_upgrade correctly sets truncate_versioning_priv
# on upgrade from 10.2
#
-flush privileges;
+drop view mysql.user_bak;
CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
@@ -580,3 +589,5 @@ GRANT USAGE ON *.* TO 'user3'@'%'
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
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;
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index 0171fe6c7ba..d4a3d864c21 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -227,7 +227,8 @@ SET GLOBAL enforce_storage_engine=NULL;
--echo # on upgrade from 10.2
--echo #
-flush privileges;
+--source include/switch_to_mysql_user.inc
+drop view mysql.user_bak;
CREATE USER 'user3'@'%';
GRANT USAGE ON *.* TO 'user3'@'%';
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
@@ -241,3 +242,5 @@ flush privileges;
SHOW GRANTS FOR 'user3'@'%';
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;
diff --git a/mysql-test/main/mysql_upgrade_no_innodb.result b/mysql-test/main/mysql_upgrade_no_innodb.result
index 90e96800bff..35b55bb45e0 100644
--- a/mysql-test/main/mysql_upgrade_no_innodb.result
+++ b/mysql-test/main/mysql_upgrade_no_innodb.result
@@ -7,6 +7,7 @@ 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
@@ -35,7 +36,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
diff --git a/mysql-test/main/mysql_upgrade_noengine.result b/mysql-test/main/mysql_upgrade_noengine.result
index 5dfe8aeb289..79ad04e1849 100644
--- a/mysql-test/main/mysql_upgrade_noengine.result
+++ b/mysql-test/main/mysql_upgrade_noengine.result
@@ -1,3 +1,4 @@
+drop view mysql.user_bak;
install soname 'ha_blackhole';
install soname 'ha_archive';
create table t1 (a int) engine=blackhole;
@@ -61,6 +62,7 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
@@ -140,6 +142,9 @@ Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time;
Phase 1/7: Checking and upgrading mysql database
Processing databases
@@ -149,6 +154,7 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
@@ -228,6 +234,9 @@ Warnings:
Level Warning
Code 1286
Message Unknown storage engine 'ARCHIVE'
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+drop view mysql.user_bak;
alter table mysql.user drop column default_role, drop column max_statement_time;
Phase 1/7: Checking and upgrading mysql database
Processing databases
@@ -237,6 +246,7 @@ mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
+mysql.global_priv_bak OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
@@ -303,3 +313,5 @@ table_comment
drop table t1, t2;
uninstall plugin blackhole;
uninstall plugin archive;
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
diff --git a/mysql-test/main/mysql_upgrade_noengine.test b/mysql-test/main/mysql_upgrade_noengine.test
index 1d65e7ffa1c..e3c3e718591 100644
--- a/mysql-test/main/mysql_upgrade_noengine.test
+++ b/mysql-test/main/mysql_upgrade_noengine.test
@@ -11,6 +11,9 @@ if (!$HA_ARCHIVE_SO) {
skip Need Archive plugin;
}
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
let $datadir= `select @@datadir`;
install soname 'ha_blackhole';
@@ -33,6 +36,11 @@ exec $MYSQL_UPGRADE 2>&1;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
# pretend it's an upgrade from 10.0
alter table mysql.user drop column default_role, drop column max_statement_time;
@@ -47,6 +55,11 @@ exec $MYSQL_UPGRADE 2>&1;
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
alter table mysql.user drop column default_role, drop column max_statement_time;
remove_file $datadir/mysql_upgrade_info;
@@ -60,3 +73,6 @@ drop table t1, t2;
remove_file $datadir/mysql_upgrade_info;
uninstall plugin blackhole;
uninstall plugin archive;
+
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
diff --git a/mysql-test/main/mysql_upgrade_ssl.result b/mysql-test/main/mysql_upgrade_ssl.result
index 6c6d0859016..ff911e9f54b 100644
--- a/mysql-test/main/mysql_upgrade_ssl.result
+++ b/mysql-test/main/mysql_upgrade_ssl.result
@@ -9,6 +9,7 @@ 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
@@ -31,9 +32,9 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
diff --git a/mysql-test/main/mysql_upgrade_view.result b/mysql-test/main/mysql_upgrade_view.result
index 3d885c569bb..d22298c6ed0 100644
--- a/mysql-test/main/mysql_upgrade_view.result
+++ b/mysql-test/main/mysql_upgrade_view.result
@@ -71,6 +71,7 @@ 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
@@ -99,7 +100,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -113,6 +113,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
+mysql.user OK
test.v1 OK
test.v1badcheck OK
test.v2 OK
@@ -210,7 +211,7 @@ v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
show create view v4;
View Create View character_set_client collation_connection
v4 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
-MySQL upgrade detected
+MariaDB upgrade detected
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
@@ -220,6 +221,7 @@ mysql.db OK
mysql.ev_bk OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
@@ -248,7 +250,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -262,6 +263,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql
+mysql.user OK
test.v1 OK
test.v2 OK
test.v3 OK
@@ -334,7 +336,7 @@ drop view v1,v2,v3,v4;
rename table mysql.event to mysql.ev_bk;
flush tables;
The --upgrade-system-tables option was used, user tables won't be touched.
-MySQL upgrade detected
+MariaDB upgrade detected
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
@@ -344,6 +346,7 @@ mysql.db OK
mysql.ev_bk OK
mysql.event OK
mysql.func OK
+mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
@@ -372,7 +375,6 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
Error : Unknown storage engine 'InnoDB'
error : Corrupt
-mysql.user OK
Repairing tables
mysql.innodb_index_stats
@@ -386,6 +388,7 @@ Error : Unknown storage engine 'InnoDB'
error : Corrupt
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views from mysql
+mysql.user OK
test.v1 OK
test.v2 OK
test.v3 OK
diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result
index 705683322f8..8cf52f5b826 100644
--- a/mysql-test/main/mysqlbinlog_row_compressed.result
+++ b/mysql-test/main/mysqlbinlog_row_compressed.result
@@ -61,7 +61,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 899
-#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -90,7 +90,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1214
-#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@@ -119,7 +119,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1530
-#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@@ -148,7 +148,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1842
-#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@@ -177,7 +177,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2134
-#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F
+#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 33 flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -239,7 +239,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2462
-#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 31 flags: STMT_END_F
+#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 33 flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -320,7 +320,7 @@ BEGIN
#Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2769
-#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -382,7 +382,7 @@ BEGIN
#Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3069
-#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F
+#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 33 flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result
index a030f202f45..680fd8196a8 100644
--- a/mysql-test/main/mysqlbinlog_row_minimal.result
+++ b/mysql-test/main/mysqlbinlog_row_minimal.result
@@ -59,7 +59,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
#<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 946
-#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -88,7 +88,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
#<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1262
-#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@@ -117,7 +117,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1579
-#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@@ -146,7 +146,7 @@ BEGIN
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
#<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1892
-#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@@ -175,7 +175,7 @@ BEGIN
#Q> INSERT INTO t2 SELECT * FROM t1
#<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2187
-#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
+#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 33 flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -237,7 +237,7 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2591
-#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F
+#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 33 flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -273,7 +273,7 @@ BEGIN
#Q> DELETE FROM t1
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2873
-#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F
+#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -303,7 +303,7 @@ BEGIN
#Q> DELETE FROM t2
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3135
-#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
+#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 33 flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
diff --git a/mysql-test/main/mysqlcheck.result b/mysql-test/main/mysqlcheck.result
index 2b4d4cb5647..063560e388e 100644
--- a/mysql-test/main/mysqlcheck.result
+++ b/mysql-test/main/mysqlcheck.result
@@ -9,6 +9,7 @@ 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
@@ -31,7 +32,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
mtr.global_suppressions Table is already up to date
mtr.test_suppressions Table is already up to date
mysql.column_stats OK
@@ -39,6 +39,7 @@ 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
@@ -67,12 +68,12 @@ mysql.time_zone_transition_type OK
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
-mysql.user OK
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
@@ -95,12 +96,12 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
-mysql.user OK
mysql.column_stats Table is already up to date
mysql.columns_priv Table is already up to date
mysql.db Table is already up to date
mysql.event Table is already up to date
mysql.func Table is already up to date
+mysql.global_priv Table is already up to date
mysql.gtid_slave_pos Table is already up to date
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
@@ -129,7 +130,6 @@ mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
-mysql.user Table is already up to date
create table t1 (a int) engine=myisam;
create view v1 as select * from t1;
test.t1 OK
@@ -429,6 +429,7 @@ mysql.columns_priv Table is already up to date
mysql.db Table is already up to date
mysql.event Table is already up to date
mysql.func Table is already up to date
+mysql.global_priv Table is already up to date
mysql.gtid_slave_pos Table is already up to date
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
@@ -451,7 +452,6 @@ mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry OK
-mysql.user Table is already up to date
mysqltest1.t1
warning : Table is marked as crashed
warning : Size of datafile is: 4 Should be: 0
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 68ed55c7e60..528ee68fb9c 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -294,6 +294,15 @@ The following specify which files/extra groups are read (specified before remain
--group-concat-max-len=#
The maximum length of the result of function
GROUP_CONCAT()
+ --gtid-cleanup-batch-size=#
+ Normally does not need tuning. How many old rows must
+ accumulate in the mysql.gtid_slave_pos table before a
+ background job will be run to delete them. Can be
+ increased to reduce number of commits if using many
+ different engines with --gtid_pos_auto_engines, or to
+ reduce CPU overhead if using a huge number of different
+ gtid_domain_ids. Can be decreased to reduce number of old
+ rows in the table.
--gtid-domain-id=# Used with global transaction ID to identify logically
independent replication streams. When events can
propagate through multiple parallel paths (for example
@@ -537,6 +546,10 @@ The following specify which files/extra groups are read (specified before remain
The maximum BLOB length to send to server from
mysql_send_long_data API. Deprecated option; use
max_allowed_packet instead.
+ --max-password-errors=#
+ If there is more than this number of failed connect
+ attempts due to invalid password, user will be blocked
+ from further connections until FLUSH_PRIVILEGES.
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
--max-recursive-iterations[=#]
@@ -1211,7 +1224,8 @@ The following specify which files/extra groups are read (specified before remain
ERROR_FOR_DIVISION_BY_ZERO, TRADITIONAL,
NO_AUTO_CREATE_USER, HIGH_NOT_PRECEDENCE,
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH,
- EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT
+ EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT,
+ TIME_ROUND_FRACTIONAL
--sql-safe-updates If set to 1, UPDATEs and DELETEs need either a key in the
WHERE clause, or a LIMIT clause, or else they will
aborted. Prevents the common mistake of accidentally
@@ -1350,7 +1364,8 @@ The following specify which files/extra groups are read (specified before remain
(usually get from GUI tools)
--use-stat-tables=name
Specifies how to use system statistics tables. One of:
- NEVER, COMPLEMENTARY, PREFERABLY
+ NEVER, COMPLEMENTARY, PREFERABLY,
+ COMPLEMENTARY_FOR_QUERIES, PREFERABLY_FOR_QUERIES
-u, --user=name Run mysqld daemon as user.
--userstat Enables statistics gathering for USER_STATISTICS,
CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
@@ -1415,7 +1430,7 @@ encrypt-binlog FALSE
encrypt-tmp-disk-tables FALSE
encrypt-tmp-files FALSE
enforce-storage-engine (No default value)
-eq-range-index-dive-limit 0
+eq-range-index-dive-limit 10
event-scheduler OFF
expensive-subquery-limit 100
expire-logs-days 0
@@ -1435,6 +1450,7 @@ gdb FALSE
general-log FALSE
getopt-prefix-matching FALSE
group-concat-max-len 1048576
+gtid-cleanup-batch-size 64
gtid-domain-id 0
gtid-ignore-duplicates FALSE
gtid-pos-auto-engines
@@ -1508,6 +1524,7 @@ max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-long-data-size 16777216
+max-password-errors 18446744073709551615
max-prepared-stmt-count 16382
max-recursive-iterations 18446744073709551615
max-relay-log-size 1073741824
@@ -1549,7 +1566,7 @@ optimizer-prune-level 1
optimizer-search-depth 62
optimizer-selectivity-sampling-limit 100
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on
-optimizer-use-condition-selectivity 1
+optimizer-use-condition-selectivity 4
performance-schema FALSE
performance-schema-accounts-size -1
performance-schema-consumer-events-stages-current FALSE
@@ -1586,7 +1603,7 @@ performance-schema-max-rwlock-instances -1
performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
performance-schema-max-stage-classes 160
-performance-schema-max-statement-classes 200
+performance-schema-max-statement-classes 202
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
performance-schema-max-thread-classes 50
@@ -1715,7 +1732,7 @@ transaction-isolation REPEATABLE-READ
transaction-prealloc-size 4096
transaction-read-only FALSE
updatable-views-with-limit YES
-use-stat-tables NEVER
+use-stat-tables PREFERABLY_FOR_QUERIES
userstat FALSE
verbose TRUE
wait-timeout 28800
diff --git a/mysql-test/main/mysqld_option_err.test b/mysql-test/main/mysqld_option_err.test
index 0c38eba7ca9..e9655fd4bfe 100644
--- a/mysql-test/main/mysqld_option_err.test
+++ b/mysql-test/main/mysqld_option_err.test
@@ -56,4 +56,6 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
--error 2
--exec $MYSQLD_BOOTSTRAP_CMD --not-known-option --help --verbose >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+rmdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
+
--echo Done.
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index 28b37eb6644..c40aa271465 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -4335,13 +4335,12 @@ second ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL E
show create event ee1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ee1 UTC CREATE DEFINER=`root`@`localhost` EVENT `ee1` ON SCHEDULE AT '2035-12-31 20:01:23' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5 latin1 latin1_swedish_ci latin1_swedish_ci
-create event ee2 on schedule at '2018-12-31 21:01:23' do set @a=5;
-Warnings:
-Note 1588 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation
+create event ee2 on schedule at '2030-12-31 21:01:22' do set @a=5;
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
second ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
+second ee2 root@localhost UTC ONE TIME 2030-12-31 21:01:22 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
second ee3 root@localhost UTC ONE TIME 2030-12-31 22:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
drop database second;
create database third;
@@ -4349,6 +4348,7 @@ use third;
show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
third ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
+third ee2 root@localhost UTC ONE TIME 2030-12-31 21:01:22 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
third ee3 root@localhost UTC ONE TIME 2030-12-31 22:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
drop database third;
set time_zone = 'SYSTEM';
diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test
index 57462fcf2e2..e2d9cc74d32 100644
--- a/mysql-test/main/mysqldump.test
+++ b/mysql-test/main/mysqldump.test
@@ -1810,7 +1810,7 @@ show create event ee1;
## prove three works (with spaces and tabs on the end)
# start with one from the previous restore
-create event ee2 on schedule at '2018-12-31 21:01:23' do set @a=5;
+create event ee2 on schedule at '2030-12-31 21:01:22' do set @a=5;
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
show events;
--exec $MYSQL_DUMP --events second > $MYSQLTEST_VARDIR/tmp/bug16853-2.sql
diff --git a/mysql-test/main/not_embedded_server.result b/mysql-test/main/not_embedded_server.result
index ba68ca8619b..bc794ce48c8 100644
--- a/mysql-test/main/not_embedded_server.result
+++ b/mysql-test/main/not_embedded_server.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
+call mtr.add_suppression("Can't open and lock privilege tables: Table 'db' was not locked with LOCK TABLES");
SHOW VARIABLES like 'slave_skip_errors';
Variable_name Value
slave_skip_errors OFF
@@ -16,7 +16,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT);
LOCK TABLES t1 READ;
FLUSH PRIVILEGES;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t1;
#
diff --git a/mysql-test/main/not_embedded_server.test b/mysql-test/main/not_embedded_server.test
index b2cbdba6850..20f75db25d5 100644
--- a/mysql-test/main/not_embedded_server.test
+++ b/mysql-test/main/not_embedded_server.test
@@ -6,7 +6,7 @@
# End of 4.1 tests
-call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
+call mtr.add_suppression("Can't open and lock privilege tables: Table 'db' was not locked with LOCK TABLES");
#
# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors
diff --git a/mysql-test/main/null_key.result b/mysql-test/main/null_key.result
index 525a12100e5..8eca97d5e70 100644
--- a/mysql-test/main/null_key.result
+++ b/mysql-test/main/null_key.result
@@ -405,8 +405,11 @@ INSERT INTO t3 SELECT * FROM t4;
INSERT INTO t3 VALUES (2), (3);
ANALYZE table t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SELECT COUNT(*) FROM t3;
COUNT(*)
diff --git a/mysql-test/main/old-mode.result b/mysql-test/main/old-mode.result
index 73ad613048a..e0a3412bbdf 100644
--- a/mysql-test/main/old-mode.result
+++ b/mysql-test/main/old-mode.result
@@ -180,3 +180,44 @@ a unix_timestamp(a)
2010-10-31 02:25:26 1288481126
drop table t1, t2;
set time_zone=DEFAULT;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+SET global mysql56_temporal_format=false;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(0));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+a COALESCE(a) UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 2010-10-31 02:25:25 1288481125
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+MIN(a) a
+2010-10-31 02:25:26 1288477526
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+MAX(a) a
+2010-10-31 02:25:25 1288481125
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a)
+2010-10-31 02:25:26 1288477526 2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125 2010-10-31 02:25:25 1288481125
+ALTER TABLE t1 MODIFY a TIMESTAMP(1);
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+a COALESCE(a) UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26.0 2010-10-31 02:25:26.0 1288477526.0
+2010-10-31 02:25:25.0 2010-10-31 02:25:25.0 1288481125.0
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+MIN(a) a
+2010-10-31 02:25:26.0 1288477526.0
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+MAX(a) a
+2010-10-31 02:25:25.0 1288481125.0
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+a UNIX_TIMESTAMP(t1.a) a UNIX_TIMESTAMP(t2.a)
+2010-10-31 02:25:26.0 1288477526.0 2010-10-31 02:25:26.0 1288477526.0
+2010-10-31 02:25:25.0 1288481125.0 2010-10-31 02:25:25.0 1288481125.0
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET global mysql56_temporal_format=true;
diff --git a/mysql-test/main/old-mode.test b/mysql-test/main/old-mode.test
index d7e8ce8ee55..7ec2092009b 100644
--- a/mysql-test/main/old-mode.test
+++ b/mysql-test/main/old-mode.test
@@ -119,3 +119,32 @@ insert t2 select a from t1;
select a, unix_timestamp(a) from t2;
drop table t1, t2;
set time_zone=DEFAULT;
+
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+
+# This tests:
+# Field_timestamp::val_native()
+# Field_timestamp_hires::val_native()
+# Type_handler_timestamp_common::type_handler_for_native_format()
+
+SET global mysql56_temporal_format=false;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(0));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+ALTER TABLE t1 MODIFY a TIMESTAMP(1);
+SELECT a, COALESCE(a), UNIX_TIMESTAMP(a) FROM t1;
+SELECT MIN(a), UNIX_TIMESTAMP(MIN(a)) AS a FROM t1;
+SELECT MAX(a), UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+SELECT t1.a, UNIX_TIMESTAMP(t1.a), t2.a, UNIX_TIMESTAMP(t2.a) FROM t1 t1, t1 t2 WHERE t1.a=t2.a;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET global mysql56_temporal_format=true;
diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result
index 3f0483b1e64..96b1895d57b 100644
--- a/mysql-test/main/openssl_1.result
+++ b/mysql-test/main/openssl_1.result
@@ -4,52 +4,38 @@ drop table if exists t1;
create table t1(f1 int);
insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
-grant select on test.* to ssl_user2@localhost require cipher "AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
-grant select on test.* to ssl_user4@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
-grant select on test.* to ssl_user5@localhost require cipher "AES256-SHA" AND SUBJECT "xxx";
+grant select on test.* to ssl_user3@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
+grant select on test.* to ssl_user4@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
+grant select on test.* to ssl_user5@localhost require SUBJECT "xxx";
flush privileges;
-connect con1,localhost,ssl_user1,,,,,SSL-CIPHER=AES256-SHA;
-connect(localhost,ssl_user2,,test,MASTER_PORT,MASTER_SOCKET);
-connect con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES128-SHA;
-ERROR 28000: Access denied for user 'ssl_user2'@'localhost' (using password: NO)
-connect con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES256-SHA;
-connect con3,localhost,ssl_user3,,,,,SSL-CIPHER=AES256-SHA;
-connect con4,localhost,ssl_user4,,,,,SSL-CIPHER=AES256-SHA;
+connect con1,localhost,ssl_user1,,,,,SSL;
+connect con3,localhost,ssl_user3,,,,,SSL;
+connect con4,localhost,ssl_user4,,,,,SSL;
connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
-connect con5,localhost,ssl_user5,,,,,SSL-CIPHER=AES256-SHA;
+connect con5,localhost,ssl_user5,,,,,SSL;
ERROR 28000: Access denied for user 'ssl_user5'@'localhost' (using password: NO)
connection con1;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES256-SHA
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
select * from t1;
f1
5
delete from t1;
ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1'
-connection con2;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES256-SHA
-select * from t1;
-f1
-5
-delete from t1;
-ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 't1'
connection con3;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES256-SHA
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
select * from t1;
f1
5
delete from t1;
ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1'
connection con4;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES256-SHA
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
select * from t1;
f1
5
@@ -57,20 +43,15 @@ delete from t1;
ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1'
connection default;
disconnect con1;
-disconnect con2;
disconnect con3;
disconnect con4;
-drop user ssl_user1@localhost, ssl_user2@localhost,
-ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
+drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
drop table t1;
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES256-SHA
have_ssl
1
End of 5.0 tests
@@ -94,13 +75,7 @@ SSL_ACCEPTS #
SSL_CALLBACK_CACHE_HITS #
DROP TABLE thread_status;
SET GLOBAL event_scheduler=0;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES128-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher AES128-SHA
-mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxxCREATE TABLE t1(a int);
+CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
@@ -204,19 +179,12 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-mysqldump: Got error: 2026: SSL connection error: xxxx
+mysqldump: Got error: 2026: "SSL connection error: xxxx
DROP TABLE t1;
-Variable_name Value
-Ssl_cipher AES256-SHA
-Variable_name Value
-Ssl_cipher AES128-SHA
-select 'is still running; no cipher request crashed the server' as result from dual;
-result
-is still running; no cipher request crashed the server
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
connect con1,localhost,bug42158,,,,,SSL;
-SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
have_ssl
1
disconnect con1;
diff --git a/mysql-test/main/openssl_1.test b/mysql-test/main/openssl_1.test
index dce4f88b6bb..27eeb0198b1 100644
--- a/mysql-test/main/openssl_1.test
+++ b/mysql-test/main/openssl_1.test
@@ -19,58 +19,45 @@ create table t1(f1 int);
insert into t1 values (5);
grant select on test.* to ssl_user1@localhost require SSL;
-grant select on test.* to ssl_user2@localhost require cipher "AES256-SHA";
-grant select on test.* to ssl_user3@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
-grant select on test.* to ssl_user4@localhost require cipher "AES256-SHA" AND SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
-grant select on test.* to ssl_user5@localhost require cipher "AES256-SHA" AND SUBJECT "xxx";
+grant select on test.* to ssl_user3@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client";
+grant select on test.* to ssl_user4@localhost require SUBJECT "/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client" ISSUER "/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB";
+grant select on test.* to ssl_user5@localhost require SUBJECT "xxx";
flush privileges;
-connect (con1,localhost,ssl_user1,,,,,SSL-CIPHER=AES256-SHA);
+connect (con1,localhost,ssl_user1,,,,,SSL);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
---error ER_ACCESS_DENIED_ERROR
-connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES128-SHA);
-connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES256-SHA);
-connect (con3,localhost,ssl_user3,,,,,SSL-CIPHER=AES256-SHA);
-connect (con4,localhost,ssl_user4,,,,,SSL-CIPHER=AES256-SHA);
+connect (con3,localhost,ssl_user3,,,,,SSL);
+connect (con4,localhost,ssl_user4,,,,,SSL);
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_ACCESS_DENIED_ERROR
-connect (con5,localhost,ssl_user5,,,,,SSL-CIPHER=AES256-SHA);
+connect (con5,localhost,ssl_user5,,,,,SSL);
connection con1;
# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
-select * from t1;
---error ER_TABLEACCESS_DENIED_ERROR
-delete from t1;
-
-connection con2;
-# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
connection con3;
# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
connection con4;
# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
select * from t1;
--error ER_TABLEACCESS_DENIED_ERROR
delete from t1;
connection default;
disconnect con1;
-disconnect con2;
disconnect con3;
disconnect con4;
-drop user ssl_user1@localhost, ssl_user2@localhost,
-ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
+drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
drop table t1;
@@ -124,21 +111,13 @@ drop table t1;
--echo
#
-# Bug#21611 Slave can't connect when master-ssl-cipher specified
-# - Apparently selecting a cipher doesn't work at all
-# - Use a cipher that both yaSSL and OpenSSL supports
-#
---exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
---exec $MYSQL_TEST --ssl-cipher=AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
-
-#
# Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23
#
# Test that we can open encrypted connection to server without
# verification of servers certificate by setting both ca certificate
# and ca path to NULL
#
---exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
+--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
--echo End of 5.0 tests
#
@@ -180,25 +159,6 @@ DROP TABLE thread_status;
SET GLOBAL event_scheduler=0;
#
-# Test to connect using a list of ciphers
-#
---exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
---exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER:AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
-
-
-# Test to connect using a specifi cipher
-#
---exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit;" > $MYSQLTEST_VARDIR/tmp/test.sql
---exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
-
-# Test to connect using an unknown cipher
-#
---exec echo "SHOW STATUS LIKE 'Ssl_cipher'; exit" > $MYSQLTEST_VARDIR/tmp/test.sql
---replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
---error 1
---exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
-
-#
# Bug#27669 mysqldump: SSL connection error when trying to connect
#
@@ -214,7 +174,7 @@ INSERT INTO t1 VALUES (1), (2);
# With wrong parameters
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR mysqldump.exe mysqldump
---replace_regex /\"SSL connection error.*/SSL connection error: xxxx/
+--replace_regex /SSL connection error.*/SSL connection error: xxxx/
--error 2
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
--echo
@@ -222,36 +182,13 @@ DROP TABLE t1;
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
#
-# Bug#39172 Asking for DH+non-RSA key with server set to use other key caused
-# YaSSL to crash the server.
-#
-
-# Common ciphers to openssl and yassl
---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES256-SHA
---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES128-SHA
---disable_query_log
---disable_result_log
-
-# Below here caused crashes. ################
---error 1,0
---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl-cipher';" --ssl-cipher=NOT----EXIST
-# These probably exist but the server's keys can't be used to accept these kinds of connections.
---error 1,0
---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl-cipher';" --ssl-cipher=AES128-RMD
-
-# If this gives a result, then the bug is fixed.
---enable_result_log
---enable_query_log
-select 'is still running; no cipher request crashed the server' as result from dual;
-
-#
# Bug#42158: leak: SSL_get_peer_certificate() doesn't have matching X509_free()
#
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
connect(con1,localhost,bug42158,,,,,SSL);
-SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+SELECT VARIABLE_VALUE <> '' AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
disconnect con1;
connection default;
DROP USER bug42158@localhost;
diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result
index 6e1518f327c..f5bae1c85a4 100644
--- a/mysql-test/main/order_by.result
+++ b/mysql-test/main/order_by.result
@@ -3329,3 +3329,40 @@ Warnings:
Note 1003 select `test`.`wings`.`id` AS `wing_id`,`test`.`wings`.`department_id` AS `department_id` from `test`.`wings` semi join (`test`.`books`) where `test`.`books`.`library_id` = 8663 and `test`.`books`.`scheduled_for_removal` = 0 and `test`.`wings`.`id` = `test`.`books`.`wings_id` order by `test`.`wings`.`id`
set optimizer_switch= @save_optimizer_switch;
DROP TABLE books, wings;
+#
+# MDEV-17761: Odd optimizer choice with ORDER BY LIMIT and condition selectivity
+#
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C;
+create table t3(a int);
+insert into t3 select A.a + 1000 *B.a from t2 A, t1 B;
+create table t4 (
+a int,
+b int,
+c int,
+filler1 char(255),
+filler2 char(255),
+key(a)
+);
+insert into t4 select a,a,a, a,a from t3;
+set @tmp_h=@@histogram_size, @tmp_u=@@use_stat_tables,
+@tmp_o=@@optimizer_use_condition_selectivity;
+set histogram_size=100;
+set use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=4;
+analyze table t4 persistent for columns(b) indexes ();
+Table Op Msg_type Msg_text
+test.t4 analyze status Engine-independent statistics collected
+test.t4 analyze status Table is already up to date
+# rows must be around 1200, not 600:
+explain extended
+select * from t4 where b < 5000 order by a limit 600;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t4 index NULL a 5 NULL 1188 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`filler1` AS `filler1`,`test`.`t4`.`filler2` AS `filler2` from `test`.`t4` where `test`.`t4`.`b` < 5000 order by `test`.`t4`.`a` limit 600
+set histogram_size=@tmp_h, use_stat_tables=@tmp_u,
+optimizer_use_condition_selectivity=@tmp_o;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test
index e0c00aee583..f639f2fdc60 100644
--- a/mysql-test/main/order_by.test
+++ b/mysql-test/main/order_by.test
@@ -2188,3 +2188,40 @@ eval explain extended $q;
set optimizer_switch= @save_optimizer_switch;
DROP TABLE books, wings;
+
+--echo #
+--echo # MDEV-17761: Odd optimizer choice with ORDER BY LIMIT and condition selectivity
+--echo #
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2(a int);
+insert into t2 select A.a + B.a* 10 + C.a * 100 from t1 A, t1 B, t1 C;
+create table t3(a int);
+insert into t3 select A.a + 1000 *B.a from t2 A, t1 B;
+
+create table t4 (
+ a int,
+ b int,
+ c int,
+ filler1 char(255),
+ filler2 char(255),
+ key(a)
+);
+insert into t4 select a,a,a, a,a from t3;
+
+set @tmp_h=@@histogram_size, @tmp_u=@@use_stat_tables,
+ @tmp_o=@@optimizer_use_condition_selectivity;
+set histogram_size=100;
+set use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=4;
+analyze table t4 persistent for columns(b) indexes ();
+
+--echo # rows must be around 1200, not 600:
+explain extended
+select * from t4 where b < 5000 order by a limit 600;
+
+set histogram_size=@tmp_h, use_stat_tables=@tmp_u,
+ optimizer_use_condition_selectivity=@tmp_o;
+
+drop table t1,t2,t3,t4;
+
diff --git a/mysql-test/main/outfile_loaddata.result b/mysql-test/main/outfile_loaddata.result
index 0ea692f3ab5..4356f8b113e 100644
--- a/mysql-test/main/outfile_loaddata.result
+++ b/mysql-test/main/outfile_loaddata.result
@@ -211,7 +211,7 @@ a b c
# latin1 charset (INTO OUTFILE warning is expected):
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET latin1 FROM t1;
Warnings:
-Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
+Warning 1366 Data truncated for column 'b' at row 1
##################################################
1 ABC-??? DEF-ÂÃÄ
2 \N \N
@@ -226,7 +226,7 @@ a b c
# KOI8-R charset (INTO OUTFILE warning is expected):
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET koi8r FROM t1;
Warnings:
-Warning 1366 Incorrect string value: '\xC2\xC3\xC4' for column 'c' at row 1
+Warning 1366 Data truncated for column 'c' at row 1
##################################################
1 ABC-áâ÷ DEF-???
2 \N \N
diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result
index 4a3a9ed2380..34c119a322e 100644
--- a/mysql-test/main/parser.result
+++ b/mysql-test/main/parser.result
@@ -1704,4 +1704,69 @@ SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
(SELECT
1
+#
+# MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the option_value_no_option_type grammar
+#
+CREATE TABLE names (names INT);
+SELECT names FROM names AS names;
+names
+DROP TABLE names;
+CREATE TABLE password (password INT);
+SELECT password FROM password AS password;
+password
+DROP TABLE password;
+CREATE TABLE role (role INT);
+SELECT role FROM role AS role;
+role
+DROP TABLE role;
+BEGIN NOT ATOMIC
+DECLARE names VARCHAR(32) DEFAULT '[names]';
+DECLARE password VARCHAR(32) DEFAULT '[password]';
+DECLARE role VARCHAR(32) DEFAULT '[role]';
+names:
+LOOP
+SELECT names;
+LEAVE names;
+END LOOP;
+password:
+LOOP
+SELECT password;
+LEAVE password;
+END LOOP;
+role:
+LOOP
+SELECT role;
+LEAVE role;
+END LOOP;
+END;
+$$
+names
+[names]
+password
+[password]
+role
+[role]
+BEGIN NOT ATOMIC
+DECLARE names VARCHAR(32);
+SET names='[names]';
+END;
+$$
+ERROR 42000: Variable 'names' must be quoted with `...`, or renamed
+BEGIN NOT ATOMIC
+DECLARE password VARCHAR(32);
+SET password='[password]';
+END;
+$$
+ERROR 42000: Variable 'password' must be quoted with `...`, or renamed
+BEGIN NOT ATOMIC
+DECLARE role VARCHAR(32);
+SET role='[role]';
+END;
+$$
+SELECT @@GLOBAL.names;
+ERROR HY000: Unknown system variable 'names'
+SELECT @@GLOBAL.password;
+ERROR HY000: Unknown system variable 'password'
+SELECT @@GLOBAL.role;
+ERROR HY000: Unknown system variable 'role'
End of 10.3 tests
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index 1806816ca5d..3a7c4f6467e 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -1462,4 +1462,78 @@ DROP PROCEDURE p1;
(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT
1
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
+
+--echo #
+--echo # MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the option_value_no_option_type grammar
+--echo #
+
+CREATE TABLE names (names INT);
+SELECT names FROM names AS names;
+DROP TABLE names;
+
+CREATE TABLE password (password INT);
+SELECT password FROM password AS password;
+DROP TABLE password;
+
+CREATE TABLE role (role INT);
+SELECT role FROM role AS role;
+DROP TABLE role;
+
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE names VARCHAR(32) DEFAULT '[names]';
+ DECLARE password VARCHAR(32) DEFAULT '[password]';
+ DECLARE role VARCHAR(32) DEFAULT '[role]';
+names:
+ LOOP
+ SELECT names;
+ LEAVE names;
+ END LOOP;
+password:
+ LOOP
+ SELECT password;
+ LEAVE password;
+ END LOOP;
+role:
+ LOOP
+ SELECT role;
+ LEAVE role;
+ END LOOP;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_BAD_VAR_SHADOW
+BEGIN NOT ATOMIC
+ DECLARE names VARCHAR(32);
+ SET names='[names]';
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_BAD_VAR_SHADOW
+BEGIN NOT ATOMIC
+ DECLARE password VARCHAR(32);
+ SET password='[password]';
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE role VARCHAR(32);
+ SET role='[role]';
+END;
+$$
+DELIMITER ;$$
+
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.names;
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.password;
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.role;
+
--echo End of 10.3 tests
diff --git a/mysql-test/main/partition.result b/mysql-test/main/partition.result
index 680b0a953d1..16a7ff6b564 100644
--- a/mysql-test/main/partition.result
+++ b/mysql-test/main/partition.result
@@ -286,6 +286,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t1 1 a 1 a A NULL NULL NULL YES BTREE
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show indexes from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -1029,6 +1030,7 @@ PARTITION BY LIST (a)
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
create table t1
@@ -1824,6 +1826,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze note The storage engine for the table doesn't support analyze
drop table t1;
drop procedure if exists mysqltest_1;
@@ -2060,6 +2063,7 @@ ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
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 'EXTENDED' at line 1
ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p1;
Table Op Msg_type Msg_text
@@ -2649,6 +2653,106 @@ Note 1517 Duplicate partition name p2
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
#
+# MDEV-17032: Estimates are higher for partitions of a table with @@use_stat_tables= PREFERABLY
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+create table t2 (
+part_key int,
+a int,
+b int
+) partition by list(part_key) (
+partition p0 values in (0),
+partition p1 values in (1),
+partition p2 values in (2),
+partition p3 values in (3),
+partition p4 values in (4)
+);
+insert into t2
+select mod(a,5), a/100, mod(a,5) from t1;
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+#
+# Tests using stats provided by the storage engine
+#
+explain extended select * from t2 where part_key=1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 200 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`part_key` = 1
+explain partitions select * from t2 where part_key=1;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 p1 ALL NULL NULL NULL NULL 200 Using where
+explain extended select * from t2 where part_key in (1,2);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 400 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`part_key` in (1,2)
+explain partitions select * from t2 where part_key in (1,2);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 p1,p2 ALL NULL NULL NULL NULL 400 Using where
+explain extended select * from t2 where b=5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` = 5
+explain partitions select * from t2 where b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 p0,p1,p2,p3,p4 ALL NULL NULL NULL NULL 1000 Using where
+explain extended select * from t2 partition(p0) where b=1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 200 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` PARTITION (`p0`) where `test`.`t2`.`b` = 1
+set @save_histogram_size=@@histogram_size;
+set @@histogram_size=100;
+set @@use_stat_tables= PREFERABLY;
+set @@optimizer_use_condition_selectivity=4;
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+#
+# Tests using EITS
+#
+# filtered should be 100
+explain extended select * from t2 where part_key=1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 200 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`part_key` = 1
+explain partitions select * from t2 where part_key=1;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 p1 ALL NULL NULL NULL NULL 200 Using where
+# filtered should be 100
+explain extended select * from t2 where part_key in (1,2);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 400 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`part_key` in (1,2)
+explain partitions select * from t2 where part_key in (1,2);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 p1,p2 ALL NULL NULL NULL NULL 400 Using where
+explain extended select * from t2 where b=5;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1000 19.80 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where `test`.`t2`.`b` = 5
+explain partitions select * from t2 where b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 p0,p1,p2,p3,p4 ALL NULL NULL NULL NULL 1000 Using where
+explain extended select * from t2 partition(p0) where b=1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 200 19.80 Using where
+Warnings:
+Note 1003 select `test`.`t2`.`part_key` AS `part_key`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` PARTITION (`p0`) where `test`.`t2`.`b` = 1
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set @@histogram_size= @save_histogram_size;
+drop table t0,t1,t2;
+#
# End of 10.0 tests
#
#
diff --git a/mysql-test/main/partition.test b/mysql-test/main/partition.test
index 7b7d1457426..42929796f6b 100644
--- a/mysql-test/main/partition.test
+++ b/mysql-test/main/partition.test
@@ -2901,6 +2901,68 @@ DEALLOCATE PREPARE stmt;
DROP TABLE t1;
--echo #
+--echo # MDEV-17032: Estimates are higher for partitions of a table with @@use_stat_tables= PREFERABLY
+--echo #
+
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+
+
+create table t2 (
+ part_key int,
+ a int,
+ b int
+) partition by list(part_key) (
+ partition p0 values in (0),
+ partition p1 values in (1),
+ partition p2 values in (2),
+ partition p3 values in (3),
+ partition p4 values in (4)
+);
+insert into t2
+select mod(a,5), a/100, mod(a,5) from t1;
+
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+--echo #
+--echo # Tests using stats provided by the storage engine
+--echo #
+explain extended select * from t2 where part_key=1;
+explain partitions select * from t2 where part_key=1;
+explain extended select * from t2 where part_key in (1,2);
+explain partitions select * from t2 where part_key in (1,2);
+explain extended select * from t2 where b=5;
+explain partitions select * from t2 where b=5;
+explain extended select * from t2 partition(p0) where b=1;
+
+
+set @save_histogram_size=@@histogram_size;
+set @@histogram_size=100;
+set @@use_stat_tables= PREFERABLY;
+set @@optimizer_use_condition_selectivity=4;
+analyze table t2;
+--echo #
+--echo # Tests using EITS
+--echo #
+--echo # filtered should be 100
+explain extended select * from t2 where part_key=1;
+explain partitions select * from t2 where part_key=1;
+--echo # filtered should be 100
+explain extended select * from t2 where part_key in (1,2);
+explain partitions select * from t2 where part_key in (1,2);
+explain extended select * from t2 where b=5;
+explain partitions select * from t2 where b=5;
+explain extended select * from t2 partition(p0) where b=1;
+
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set @@histogram_size= @save_histogram_size;
+drop table t0,t1,t2;
+
+--echo #
--echo # End of 10.0 tests
--echo #
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test
index 62a3e1c0777..91ae67e2f7b 100644
--- a/mysql-test/main/partition_alter.test
+++ b/mysql-test/main/partition_alter.test
@@ -79,7 +79,6 @@ partition p1 values less than ('2016-10-18'),
partition p2 values less than ('2020-10-19'));
insert t1 values (0, '2000-01-02', 0);
insert t1 values (1, '2020-01-02', 10);
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CONSTRAINT_FAILED
alter table t1 add check (b in (0, 1));
alter table t1 add check (b in (0, 10));
@@ -96,7 +95,6 @@ partition p1 values less than ('2016-10-18'),
partition p2 values less than ('2020-10-19'));
insert t1 values (0, '2000-01-02', 0);
insert t1 values (1, '2020-01-02', 10);
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CONSTRAINT_FAILED
alter table t1 add check (b in (0, 1));
alter table t1 add check (b in (0, 10));
diff --git a/mysql-test/main/partition_binlog.result b/mysql-test/main/partition_binlog.result
index 21eca8f1c00..3e6100b51d8 100644
--- a/mysql-test/main/partition_binlog.result
+++ b/mysql-test/main/partition_binlog.result
@@ -27,6 +27,7 @@ Table Op Msg_type Msg_text
test.t1 repair error Error in list of partitions to test.t1
ALTER TABLE t1 ANALYZE PARTITION p0;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p0;
Table Op Msg_type Msg_text
diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result
index 8780c75eba4..9c1174c5414 100644
--- a/mysql-test/main/partition_explicit_prune.result
+++ b/mysql-test/main/partition_explicit_prune.result
@@ -233,6 +233,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
+HANDLER_READ_KEY 6
HANDLER_TMP_WRITE 24
HANDLER_WRITE 2
# Should be 1 commit
@@ -315,6 +316,7 @@ a b
1000 `p100-99999`(-subp6)
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
SET @@global.innodb_stats_on_metadata=ON;
@@ -348,6 +350,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 1
+HANDLER_READ_KEY 6
HANDLER_TMP_WRITE 24
# Should be 1 commit
# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock)
@@ -1058,6 +1061,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
+HANDLER_READ_KEY 6
HANDLER_READ_NEXT 5
HANDLER_TMP_WRITE 24
HANDLER_WRITE 10
@@ -1077,6 +1081,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_READ_FIRST 5
+HANDLER_READ_KEY 6
HANDLER_ROLLBACK 1
HANDLER_TMP_WRITE 24
HANDLER_WRITE 1
@@ -1104,6 +1109,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
+HANDLER_READ_KEY 6
HANDLER_READ_NEXT 5
HANDLER_TMP_WRITE 24
HANDLER_WRITE 10
diff --git a/mysql-test/main/partition_innodb.result b/mysql-test/main/partition_innodb.result
index 46353c63ce3..ed79bbbe48d 100644
--- a/mysql-test/main/partition_innodb.result
+++ b/mysql-test/main/partition_innodb.result
@@ -34,6 +34,7 @@ INSERT INTO t1 SELECT a + 120, b FROM t1 WHERE a >= 0;
INSERT INTO t1 SELECT a + 240, b FROM t1 WHERE a >= 0;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT b FROM t1 WHERE b between 'L' and 'N' AND a > -100;
id select_type table type possible_keys key key_len ref rows Extra
@@ -909,6 +910,35 @@ ERROR HY000: Table definition has changed, please retry transaction
disconnect con1;
DROP TABLE t1;
#
+# MDEV-11167: InnoDB: Warning: using a partial-field key prefix
+# in search, results in assertion failure or "Can't find record" error
+#
+set @save_sql_mode = @@sql_mode;
+set sql_mode="";
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT, c INT, KEY(b)) ENGINE=InnoDB PARTITION BY HASH(c) PARTITIONS 2;
+CREATE ALGORITHM = MERGE VIEW v AS SELECT a, b FROM t1 STRAIGHT_JOIN t2 WHERE b = 'foo' WITH CHECK OPTION;
+INSERT INTO t1 VALUES (1),(2);
+INSERT IGNORE INTO t2 VALUES (2,2),('three',3),(4,4);
+Warnings:
+Warning 1366 Incorrect integer value: 'three' for column `test`.`t2`.`b` at row 2
+UPDATE v SET a = NULL;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'foo'
+DROP view v;
+DROP TABLE t1, t2;
+SET @save_isp=@@innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent= ON;
+CREATE TABLE t (f1 INT, f2 INT, KEY(f2)) ENGINE=InnoDB PARTITION BY HASH (f1) PARTITIONS 2;
+INSERT IGNORE INTO t VALUES (NULL,0),(NULL,0),(0,21),(4,0),(1,8),(5,66);
+CREATE ALGORITHM=MERGE VIEW v AS SELECT t1.* FROM t t1 JOIN t t2 WHERE t1.f1 < t2.f2 WITH LOCAL CHECK OPTION;
+UPDATE v SET f2 = NULL;
+ERROR 44000: CHECK OPTION failed `test`.`v`
+SET GLOBAL innodb_stats_persistent= @save_isp;
+DROP view v;
+DROP TABLE t;
+set sql_mode= @save_sql_mode;
+#
# Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
# MYSQL.INNODB_TABLE_STATS
#
@@ -938,3 +968,37 @@ DROP DATABASE test_jfg;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
+create table t1 (a int) engine=innodb;
+create table t2 (
+b int,
+c int,
+d bit not null default 0,
+v bit as (d) virtual,
+key (b,v)
+) engine=innodb partition by hash (b);
+insert into t1 values (1),(2);
+insert into t2 (b,c,d) values (1,1,0),(2,2,0);
+explain select t1.* from t1 join t2 on (v = a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2
+1 SIMPLE t2 index NULL b 7 NULL 2 Using where; Using index; Using join buffer (flat, BNL join)
+select t1.* from t1 join t2 on (v = a);
+a
+drop table t1, t2;
+#
+# End of 10.2 tests
+#
+#
+# MDEV-16241 Assertion `inited==RND' failed in handler::ha_rnd_end()
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, x INT, y INT, z INT, KEY (x), KEY (y, z))
+WITH SYSTEM VERSIONING
+PARTITION BY SYSTEM_TIME (PARTITION p1 HISTORY, PARTITION pn CURRENT);
+INSERT INTO t1 VALUES (1, 7, 8, 9), (2, NULL, NULL, NULL), (3, NULL, NULL, NULL);
+SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL;
+COUNT(*)
+2
+DROP TABLE t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/partition_innodb.test b/mysql-test/main/partition_innodb.test
index a8bbb7ceed5..e09a2b4f9d3 100644
--- a/mysql-test/main/partition_innodb.test
+++ b/mysql-test/main/partition_innodb.test
@@ -1001,6 +1001,38 @@ SELECT b FROM t1 WHERE b = 0;
DROP TABLE t1;
--echo #
+--echo # MDEV-11167: InnoDB: Warning: using a partial-field key prefix
+--echo # in search, results in assertion failure or "Can't find record" error
+--echo #
+
+set @save_sql_mode = @@sql_mode;
+set sql_mode="";
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT, c INT, KEY(b)) ENGINE=InnoDB PARTITION BY HASH(c) PARTITIONS 2;
+CREATE ALGORITHM = MERGE VIEW v AS SELECT a, b FROM t1 STRAIGHT_JOIN t2 WHERE b = 'foo' WITH CHECK OPTION;
+
+INSERT INTO t1 VALUES (1),(2);
+INSERT IGNORE INTO t2 VALUES (2,2),('three',3),(4,4);
+UPDATE v SET a = NULL;
+
+DROP view v;
+DROP TABLE t1, t2;
+
+SET @save_isp=@@innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent= ON;
+
+CREATE TABLE t (f1 INT, f2 INT, KEY(f2)) ENGINE=InnoDB PARTITION BY HASH (f1) PARTITIONS 2;
+INSERT IGNORE INTO t VALUES (NULL,0),(NULL,0),(0,21),(4,0),(1,8),(5,66);
+CREATE ALGORITHM=MERGE VIEW v AS SELECT t1.* FROM t t1 JOIN t t2 WHERE t1.f1 < t2.f2 WITH LOCAL CHECK OPTION;
+--error ER_VIEW_CHECK_FAILED
+UPDATE v SET f2 = NULL;
+
+SET GLOBAL innodb_stats_persistent= @save_isp;
+DROP view v;
+DROP TABLE t;
+set sql_mode= @save_sql_mode;
+
+--echo #
--echo # Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
--echo # MYSQL.INNODB_TABLE_STATS
--echo #
@@ -1031,3 +1063,37 @@ DROP DATABASE test_jfg;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
+#
+# MDEV-17755 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed in Field_bit::val_int upon SELECT with JOIN, partitions, indexed virtual column
+#
+create table t1 (a int) engine=innodb;
+create table t2 (
+ b int,
+ c int,
+ d bit not null default 0,
+ v bit as (d) virtual,
+ key (b,v)
+) engine=innodb partition by hash (b);
+insert into t1 values (1),(2);
+insert into t2 (b,c,d) values (1,1,0),(2,2,0);
+explain select t1.* from t1 join t2 on (v = a);
+select t1.* from t1 join t2 on (v = a);
+drop table t1, t2;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-16241 Assertion `inited==RND' failed in handler::ha_rnd_end()
+--echo #
+CREATE TABLE t1 (pk INT PRIMARY KEY, x INT, y INT, z INT, KEY (x), KEY (y, z))
+WITH SYSTEM VERSIONING
+PARTITION BY SYSTEM_TIME (PARTITION p1 HISTORY, PARTITION pn CURRENT);
+INSERT INTO t1 VALUES (1, 7, 8, 9), (2, NULL, NULL, NULL), (3, NULL, NULL, NULL);
+SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/main/perror-win.result b/mysql-test/main/perror-win.result
index 139b566757f..0e9d2e48a99 100644
--- a/mysql-test/main/perror-win.result
+++ b/mysql-test/main/perror-win.result
@@ -1,7 +1,7 @@
-MySQL error code 150: Foreign key constraint is incorrectly formed
+MariaDB error code 150: Foreign key constraint is incorrectly formed
Win32 error code 150: System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
OS error code 23: Too many open files in system
Win32 error code 23: Data error (cyclic redundancy check).
-MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
+MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
Win32 error code 1062: The service has not been started.
Illegal error code: 30000
diff --git a/mysql-test/main/perror.result b/mysql-test/main/perror.result
index 46554442721..ad2106524e5 100644
--- a/mysql-test/main/perror.result
+++ b/mysql-test/main/perror.result
@@ -1,6 +1,6 @@
Illegal error code: 10000
-MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
-MySQL error code 1408 (ER_STARTUP): %s: ready for connections.
+MariaDB error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
+MariaDB error code 1408 (ER_STARTUP): %s: ready for connections.
Version: '%s' socket: '%s' port: %d %s
-MySQL error code 1459 (ER_TABLE_NEEDS_UPGRADE): Upgrade required. Please do "REPAIR %s %`s" or dump/reload to fix it!
-MySQL error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
+MariaDB error code 1459 (ER_TABLE_NEEDS_UPGRADE): Upgrade required. Please do "REPAIR %s %`s" or dump/reload to fix it!
+MariaDB error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
diff --git a/mysql-test/main/plugin.result b/mysql-test/main/plugin.result
index 38a03920039..fde2550ad81 100644
--- a/mysql-test/main/plugin.result
+++ b/mysql-test/main/plugin.result
@@ -12,7 +12,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -25,7 +25,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE DAEMON
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Unusable Daemon
PLUGIN_LICENSE GPL
@@ -64,7 +64,7 @@ PLUGIN_STATUS DELETED
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result
index 899e0292142..7c3d029ad7d 100644
--- a/mysql-test/main/plugin_auth.result
+++ b/mysql-test/main/plugin_auth.result
@@ -362,6 +362,7 @@ uplain@localhost uplain@localhost
connection default;
disconnect cleartext_con;
DROP USER uplain@localhost;
+drop view mysql.user_bak;
#
# Bug #59038 : mysql.user.authentication_string column
# causes configuration wizard to fail
@@ -443,6 +444,8 @@ ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
NO authentication_string
NO plugin
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
#
# Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
# .-> USING PASSWORD: NO
diff --git a/mysql-test/main/plugin_auth.test b/mysql-test/main/plugin_auth.test
index c3c18b7e427..9af8f25d153 100644
--- a/mysql-test/main/plugin_auth.test
+++ b/mysql-test/main/plugin_auth.test
@@ -445,6 +445,10 @@ connection default;
disconnect cleartext_con;
DROP USER uplain@localhost;
+# prepare for two tests that use mysql.user table
+source include/switch_to_mysql_user.inc;
+drop view mysql.user_bak;
+
--echo #
--echo # Bug #59038 : mysql.user.authentication_string column
--echo # causes configuration wizard to fail
@@ -502,7 +506,6 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_SCHEMA='mysql'
ORDER BY COLUMN_NAME;
-
--echo #
--echo # Bug #11936829: diff. between mysql.user (authentication_string)
--echo # in fresh and upgraded 5.5.11
@@ -524,7 +527,8 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
ORDER BY COLUMN_NAME;
let $datadir= `select @@datadir`;
remove_file $datadir/mysql_upgrade_info;
-
+drop table mysql.global_priv;
+rename table mysql.global_priv_bak to mysql.global_priv;
--echo #
--echo # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
diff --git a/mysql-test/main/plugin_auth_qa.result b/mysql-test/main/plugin_auth_qa.result
index 2353bc80f84..e00ac1a4c96 100644
--- a/mysql-test/main/plugin_auth_qa.result
+++ b/mysql-test/main/plugin_auth_qa.result
@@ -1,38 +1,38 @@
set sql_mode="";
CREATE DATABASE test_user_db;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
========== test 1.1 ======================================================
CREATE USER plug IDENTIFIED WITH test_plugin_server;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug;
CREATE USER plug IDENTIFIED WITH test_plugin_server AS '';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS '';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server
REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug;
DROP USER plug;
@@ -100,62 +100,62 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
========== test 1.1.1.6/1.1.2.5 ============================
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
DROP USER plug;
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug, plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plug_dest
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
@@ -170,12 +170,12 @@ ERROR HY000: Operation CREATE USER failed for 'plug'@'%'
DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
-plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
+User plugin authentication_string Password
+plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug IDENTIFIED BY 'plug_dest_passwd';
@@ -184,18 +184,18 @@ DROP USER plug;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
plug test_plugin_server plug_dest
plug_dest test_plugin_server plug_dest
DROP USER plug,plug_dest;
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
plug test_plugin_server plug_dest
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest
IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
plug test_plugin_server plug_dest
plug_dest test_plugin_server plug_dest
DROP USER plug,plug_dest;
@@ -203,23 +203,23 @@ DROP USER plug,plug_dest;
SET NAMES utf8;
CREATE USER plüg IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg test_plugin_server plüg_dest
DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plüg_dest;
SET NAMES ascii;
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
pl??g test_plugin_server pl??g_dest
DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
pl??g_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest';
SET NAMES latin1;
@@ -228,12 +228,12 @@ CREATE USER 'plüg' IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
ERROR HY000: Plugin 'test_plügin_server' is not loaded
CREATE USER 'plug' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server plüg_dest
DROP USER 'plug';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest';
SET NAMES utf8;
@@ -241,22 +241,22 @@ CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest';
ERROR HY000: Plugin 'test_plügin_server' is not loaded
CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg test_plugin_server plüg_dest
DROP USER 'plüg';
CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'plüg_dest';
CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg test_plugin_server plüg_dest
DROP USER plüg;
CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER plüg_dest;
========== test 1.1.1.2/1.1.2.2=============================
@@ -271,12 +271,12 @@ CREATE USER plug IDENTIFIED WITH 'hh''s_test_plugin_server' AS 'plug_dest';
ERROR HY000: Plugin 'hh's_test_plugin_server' is not loaded
CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'hh''s_plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug test_plugin_server hh's_plug_dest
DROP USER plug;
CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
hh's_plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
DROP USER 'hh''s_plug_dest';
========== test 1.1.1.4 ====================================
@@ -285,13 +285,13 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
========== test 1.1.3.1 ====================================
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
CREATE USER plug_dest;
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
plug_dest mysql_native_password
DROP USER grant_user,plug_dest;
@@ -299,7 +299,7 @@ set @save_sql_mode= @@sql_mode;
SET @@sql_mode=no_auto_create_user;
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
CREATE USER plug_dest;
DROP USER plug_dest;
@@ -308,19 +308,19 @@ ERROR 28000: Can't find any matching row in the user table
DROP USER grant_user;
GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
grant_user test_plugin_server plug_dest
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
grant_user test_plugin_server plug_dest
-plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
+plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119
DROP USER plug_dest;
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
grant_user test_plugin_server plug_dest
-plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D
+plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D *560881EB651416CEF77314D07D55EDCD5FC1BD6D
DROP USER grant_user,plug_dest;
set @@sql_mode= @save_sql_mode;
DROP DATABASE test_user_db;
diff --git a/mysql-test/main/plugin_auth_qa_1.result b/mysql-test/main/plugin_auth_qa_1.result
index b04483722b8..dd709fee04c 100644
--- a/mysql-test/main/plugin_auth_qa_1.result
+++ b/mysql-test/main/plugin_auth_qa_1.result
@@ -1,6 +1,6 @@
CREATE DATABASE test_user_db;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
========== test 1.1.3.2 ====================================
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
@@ -19,7 +19,7 @@ IDENTIFIED WITH test_plugin_server AS 'plug_dest';
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd';
GRANT PROXY ON plug_dest TO plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
1)
@@ -70,7 +70,7 @@ ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using passwo
GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest;
@@ -88,7 +88,7 @@ ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using passwo
GRANT PROXY ON new_dest TO plug_user;
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
DROP USER plug_user,new_dest;
@@ -109,14 +109,14 @@ USER() CURRENT_USER()
new_user@localhost plug_dest@%
connection default;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_user test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
disconnect plug_user;
-UPDATE mysql.user SET user='plug_user' WHERE user='new_user';
+UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
DROP USER plug_dest,plug_user;
@@ -132,36 +132,36 @@ plug_user@localhost plug_dest@%
connection default;
disconnect plug_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
plug_user test_plugin_server plug_dest
-UPDATE mysql.user SET user='new_user' WHERE user='plug_user';
+UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_user test_plugin_server plug_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
-UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user';
FLUSH PRIVILEGES;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_user test_plugin_server new_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
-UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user';
FLUSH PRIVILEGES;
Warnings:
Warning 1524 Plugin 'new_plugin_server' is not loaded
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_user new_plugin_server new_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
ERROR 28000: Access denied for user 'new_user'@'localhost' (using password: YES)
-UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
-UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'test_plugin_server') WHERE user='new_user';
+UPDATE mysql.global_priv SET user='new_dest' WHERE user='plug_dest';
FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
new_user test_plugin_server new_dest
connect plug_user,localhost,new_user,new_dest;
@@ -170,11 +170,11 @@ USER() CURRENT_USER()
new_user@localhost new_dest@%
connection default;
disconnect plug_user;
-UPDATE mysql.user SET USER='plug_dest' WHERE user='new_dest';
+UPDATE mysql.global_priv SET user='plug_dest' WHERE user='new_dest';
FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
new_dest mysql_native_password *01422E86A6FFF84618914AF149F9AEF64B84170A
new_user test_plugin_server new_dest
plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119
@@ -190,7 +190,7 @@ DROP USER new_user,new_dest,plug_dest;
CREATE USER ''@'%%' IDENTIFIED WITH test_plugin_server AS 'proxied_user';
CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
test_plugin_server proxied_user
proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD
connect proxy_con,localhost,proxied_user,proxied_user_passwd;
@@ -226,7 +226,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'%%'
IDENTIFIED WITH test_plugin_server AS 'proxied_user';
CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
test_plugin_server proxied_user
proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD
connect proxy_con,localhost,proxied_user,proxied_user_passwd;
@@ -268,7 +268,7 @@ GRANT PROXY ON proxied_user_3 TO ''@'%%';
GRANT PROXY ON proxied_user_4 TO ''@'%%';
GRANT PROXY ON proxied_user_5 TO ''@'%%';
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
test_plugin_server proxied_user
proxied_user_1 mysql_native_password *551D5A5177FCC3340F7D2FB0F4D8D1EEA7F7EF71
proxied_user_2 mysql_native_password *3D948F77C6A988AFDCA9755AB2A6724362557220
diff --git a/mysql-test/main/plugin_auth_qa_1.test b/mysql-test/main/plugin_auth_qa_1.test
index 4f45a8aced6..81a9155a390 100644
--- a/mysql-test/main/plugin_auth_qa_1.test
+++ b/mysql-test/main/plugin_auth_qa_1.test
@@ -110,7 +110,7 @@ connection default;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
disconnect plug_user;
-UPDATE mysql.user SET user='plug_user' WHERE user='new_user';
+UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -128,15 +128,15 @@ connection default;
disconnect plug_user;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-UPDATE mysql.user SET user='new_user' WHERE user='plug_user';
+UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user';
FLUSH PRIVILEGES;
--sorted_result
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
@@ -144,8 +144,8 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
--error ER_ACCESS_DENIED_ERROR
connect(plug_user,localhost,new_user,new_dest);
--enable_query_log
-UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user';
-UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest';
+UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'test_plugin_server') WHERE user='new_user';
+UPDATE mysql.global_priv SET user='new_dest' WHERE user='plug_dest';
FLUSH PRIVILEGES;
GRANT PROXY ON new_dest TO new_user;
--sorted_result
@@ -154,7 +154,7 @@ connect(plug_user,localhost,new_user,new_dest);
select USER(),CURRENT_USER();
connection default;
disconnect plug_user;
-UPDATE mysql.user SET USER='plug_dest' WHERE user='new_dest';
+UPDATE mysql.global_priv SET user='plug_dest' WHERE user='new_dest';
FLUSH PRIVILEGES;
CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd';
--sorted_result
diff --git a/mysql-test/main/plugin_auth_qa_2.result b/mysql-test/main/plugin_auth_qa_2.result
index ec62840ac4a..e71132e2bc9 100644
--- a/mysql-test/main/plugin_auth_qa_2.result
+++ b/mysql-test/main/plugin_auth_qa_2.result
@@ -6,7 +6,7 @@ CREATE USER qa_test_1_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_1_dest TO qa_test_1_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_1_user qa_auth_interface qa_test_1_dest
SELECT @@proxy_user;
@@ -19,7 +19,7 @@ exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_1_user --password=qa_test_1_
current_user() user() @@local.proxy_user @@local.external_user
qa_test_1_user@% qa_test_1_user@localhost NULL NULL
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_1_user qa_auth_interface qa_test_1_dest
DROP USER qa_test_1_user;
@@ -32,7 +32,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_2_dest identified by 'dest_pas
GRANT PROXY ON qa_test_2_dest TO qa_test_2_user;
GRANT PROXY ON authenticated_as TO qa_test_2_user;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_user qa_auth_interface qa_test_2_dest
@@ -46,7 +46,7 @@ exec MYSQL -h localhost -P MASTER_MYPORT -u qa_test_2_user --password=qa_test_2_
current_user() user() @@local.proxy_user @@local.external_user
authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_2_user qa_auth_interface qa_test_2_dest
@@ -82,9 +82,9 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO ''@'localhost' identified by 'dest_pas
GRANT PROXY ON qa_test_5_dest TO qa_test_5_user;
GRANT PROXY ON qa_test_5_dest TO ''@'localhost';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
- mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
-qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+User plugin authentication_string Password
+ mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_5_user qa_auth_interface qa_test_5_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES)
@@ -97,21 +97,21 @@ CREATE USER qa_test_6_dest IDENTIFIED BY 'dest_passwd';
GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_passwd';
GRANT PROXY ON qa_test_6_dest TO qa_test_6_user;
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
-qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+User plugin authentication_string Password
+qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES)
GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
-qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
+User plugin authentication_string Password
+qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
REVOKE PROXY ON qa_test_6_dest FROM root;
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
-user plugin authentication_string
+User plugin authentication_string
qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22
qa_test_6_user qa_auth_interface qa_test_6_dest
exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1
@@ -120,7 +120,7 @@ DROP USER qa_test_6_user;
DROP USER qa_test_6_dest;
DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface';
SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root';
-user plugin authentication_string password
+User plugin authentication_string Password
=== Test of the --default_auth option for clients ====
CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest';
CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd';
diff --git a/mysql-test/main/processlist.result b/mysql-test/main/processlist.result
index b8e2271530d..ab518d961ef 100644
--- a/mysql-test/main/processlist.result
+++ b/mysql-test/main/processlist.result
@@ -39,7 +39,7 @@ utf8mb4_string xxx😎yyy
Warnings:
Level Warning
Code 1366
-Message Incorrect string value: '\xF0\x9F\x98\x8Eyy...' for column 'INFO' at row 1
+Message Incorrect string value: '\xF0\x9F\x98\x8Eyy...' for column `information_schema`.`(temporary)`.`INFO` at row 1
#
# End of 10.1 tests
#
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index d619b213508..a72b6660288 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -1381,9 +1381,11 @@ test.t1 optimize status Table is already up to date
prepare stmt from "analyze table t1";
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
prepare stmt from "repair table t1, t2, t3";
execute stmt;
@@ -1410,13 +1412,19 @@ test.t3 optimize status Table is already up to date
prepare stmt from "analyze table t1, t2, t3";
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
prepare stmt from "repair table t1, t4, t3";
execute stmt;
@@ -1449,11 +1457,13 @@ execute stmt;
Table Op Msg_type Msg_text
test.t4 analyze Error Table 'test.t4' doesn't exist
test.t4 analyze status Operation failed
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
execute stmt;
Table Op Msg_type Msg_text
test.t4 analyze Error Table 'test.t4' doesn't exist
test.t4 analyze status Operation failed
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
deallocate prepare stmt;
drop table t1, t2, t3;
@@ -1520,6 +1530,7 @@ Field Type Null Key Default Extra
i int(11) YES NULL
execute stmt_analyze;
Table Op Msg_type Msg_text
+mysqltest_long_database_name_to_thrash_heap.t1 analyze status Engine-independent statistics collected
mysqltest_long_database_name_to_thrash_heap.t1 analyze status Table is already up to date
execute stmt_optimize;
Table Op Msg_type Msg_text
@@ -2136,7 +2147,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
@@ -2146,7 +2161,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
@@ -2156,7 +2175,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
call proc_1();
show open tables from mysql;
@@ -2166,7 +2189,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
flush tables;
create function func_1() returns int begin flush tables; return 1; end|
@@ -2181,7 +2208,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
prepare abc from "flush tables";
execute abc;
@@ -2192,7 +2223,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
execute abc;
show open tables from mysql;
@@ -2202,7 +2237,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
execute abc;
show open tables from mysql;
@@ -2212,7 +2251,11 @@ select Host, User from mysql.user limit 0;
Host User
show open tables from mysql;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql global_priv 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
mysql user 0 0
flush tables;
deallocate prepare abc;
@@ -5122,13 +5165,13 @@ DECLARE a DATETIME;
CALL p1(a);
END;
$$
-ERROR 22007: Incorrect datetime value: '10' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 1
BEGIN NOT ATOMIC
DECLARE a DATETIME;
EXECUTE IMMEDIATE 'CALL p1(?)' USING a;
END;
$$
-ERROR 22007: Incorrect datetime value: '10' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 1
BEGIN NOT ATOMIC
DECLARE a DATETIME;
PREPARE stmt FROM 'CALL p1(?)';
@@ -5136,7 +5179,7 @@ EXECUTE stmt USING a;
DEALLOCATE PREPARE stmt;
END;
$$
-ERROR 22007: Incorrect datetime value: '10' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 1
DROP PROCEDURE p1;
#
# MDEV-14454 Binary protocol returns wrong collation ID for SP OUT parameters
@@ -5221,6 +5264,7 @@ CREATE PROCEDURE p1(tn VARCHAR(32))
EXECUTE IMMEDIATE CONCAT('ANALYZE TABLE ',tn);
CALL p1('t1');
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
DROP PROCEDURE p1;
DROP TABLE t1;
diff --git a/mysql-test/main/ps_ddl.result b/mysql-test/main/ps_ddl.result
index 402dc840479..c5c5b5a9ac0 100644
--- a/mysql-test/main/ps_ddl.result
+++ b/mysql-test/main/ps_ddl.result
@@ -769,11 +769,12 @@ deallocate prepare stmt;
#
# Test 3: View referencing an Information schema table
#
-create view t1 as select table_name from information_schema.views;
+create view t1 as select table_name from information_schema.views order by table_name;
prepare stmt from "select * from t1";
execute stmt;
table_name
t1
+user
call p_verify_reprepare_count(0);
SUCCESS
@@ -781,6 +782,7 @@ create temporary table t1 (a int);
execute stmt;
table_name
t1
+user
call p_verify_reprepare_count(0);
SUCCESS
@@ -1405,6 +1407,7 @@ SUCCESS
prepare stmt from "analyze table t1";
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
create table t1 (a1 int, a2 int);
@@ -1412,14 +1415,17 @@ insert into t1 values (1, 10), (2, 20), (3, 30);
# t1 has changed, and it's not a problem
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
alter table t1 add column b varchar(50) default NULL;
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
alter table t1 drop column b;
execute stmt;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
call p_verify_reprepare_count(0);
SUCCESS
diff --git a/mysql-test/main/ps_ddl.test b/mysql-test/main/ps_ddl.test
index 90226d379bf..dafb5b5dea3 100644
--- a/mysql-test/main/ps_ddl.test
+++ b/mysql-test/main/ps_ddl.test
@@ -699,7 +699,7 @@ deallocate prepare stmt;
--echo #
--echo # Test 3: View referencing an Information schema table
--echo #
-create view t1 as select table_name from information_schema.views;
+create view t1 as select table_name from information_schema.views order by table_name;
prepare stmt from "select * from t1";
execute stmt;
diff --git a/mysql-test/main/ps_error.result b/mysql-test/main/ps_error.result
new file mode 100644
index 00000000000..c3c312e82f5
--- /dev/null
+++ b/mysql-test/main/ps_error.result
@@ -0,0 +1,73 @@
+#
+# MDEV-17741 Assertion `thd->Item_change_list::is_empty()' failed in mysql_parse after unsuccessful PS
+#
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'foo'
+EXECUTE stmt;
+ERROR 22007: Truncated incorrect INTEGER value: 'foo'
+SELECT a FROM t1 GROUP BY NULL WITH ROLLUP;
+a
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'foo'
+EXECUTE stmt;
+ERROR 22007: Truncated incorrect INTEGER value: 'foo'
+SET @a = REPLACE( @@global.optimizer_switch, '=on', '=off' ) ;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-17738 Server crashes in Item::delete_self on closing connection after unsuccessful PS
+#
+SET SQL_MODE='STRICT_ALL_TABLES';
+PREPARE stmt FROM "CREATE TABLE ps AS SELECT 1 FROM DUAL WHERE 'foo' && 0";
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'foo'
+EXECUTE stmt;
+ERROR 22007: Truncated incorrect INTEGER value: 'foo'
+SELECT 'All done';
+All done
+All done
+SET SQL_MODE=DEFAULT;
+SET SQL_MODE='STRICT_ALL_TABLES';
+PREPARE stmt FROM "CREATE TABLE ps AS SELECT 1 FROM DUAL WHERE 'foo' && 0";
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'foo'
+EXECUTE stmt;
+ERROR 22007: Truncated incorrect INTEGER value: 'foo'
+DEALLOCATE PREPARE stmt;
+SELECT 'All done';
+All done
+All done
+SET SQL_MODE=DEFAULT;
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'foo'
+EXECUTE stmt;
+ERROR 22007: Truncated incorrect INTEGER value: 'foo'
+SELECT a FROM t1 GROUP BY a;
+a
+SELECT * FROM t1;
+a
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'foo'
+EXECUTE stmt;
+ERROR 22007: Truncated incorrect INTEGER value: 'foo'
+SELECT a FROM t1 GROUP BY a;
+a
+INSERT t1 SELECT * FROM ( SELECT * FROM t1 ) sq;
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
diff --git a/mysql-test/main/ps_error.test b/mysql-test/main/ps_error.test
new file mode 100644
index 00000000000..5efb5d36137
--- /dev/null
+++ b/mysql-test/main/ps_error.test
@@ -0,0 +1,66 @@
+#
+# Tests related to PS returning errors rather than doing successfull execution
+#
+
+--echo #
+--echo # MDEV-17741 Assertion `thd->Item_change_list::is_empty()' failed in mysql_parse after unsuccessful PS
+--echo #
+
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+--error ER_TRUNCATED_WRONG_VALUE
+EXECUTE stmt;
+SELECT a FROM t1 GROUP BY NULL WITH ROLLUP;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+--error ER_TRUNCATED_WRONG_VALUE
+EXECUTE stmt;
+SET @a = REPLACE( @@global.optimizer_switch, '=on', '=off' ) ;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+--echo #
+--echo # MDEV-17738 Server crashes in Item::delete_self on closing connection after unsuccessful PS
+--echo #
+
+SET SQL_MODE='STRICT_ALL_TABLES';
+PREPARE stmt FROM "CREATE TABLE ps AS SELECT 1 FROM DUAL WHERE 'foo' && 0";
+--error ER_TRUNCATED_WRONG_VALUE
+EXECUTE stmt;
+--source include/restart_mysqld.inc
+SELECT 'All done';
+SET SQL_MODE=DEFAULT;
+
+SET SQL_MODE='STRICT_ALL_TABLES';
+PREPARE stmt FROM "CREATE TABLE ps AS SELECT 1 FROM DUAL WHERE 'foo' && 0";
+--error ER_TRUNCATED_WRONG_VALUE
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+SELECT 'All done';
+SET SQL_MODE=DEFAULT;
+
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+--error ER_TRUNCATED_WRONG_VALUE
+EXECUTE stmt;
+SELECT a FROM t1 GROUP BY a;
+SELECT * FROM t1;
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
+
+SET SQL_MODE= 'STRICT_ALL_TABLES';
+CREATE TABLE t1 (a INT);
+PREPARE stmt FROM "CREATE TABLE tmp AS SELECT * FROM t1 WHERE 'foo' && 0";
+--error ER_TRUNCATED_WRONG_VALUE
+EXECUTE stmt;
+SELECT a FROM t1 GROUP BY a;
+INSERT t1 SELECT * FROM ( SELECT * FROM t1 ) sq;
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result
index 83237a9d2d4..8bef87d303b 100644
--- a/mysql-test/main/range.result
+++ b/mysql-test/main/range.result
@@ -421,7 +421,9 @@ count(*)
1026
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1938,6 +1940,7 @@ alter table t1 add key2 int not null, add index i2(key2);
update t1 set key2=key1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create table t2 (a int);
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8);
@@ -2112,22 +2115,22 @@ SELECT * FROM t1 WHERE fd='ðŸ˜';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
SELECT * FROM t1 WHERE fd='ðŸ˜';
id fd
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
# The following must not use range access:
explain select count(*) from t1 where fd <'ðŸ˜';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
select count(*) from t1 where fd <'ðŸ˜';
count(*)
40960
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
select count(*) from t1 ignore index (ix_fd) where fd <'ðŸ˜';
count(*)
40960
@@ -2140,6 +2143,7 @@ insert into t2 select * from t2;
insert into t2 values (0, 0, 0, 0), (1, 1, 1, 1);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select a, b from t2 where (a, b) in ((0, 0), (1, 1));
a b
@@ -2349,7 +2353,7 @@ EXPLAIN SELECT * FROM t1 WHERE a<=>'😎';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column 'a' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
#
# MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in
@@ -2529,7 +2533,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 3,
- "filtered": 100,
+ "filtered": 60,
"index_condition": "t2.d is not null",
"attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))"
},
@@ -2585,8 +2589,8 @@ insert into t2 values
explain select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 6 Using index condition
-1 SIMPLE t2 ref|filter idx1,idx2 idx1|idx2 5|5 test.t1.a 12 (14%) Using where; Using filter
+1 SIMPLE t2 range|filter idx1,idx2 idx1|idx2 5|5 NULL 8 (14%) Using index condition; Using where; Using filter
+1 SIMPLE t1 ref idx idx 5 test.t2.d 8
explain format=json select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
EXPLAIN
@@ -2594,24 +2598,12 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "t1",
- "access_type": "range",
- "possible_keys": ["idx"],
- "key": "idx",
- "key_length": "5",
- "used_key_parts": ["a"],
- "rows": 6,
- "filtered": 100,
- "index_condition": "t1.a is not null"
- },
- "table": {
"table_name": "t2",
- "access_type": "ref",
+ "access_type": "range",
"possible_keys": ["idx1", "idx2"],
"key": "idx1",
"key_length": "5",
"used_key_parts": ["d"],
- "ref": ["test.t1.a"],
"rowid_filter": {
"range": {
"key": "idx2",
@@ -2620,9 +2612,21 @@ EXPLAIN
"rows": 15,
"selectivity_pct": 14.423
},
- "rows": 12,
- "filtered": 100,
- "attached_condition": "(t1.a,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
+ "rows": 8,
+ "filtered": 14.423,
+ "index_condition": "t2.d is not null",
+ "attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
+ },
+ "table": {
+ "table_name": "t1",
+ "access_type": "ref",
+ "possible_keys": ["idx"],
+ "key": "idx",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.d"],
+ "rows": 8,
+ "filtered": 100
}
}
}
@@ -2630,16 +2634,16 @@ select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
a b c d e f
3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuua 3 3 i
3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
3 3 zyxa 3 3 i
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
3 3 zyxa 3 3 i
7 7 xxxyy 7 7 h
7 7 xxxya 7 7 h
@@ -2650,16 +2654,16 @@ where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1";
execute stmt;
a b c d e f
3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuua 3 3 i
3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
3 3 zyxa 3 3 i
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
3 3 zyxa 3 3 i
7 7 xxxyy 7 7 h
7 7 xxxya 7 7 h
@@ -2668,16 +2672,16 @@ a b c d e f
execute stmt;
a b c d e f
3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuua 3 3 i
3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
3 3 zyxa 3 3 i
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
3 3 zyxa 3 3 i
7 7 xxxyy 7 7 h
7 7 xxxya 7 7 h
@@ -2714,7 +2718,7 @@ EXPLAIN
"selectivity_pct": 6.7308
},
"rows": 7,
- "filtered": 100,
+ "filtered": 6.7308,
"index_condition": "t2.d is not null",
"attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
},
@@ -3066,6 +3070,7 @@ insert into t1 select a+15, concat(b,'yy') from t1;
insert into t1 select a+100, concat(b,'xx') from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1;
rec_per_key
@@ -3084,7 +3089,7 @@ a b
set eq_range_index_dive_limit=2;
explain select * from t1 where a in (8, 15, 31, 1, 9);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 10 Using index condition
+1 SIMPLE t1 range idx idx 5 NULL 5 Using index condition
select * from t1 where a in (8, 15, 31, 1, 9);
a b
1 yy
diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result
index 794e6c7b3cc..30161a2711d 100644
--- a/mysql-test/main/range_innodb.result
+++ b/mysql-test/main/range_innodb.result
@@ -30,6 +30,7 @@ repeat('0123456789', 10)
from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
# The following must not use "Range checked for each record":
explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
@@ -37,3 +38,45 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10
1 SIMPLE t2 range a,b b 5 NULL 201 Using where; Using join buffer (flat, BNL join)
drop table t0,t1,t2;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1),
+KEY(f1), KEY(f2)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(1,4,'v',NULL),(2,6,'v',NULL),(3,7,'c',NULL),(4,1,'e',NULL),(5,0,'x',NULL),
+(6,7,'i',NULL),(7,7,'e',NULL),(8,1,'p',NULL),(9,7,'s',NULL),(10,1,'j',NULL),
+(11,5,'z',NULL),(12,2,'c',NULL),(13,0,'a',NULL),(14,1,'q',NULL),(15,8,'y',NULL),
+(16,1,'m',NULL),(17,1,'r',NULL),(18,9,'v',NULL),(19,1,'n',NULL);
+CREATE TABLE t2 (f4 INT, f5 CHAR(1)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4,'q'),(NULL,'j');
+SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2
+WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 );
+pk f1 f2 f3 pk f1 f2 f3 f4 f5
+1 4 v NULL 14 1 q NULL 4 q
+2 6 v NULL 14 1 q NULL 4 q
+3 7 c NULL 14 1 q NULL 4 q
+drop table t1,t2;
+#
+# MDEV-14440: Server crash in in handler::ha_external_lock or Assertion `inited==RND'
+# failed in handler::ha_rnd_end upon SELECT from partitioned table
+#
+set @optimizer_switch_save= @@optimizer_switch;
+set optimizer_switch='index_merge_sort_intersection=off';
+create table t0 (a int)engine=innodb;
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+a int, b int, c int,
+key(a),key(b),key(c)
+)engine=innodb;
+insert into t1
+select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a
+from t0 A, t0 B, t0 C, t0 D where D.a<5;
+set @@global.debug_dbug="+d,ha_index_init_fail";
+explain select * from t1 where a=10 and b=10;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 1 Using intersect(a,b); Using where
+select * from t1 where a=10 and b=10;
+ERROR HY000: Table definition has changed, please retry transaction
+DROP TABLE t0,t1;
+set @@global.debug_dbug="-d";
+set @@optimizer_switch= @optimizer_switch_save;
diff --git a/mysql-test/main/range_innodb.test b/mysql-test/main/range_innodb.test
index f76794814ef..a17ef3f1146 100644
--- a/mysql-test/main/range_innodb.test
+++ b/mysql-test/main/range_innodb.test
@@ -3,6 +3,7 @@
--echo #
--source include/have_innodb.inc
+--source include/have_debug.inc
--disable_warnings
drop table if exists t0, t1, t2;
@@ -45,3 +46,44 @@ explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
drop table t0,t1,t2;
+CREATE TABLE t1 (
+ pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1),
+ KEY(f1), KEY(f2)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+(1,4,'v',NULL),(2,6,'v',NULL),(3,7,'c',NULL),(4,1,'e',NULL),(5,0,'x',NULL),
+(6,7,'i',NULL),(7,7,'e',NULL),(8,1,'p',NULL),(9,7,'s',NULL),(10,1,'j',NULL),
+(11,5,'z',NULL),(12,2,'c',NULL),(13,0,'a',NULL),(14,1,'q',NULL),(15,8,'y',NULL),
+(16,1,'m',NULL),(17,1,'r',NULL),(18,9,'v',NULL),(19,1,'n',NULL);
+
+CREATE TABLE t2 (f4 INT, f5 CHAR(1)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4,'q'),(NULL,'j');
+
+SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2
+WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 );
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-14440: Server crash in in handler::ha_external_lock or Assertion `inited==RND'
+--echo # failed in handler::ha_rnd_end upon SELECT from partitioned table
+--echo #
+
+set @optimizer_switch_save= @@optimizer_switch;
+set optimizer_switch='index_merge_sort_intersection=off';
+create table t0 (a int)engine=innodb;
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+ a int, b int, c int,
+ key(a),key(b),key(c)
+)engine=innodb;
+insert into t1
+select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a
+from t0 A, t0 B, t0 C, t0 D where D.a<5;
+set @@global.debug_dbug="+d,ha_index_init_fail";
+explain select * from t1 where a=10 and b=10;
+--error ER_TABLE_DEF_CHANGED
+select * from t1 where a=10 and b=10;
+DROP TABLE t0,t1;
+set @@global.debug_dbug="-d";
+set @@optimizer_switch= @optimizer_switch_save;
diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result
index a4a64dd1bbe..5d55a820673 100644
--- a/mysql-test/main/range_mrr_icp.result
+++ b/mysql-test/main/range_mrr_icp.result
@@ -424,7 +424,9 @@ count(*)
1026
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1941,6 +1943,7 @@ alter table t1 add key2 int not null, add index i2(key2);
update t1 set key2=key1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create table t2 (a int);
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8);
@@ -2115,22 +2118,22 @@ SELECT * FROM t1 WHERE fd='ðŸ˜';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
SELECT * FROM t1 WHERE fd='ðŸ˜';
id fd
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
# The following must not use range access:
explain select count(*) from t1 where fd <'ðŸ˜';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
select count(*) from t1 where fd <'ðŸ˜';
count(*)
40960
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'fd' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1
select count(*) from t1 ignore index (ix_fd) where fd <'ðŸ˜';
count(*)
40960
@@ -2143,6 +2146,7 @@ insert into t2 select * from t2;
insert into t2 values (0, 0, 0, 0), (1, 1, 1, 1);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select a, b from t2 where (a, b) in ((0, 0), (1, 1));
a b
@@ -2352,7 +2356,7 @@ EXPLAIN SELECT * FROM t1 WHERE a<=>'😎';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column 'a' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
#
# MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in
@@ -2535,7 +2539,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 3,
- "filtered": 100,
+ "filtered": 60,
"index_condition": "t2.d is not null",
"attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))",
"mrr_type": "Rowid-ordered scan"
@@ -2592,8 +2596,8 @@ insert into t2 values
explain select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 6 Using index condition; Rowid-ordered scan
-1 SIMPLE t2 ref idx1,idx2 idx1 5 test.t1.a 12 Using where
+1 SIMPLE t2 range idx1,idx2 idx1 5 NULL 8 Using index condition; Using where; Rowid-ordered scan
+1 SIMPLE t1 ref idx idx 5 test.t2.d 8
explain format=json select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
EXPLAIN
@@ -2601,88 +2605,88 @@ EXPLAIN
"query_block": {
"select_id": 1,
"table": {
- "table_name": "t1",
+ "table_name": "t2",
"access_type": "range",
- "possible_keys": ["idx"],
- "key": "idx",
+ "possible_keys": ["idx1", "idx2"],
+ "key": "idx1",
"key_length": "5",
- "used_key_parts": ["a"],
- "rows": 6,
- "filtered": 100,
- "index_condition": "t1.a is not null",
+ "used_key_parts": ["d"],
+ "rows": 8,
+ "filtered": 14.423,
+ "index_condition": "t2.d is not null",
+ "attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1",
"mrr_type": "Rowid-ordered scan"
},
"table": {
- "table_name": "t2",
+ "table_name": "t1",
"access_type": "ref",
- "possible_keys": ["idx1", "idx2"],
- "key": "idx1",
+ "possible_keys": ["idx"],
+ "key": "idx",
"key_length": "5",
- "used_key_parts": ["d"],
- "ref": ["test.t1.a"],
- "rows": 12,
- "filtered": 100,
- "attached_condition": "(t1.a,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1"
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.d"],
+ "rows": 8,
+ "filtered": 100
}
}
}
select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1;
a b c d e f
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-7 8 xxxxx 7 7 h
-7 7 xxxyy 7 7 h
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 3 zzza 3 3 i
3 3 zzza 3 3 i
-7 8 xxxxa 7 7 h
-7 7 xxxya 7 7 h
-3 3 zyxa 3 3 i
3 3 zyxa 3 3 i
+7 7 xxxyy 7 7 h
+7 7 xxxya 7 7 h
+7 8 xxxxx 7 7 h
+7 8 xxxxa 7 7 h
+3 2 uuuw 3 3 i
3 2 uuua 3 3 i
-3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
+3 3 zyxa 3 3 i
prepare stmt from "select * from t1,t2
where a = d and (a,e) in ((3,3),(7,7),(8,8)) and length(f) = 1";
execute stmt;
a b c d e f
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-7 8 xxxxx 7 7 h
-7 7 xxxyy 7 7 h
-3 3 zyxw 3 3 i
3 3 zyxw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
-3 3 zzza 3 3 i
3 3 zzza 3 3 i
-7 8 xxxxa 7 7 h
-7 7 xxxya 7 7 h
-3 3 zyxa 3 3 i
3 3 zyxa 3 3 i
+7 7 xxxyy 7 7 h
+7 7 xxxya 7 7 h
+7 8 xxxxx 7 7 h
+7 8 xxxxa 7 7 h
+3 2 uuuw 3 3 i
3 2 uuua 3 3 i
-3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
+3 3 zyxa 3 3 i
execute stmt;
a b c d e f
+3 2 uuuw 3 3 i
+3 2 uuua 3 3 i
3 3 zzzz 3 3 i
-3 3 zzzz 3 3 i
-7 8 xxxxx 7 7 h
-7 7 xxxyy 7 7 h
3 3 zyxw 3 3 i
-3 3 zyxw 3 3 i
-3 2 uuuw 3 3 i
-3 2 uuuw 3 3 i
3 3 zzza 3 3 i
-3 3 zzza 3 3 i
-7 8 xxxxa 7 7 h
-7 7 xxxya 7 7 h
3 3 zyxa 3 3 i
-3 3 zyxa 3 3 i
-3 2 uuua 3 3 i
+7 7 xxxyy 7 7 h
+7 7 xxxya 7 7 h
+7 8 xxxxx 7 7 h
+7 8 xxxxa 7 7 h
+3 2 uuuw 3 3 i
3 2 uuua 3 3 i
+3 3 zzzz 3 3 i
+3 3 zyxw 3 3 i
+3 3 zzza 3 3 i
+3 3 zyxa 3 3 i
deallocate prepare stmt;
insert into t1 select * from t1;
# join order: (t2,t1) with ref access of t1
@@ -2706,7 +2710,7 @@ EXPLAIN
"key_length": "5",
"used_key_parts": ["d"],
"rows": 7,
- "filtered": 100,
+ "filtered": 6.7308,
"index_condition": "t2.d is not null",
"attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and octet_length(t2.f) = 1",
"mrr_type": "Rowid-ordered scan"
@@ -3063,6 +3067,7 @@ insert into t1 select a+15, concat(b,'yy') from t1;
insert into t1 select a+100, concat(b,'xx') from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1;
rec_per_key
@@ -3081,7 +3086,7 @@ a b
set eq_range_index_dive_limit=2;
explain select * from t1 where a in (8, 15, 31, 1, 9);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 5 NULL 10 Using index condition; Rowid-ordered scan
+1 SIMPLE t1 range idx idx 5 NULL 5 Using index condition; Rowid-ordered scan
select * from t1 where a in (8, 15, 31, 1, 9);
a b
1 yy
diff --git a/mysql-test/main/range_vs_index_merge.result b/mysql-test/main/range_vs_index_merge.result
index d332156659f..82d2358cebc 100644
--- a/mysql-test/main/range_vs_index_merge.result
+++ b/mysql-test/main/range_vs_index_merge.result
@@ -1079,7 +1079,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Country,CountryPopulation,CountryName,CityName CountryName,CityName 38,35 NULL 28 Using sort_union(CountryName,CityName); Using where
+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CityName 35 NULL 27 Using index condition; Using where
SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR
@@ -1110,32 +1110,32 @@ SELECT Name, Country, Population FROM City WHERE
(Name='Seattle' AND Country='USA');
Name Country Population
Addis Abeba ETH 2495000
-Manila PHL 1581082
-Jakarta IDN 9604900
-Delhi IND 7206704
+Ankara TUR 3038159
Bangalore IND 2660088
-Teheran IRN 6758845
-Roma ITA 2643581
-Venezia ITA 277305
-Tokyo JPN 7980230
-Toronto CAN 688275
-Vancouver CAN 514008
-Peking CHN 7472000
-Seoul KOR 9981619
+Basel CHE 166700
+Caracas VEN 1975294
+Dakar SEN 785071
+Delhi IND 7206704
+Dresden DEU 476668
+Jakarta IDN 9604900
Kaunas LTU 412639
-Rabat MAR 623457
-Tijuana MEX 1212232
Lagos NGA 1518000
+Lugansk UKR 469000
+Manila PHL 1581082
Paris FRA 2125246
-Dresden DEU 476668
-Dakar SEN 785071
-Basel CHE 166700
+Peking CHN 7472000
Praha CZE 1181126
-Ankara TUR 3038159
-Lugansk UKR 469000
-Caracas VEN 1975294
+Rabat MAR 623457
+Roma ITA 2643581
Samara RUS 1156100
Seattle USA 563374
+Seoul KOR 9981619
+Teheran IRN 6758845
+Tijuana MEX 1212232
+Tokyo JPN 7980230
+Toronto CAN 688275
+Vancouver CAN 514008
+Venezia ITA 277305
set optimizer_switch='index_merge=off';
EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
@@ -1166,7 +1166,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 28 Using index condition; Using where
+1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CityName 35 NULL 27 Using index condition; Using where
SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR
@@ -1196,33 +1196,33 @@ SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA');
Name Country Population
-Toronto CAN 688275
-Vancouver CAN 514008
-Basel CHE 166700
-Peking CHN 7472000
-Praha CZE 1181126
-Dresden DEU 476668
Addis Abeba ETH 2495000
-Paris FRA 2125246
-Jakarta IDN 9604900
+Ankara TUR 3038159
Bangalore IND 2660088
+Basel CHE 166700
+Caracas VEN 1975294
+Dakar SEN 785071
Delhi IND 7206704
-Teheran IRN 6758845
-Roma ITA 2643581
-Venezia ITA 277305
-Tokyo JPN 7980230
-Seoul KOR 9981619
+Dresden DEU 476668
+Jakarta IDN 9604900
Kaunas LTU 412639
-Rabat MAR 623457
-Tijuana MEX 1212232
Lagos NGA 1518000
+Lugansk UKR 469000
Manila PHL 1581082
+Paris FRA 2125246
+Peking CHN 7472000
+Praha CZE 1181126
+Rabat MAR 623457
+Roma ITA 2643581
Samara RUS 1156100
-Dakar SEN 785071
-Ankara TUR 3038159
-Lugansk UKR 469000
Seattle USA 563374
-Caracas VEN 1975294
+Seoul KOR 9981619
+Teheran IRN 6758845
+Tijuana MEX 1212232
+Tokyo JPN 7980230
+Toronto CAN 688275
+Vancouver CAN 514008
+Venezia ITA 277305
set optimizer_switch=@save_optimizer_switch;
#
# Bug mdev-585: range vs index-merge with ORDER BY ... LIMIT n
@@ -1343,6 +1343,38 @@ Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
+set @tmp_mdev585=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=1;
+EXPLAIN
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE City range Country,Name,Population Population 4 NULL # Using where
+FLUSH STATUS;
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+ID Name Country Population
+519 Worthing GBR 100000
+638 al-Arish EGY 100447
+518 Basildon GBR 100924
+707 Marbella ESP 101144
+3792 Tartu EST 101246
+SHOW STATUS LIKE 'Handler_read_%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 59
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+set optimizer_use_condition_selectivity=@tmp_mdev585;
set optimizer_switch='index_merge=off';
EXPLAIN
SELECT * FROM City
@@ -1430,6 +1462,7 @@ insert into t1(account_id, login, home_state, work_state)
select 1, 'pw', 'ak', 'ak' from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where account_id = 1;
count(*)
@@ -1491,6 +1524,7 @@ insert into t1 (c2, c3, c4, c5, cp)
select c2, c3, c4, c5, cp from t1 where cp = 4;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select * from t1 where (c2=1 and c3=1) or (c4=2 and c5=1);
@@ -1543,6 +1577,7 @@ insert into t1 (c2,c3,c4) select c2,c3,3 from t1 where c2 != 'a';
insert into t1 (c2,c3,c4) select c2,c3,4 from t1 where c2 != 'a';
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where (c2='e' OR c3='q');
count(*)
@@ -1582,6 +1617,7 @@ update t1 set c1=lpad(id+1000, 12, ' '), c2=lpad(id+10000, 15, ' ');
alter table t1 add unique index (c1), add unique index (c2), add index (c3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
explain
select * from t1 where (c1=' 100000' or c2=' 2000000');
@@ -1715,6 +1751,7 @@ INSERT INTO t1 VALUES
(0,72,321,-7),(0,73,0,3),(0,74,5,25),(0,75,5,3);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET SESSION optimizer_switch='index_merge_sort_union=off';
EXPLAIN
@@ -1795,6 +1832,7 @@ INSERT INTO t1 VALUES
;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN
SELECT * FROM t1 FORCE KEY (state,capital)
@@ -1862,23 +1900,23 @@ Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
Country='ITA' AND Name IN ('Napoli', 'Venezia');
ID Name Country Population
175 Antwerpen BEL 446525
-176 Gent BEL 224180
+2808 Bergen NOR 230948
3068 Berlin DEU 3386667
3087 Bonn DEU 301048
+2918 Braga PRT 90535
+176 Gent BEL 224180
3242 Lahti FIN 96921
-2974 Paris FRA 2125246
+3580 Moscow RUS 8389200
1466 Napoli ITA 1002619
-1474 Venezia ITA 277305
-2808 Bergen NOR 230948
2807 Oslo NOR 508726
-2928 Warszawa POL 1615369
-2931 Wroclaw POL 636765
-2918 Braga PRT 90535
+2974 Paris FRA 2125246
2915 Porto PRT 273060
-3580 Moscow RUS 8389200
3581 St Petersburg RUS 4694000
3048 Stockholm SWE 750348
3051 Uppsala SWE 189569
+1474 Venezia ITA 277305
+2928 Warszawa POL 1615369
+2931 Wroclaw POL 636765
explain select * from City
where
Country='FIN' AND Name IN ('Lahti','Imatra') OR
@@ -1892,6 +1930,6 @@ Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
Country='ITA' AND Name IN ('Napoli', 'Venezia');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where
+1 SIMPLE City range CountryName,Name Name 35 NULL 20 Using index condition; Using where
DROP DATABASE world;
set session optimizer_switch='index_merge_sort_intersection=default';
diff --git a/mysql-test/main/range_vs_index_merge.test b/mysql-test/main/range_vs_index_merge.test
index 0cff070fe68..7f7915ad6b4 100644
--- a/mysql-test/main/range_vs_index_merge.test
+++ b/mysql-test/main/range_vs_index_merge.test
@@ -718,6 +718,23 @@ SELECT * FROM City
ORDER BY Population LIMIT 5;
SHOW STATUS LIKE 'Handler_read_%';
+set @tmp_mdev585=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=1;
+--replace_column 9 #
+EXPLAIN
+SELECT * FROM City
+ WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+ AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+
+FLUSH STATUS;
+SELECT * FROM City
+ WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+ AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+SHOW STATUS LIKE 'Handler_read_%';
+
+set optimizer_use_condition_selectivity=@tmp_mdev585;
set optimizer_switch='index_merge=off';
diff --git a/mysql-test/main/range_vs_index_merge_innodb.result b/mysql-test/main/range_vs_index_merge_innodb.result
index 8b592c710a8..f085cf792ab 100644
--- a/mysql-test/main/range_vs_index_merge_innodb.result
+++ b/mysql-test/main/range_vs_index_merge_innodb.result
@@ -1349,6 +1349,38 @@ Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
+set @tmp_mdev585=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=1;
+EXPLAIN
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE City range Country,Name,Population Population 4 NULL # Using where
+FLUSH STATUS;
+SELECT * FROM City
+WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'H'))
+AND (Population >= 100000 AND Population < 120000)
+ORDER BY Population LIMIT 5;
+ID Name Country Population
+519 Worthing GBR 100000
+638 al-Arish EGY 100447
+518 Basildon GBR 100924
+707 Marbella ESP 101144
+3792 Tartu EST 101246
+SHOW STATUS LIKE 'Handler_read_%';
+Variable_name Value
+Handler_read_first 0
+Handler_read_key 1
+Handler_read_last 0
+Handler_read_next 59
+Handler_read_prev 0
+Handler_read_retry 0
+Handler_read_rnd 0
+Handler_read_rnd_deleted 0
+Handler_read_rnd_next 0
+set optimizer_use_condition_selectivity=@tmp_mdev585;
set optimizer_switch='index_merge=off';
EXPLAIN
SELECT * FROM City
@@ -1436,6 +1468,7 @@ insert into t1(account_id, login, home_state, work_state)
select 1, 'pw', 'ak', 'ak' from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where account_id = 1;
count(*)
@@ -1497,6 +1530,7 @@ insert into t1 (c2, c3, c4, c5, cp)
select c2, c3, c4, c5, cp from t1 where cp = 4;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select * from t1 where (c2=1 and c3=1) or (c4=2 and c5=1);
@@ -1549,6 +1583,7 @@ insert into t1 (c2,c3,c4) select c2,c3,3 from t1 where c2 != 'a';
insert into t1 (c2,c3,c4) select c2,c3,4 from t1 where c2 != 'a';
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select count(*) from t1 where (c2='e' OR c3='q');
count(*)
@@ -1588,6 +1623,7 @@ update t1 set c1=lpad(id+1000, 12, ' '), c2=lpad(id+10000, 15, ' ');
alter table t1 add unique index (c1), add unique index (c2), add index (c3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain
select * from t1 where (c1=' 100000' or c2=' 2000000');
diff --git a/mysql-test/main/read_only.result b/mysql-test/main/read_only.result
index 2029413c0f0..83dfada5f29 100644
--- a/mysql-test/main/read_only.result
+++ b/mysql-test/main/read_only.result
@@ -170,11 +170,24 @@ flush privileges;
drop database mysqltest_db1;
set global read_only= @start_read_only;
#
+# MDEV-16987 - ALTER DATABASE possible in read-only mode
+#
+CREATE USER user1@localhost;
+GRANT ALTER ON test1.* TO user1@localhost;
+CREATE DATABASE test1;
+SET GLOBAL read_only=1;
+ALTER DATABASE test1 CHARACTER SET utf8;
+ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
+SET GLOBAL read_only=0;
+DROP DATABASE test1;
+DROP USER user1@localhost;
+USE test;
+# End of 5.5 tests
+#
# WL#5968 Implement START TRANSACTION READ (WRITE|ONLY);
#
#
# Test interaction with read_only system variable.
-DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1), (2);
CREATE USER user1;
@@ -211,3 +224,4 @@ connection default;
DROP USER user1;
SET GLOBAL read_only= 0;
DROP TABLE t1;
+# End of 10.0 tests
diff --git a/mysql-test/main/read_only.test b/mysql-test/main/read_only.test
index a05f813346e..5314b11154f 100644
--- a/mysql-test/main/read_only.test
+++ b/mysql-test/main/read_only.test
@@ -283,6 +283,23 @@ flush privileges;
drop database mysqltest_db1;
set global read_only= @start_read_only;
+--echo #
+--echo # MDEV-16987 - ALTER DATABASE possible in read-only mode
+--echo #
+CREATE USER user1@localhost;
+GRANT ALTER ON test1.* TO user1@localhost;
+CREATE DATABASE test1;
+SET GLOBAL read_only=1;
+change_user user1;
+--error ER_OPTION_PREVENTS_STATEMENT
+ALTER DATABASE test1 CHARACTER SET utf8;
+change_user root;
+SET GLOBAL read_only=0;
+DROP DATABASE test1;
+DROP USER user1@localhost;
+USE test;
+
+--echo # End of 5.5 tests
--echo #
--echo # WL#5968 Implement START TRANSACTION READ (WRITE|ONLY);
@@ -291,10 +308,6 @@ set global read_only= @start_read_only;
--echo #
--echo # Test interaction with read_only system variable.
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1), (2);
@@ -344,3 +357,5 @@ DROP TABLE t1;
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
+
+--echo # End of 10.0 tests
diff --git a/mysql-test/main/row.result b/mysql-test/main/row.result
index 2d4ebc35b84..40d3e2640f0 100644
--- a/mysql-test/main/row.result
+++ b/mysql-test/main/row.result
@@ -483,7 +483,7 @@ select * from t1,t2 where (a,b) = (c,d);
a b c d
abc 1 abc 1
select host,user from mysql.user where (host,user) = ('localhost','test');
-host user
+Host User
drop table t1,t2;
#
# Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result
index 220f500e37a..230bef68467 100644
--- a/mysql-test/main/select.result
+++ b/mysql-test/main/select.result
@@ -3453,6 +3453,7 @@ create table t2 (a int, b int, c int, e int, primary key(a,b,c));
insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
Z
@@ -3749,12 +3750,14 @@ CREATE TABLE t1 (a INT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDAT
INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result
index bc86a27bce9..a27585ce0c4 100644
--- a/mysql-test/main/select_jcl6.result
+++ b/mysql-test/main/select_jcl6.result
@@ -3464,6 +3464,7 @@ create table t2 (a int, b int, c int, e int, primary key(a,b,c));
insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
Z
@@ -3760,12 +3761,14 @@ CREATE TABLE t1 (a INT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDAT
INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index 220f500e37a..230bef68467 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -3453,6 +3453,7 @@ create table t2 (a int, b int, c int, e int, primary key(a,b,c));
insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
Z
@@ -3749,12 +3750,14 @@ CREATE TABLE t1 (a INT, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDAT
INSERT INTO t1 VALUES (30,"2006-01-03 23:00:00"), (31,"2006-01-03 23:00:00");
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE TABLE t2 (a INT, dt1 DATETIME, dt2 DATETIME, PRIMARY KEY (a));
INSERT INTO t2 VALUES (30, "2006-01-01 00:00:00", "2999-12-31 00:00:00");
INSERT INTO t2 SELECT a+1,dt1,dt2 FROM t2;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
diff --git a/mysql-test/main/select_safe.result b/mysql-test/main/select_safe.result
index 60364b8c4ec..649e2dc484e 100644
--- a/mysql-test/main/select_safe.result
+++ b/mysql-test/main/select_safe.result
@@ -62,19 +62,20 @@ a b
5 a
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
insert into t1 values (null,"b"),(null,"b"),(null,"c"),(null,"c"),(null,"d"),(null,"d"),(null,"e"),(null,"e"),(null,"a"),(null,"e");
insert into t1 values (null,"x"),(null,"x"),(null,"y"),(null,"y"),(null,"z"),(null,"z"),(null,"v"),(null,"v"),(null,"a"),(null,"v");
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL 41 Using where
-1 SIMPLE t2 ref b b 21 test.t1.b 6
+1 SIMPLE t1 ALL b NULL NULL NULL 11
+1 SIMPLE t2 ALL b NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
set MAX_SEEKS_FOR_KEY=1;
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL b NULL NULL NULL 41 Using where
-1 SIMPLE t2 ref b b 21 test.t1.b 6
+1 SIMPLE t1 ALL b NULL NULL NULL 11
+1 SIMPLE t2 ALL b NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
SET MAX_SEEKS_FOR_KEY=DEFAULT;
drop table t1;
create table t1 (a int);
diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result
index 921bd20fc69..93917065722 100644
--- a/mysql-test/main/selectivity_innodb.result
+++ b/mysql-test/main/selectivity_innodb.result
@@ -1150,7 +1150,6 @@ alter table t1 change column a a int;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
-test.t1 analyze Note Data truncated for column 'avg_frequency' at row 1
test.t1 analyze status OK
flush table t1;
explain extended select * from t1 where a between 5 and 7;
diff --git a/mysql-test/main/session_tracker_last_gtid.result b/mysql-test/main/session_tracker_last_gtid.result
index deffeca1333..795d0aaa2a2 100644
--- a/mysql-test/main/session_tracker_last_gtid.result
+++ b/mysql-test/main/session_tracker_last_gtid.result
@@ -2,13 +2,7 @@
# MDEV-15477: SESSION_SYSVARS_TRACKER does not track last_gtid
#
SET gtid_seq_no=1000;
--- Tracker : SESSION_TRACK_SCHEMA
--- test
-
SET @@session.session_track_system_variables='last_gtid';
--- Tracker : SESSION_TRACK_SCHEMA
--- test
-
create table t1 (a int) engine=innodb;
-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES
-- last_gtid
diff --git a/mysql-test/main/set_password.result b/mysql-test/main/set_password.result
index 82154c6ae8c..bb1124e09d4 100644
--- a/mysql-test/main/set_password.result
+++ b/mysql-test/main/set_password.result
@@ -8,13 +8,13 @@ create user oldpass@localhost identified by password '378b243e220ca493';
create user oldpassold@localhost identified with 'mysql_old_password';
set password for oldpassold@localhost = '378b243e220ca493';
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
-user host password plugin authentication_string
-natauth localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
-newpass localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
-newpassnat localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
-oldauth localhost mysql_old_password 378b243e220ca493
-oldpass localhost mysql_old_password 378b243e220ca493
-oldpassold localhost mysql_old_password 378b243e220ca493
+User Host Password plugin authentication_string
+natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+newpassnat localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
+oldauth localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
+oldpass localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
+oldpassold localhost 378b243e220ca493 mysql_old_password 378b243e220ca493
connect con,localhost,natauth,test,;
select current_user();
current_user()
@@ -85,13 +85,13 @@ set password for oldauth@localhost = PASSWORD('test2');
set password for oldpass@localhost = PASSWORD('test2');
set password for oldpassold@localhost = PASSWORD('test2');
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
-user host password plugin authentication_string
-natauth localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
-newpass localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
-newpassnat localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
-oldauth localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
-oldpass localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
-oldpassold localhost mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
+User Host Password plugin authentication_string
+natauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
+newpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
+newpassnat localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
+oldauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
+oldpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
+oldpassold localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
connect con,localhost,natauth,test2,;
select current_user();
current_user()
diff --git a/mysql-test/main/set_password.test b/mysql-test/main/set_password.test
index fc1ecb5ef5c..c67dc22dc81 100644
--- a/mysql-test/main/set_password.test
+++ b/mysql-test/main/set_password.test
@@ -132,6 +132,7 @@ set global secure_auth=default;
#
# MDEV-16238 root/localhost authn prioritizes authentication_string over Password
#
+--source include/switch_to_mysql_user.inc
create user foo@localhost identified with mysql_native_password;
update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
set password for 'foo'@'localhost' = password('bar');
@@ -145,3 +146,4 @@ select user,host,password,plugin,authentication_string from mysql.user where use
set password for 'foo'@'localhost' = '';
select user,host,password,plugin,authentication_string from mysql.user where user='foo';
drop user foo@localhost;
+--source include/switch_to_mysql_global_priv.inc
diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result
index f4e2047414c..741514b99b1 100644
--- a/mysql-test/main/show_check.result
+++ b/mysql-test/main/show_check.result
@@ -162,8 +162,9 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def Table 253 128 7 Y 0 39 8
def Op 253 10 7 Y 0 39 8
def Msg_type 253 10 6 Y 0 39 8
-def Msg_text 250 393216 2 Y 0 39 8
+def Msg_text 250 393216 39 Y 0 39 8
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -261,7 +262,10 @@ create table t1(n int);
insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
+mysql column_stats 0 0
mysql general_log 0 0
+mysql index_stats 0 0
+mysql table_stats 0 0
test t1 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
diff --git a/mysql-test/main/show_grants_with_plugin-7985.result b/mysql-test/main/show_grants_with_plugin-7985.result
deleted file mode 100644
index 14d7b98bcf4..00000000000
--- a/mysql-test/main/show_grants_with_plugin-7985.result
+++ /dev/null
@@ -1,197 +0,0 @@
-call mtr.add_suppression("password and an authentication plugin");
-#
-# Create a user with mysql_native_password plugin.
-# The user has no password or auth_string set.
-#
-create user u1;
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password;
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % mysql_native_password
-#
-# The user's grants should show no password at all.
-#
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-#
-# Test to see if connecting with no password is succesful.
-#
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Test after flushing privileges.
-#
-flush privileges;
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Now add a mysql_native password string in authentication_string.
-#
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % mysql_native_password *7AFEFD08B6B720E781FB000CAA418F54FA662626
-#
-# Test to see if connecting with password is succesful.
-#
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Test after flushing privileges.
-#
-flush privileges;
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Now we also set a password for the user.
-#
-set password for u1 = PASSWORD('SOMETHINGELSE');
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % mysql_native_password *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
-#
-# Here we should use the password field, as that primes over
-# the authentication_string field.
-#
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-#
-# Logging in with the user's password should work.
-#
-connect con1, localhost, u1,'SOMETHINGELSE',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Reload privileges and test logging in again.
-#
-flush privileges;
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-#
-# Here we connect via the user's password again.
-#
-connect con1, localhost, u1,'SOMETHINGELSE',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Now we remove the authentication plugin password, flush privileges and
-# try again.
-#
-update mysql.user set password=authentication_string, plugin='', authentication_string='' where user='u1';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
-flush privileges;
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-#
-# Here we connect via the user's password.
-#
-connect con1, localhost, u1,'SOMETHINGELSE',;
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
-disconnect con1;
-connection default;
-#
-# Try and set a wrong auth_string password, with mysql_native_password.
-# Make sure it fails.
-#
-GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd';
-ERROR HY000: Password hash should be a 41-digit hexadecimal number
-#
-# Now set a correct password.
-#
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-show grants for u1;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-#
-# Test if the user can now use that password instead.
-#
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-#
-# Test if the user can now use that password instead, after flushing privileges;
-#
-connection default;
-flush privileges;
-connect con1, localhost, u1,'SOMETHING',;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Clear all passwords from the user.
-#
-set password for u1 = '';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-user host password plugin authentication_string
-u1 % mysql_native_password
-#
-# Test no password connect.
-#
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-#
-# Test no password connect, after flushing privileges.
-#
-flush privileges;
-connect con1, localhost, u1,,;
-show grants;
-Grants for u1@%
-GRANT USAGE ON *.* TO 'u1'@'%'
-GRANT SELECT ON `mysql`.* TO 'u1'@'%'
-disconnect con1;
-connection default;
-drop user u1;
diff --git a/mysql-test/main/show_grants_with_plugin-7985.test b/mysql-test/main/show_grants_with_plugin-7985.test
deleted file mode 100644
index 85952870254..00000000000
--- a/mysql-test/main/show_grants_with_plugin-7985.test
+++ /dev/null
@@ -1,160 +0,0 @@
---source include/not_embedded.inc
-call mtr.add_suppression("password and an authentication plugin");
-
---echo #
---echo # Create a user with mysql_native_password plugin.
---echo # The user has no password or auth_string set.
---echo #
-
-create user u1;
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password;
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-
---echo #
---echo # The user's grants should show no password at all.
---echo #
-show grants for u1;
---echo #
---echo # Test to see if connecting with no password is succesful.
---echo #
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
-
---connection default
---echo #
---echo # Test after flushing privileges.
---echo #
-flush privileges;
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
-
---connection default
---echo #
---echo # Now add a mysql_native password string in authentication_string.
---echo #
-# Password string is SOMETHING
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
---echo #
---echo # Test to see if connecting with password is succesful.
---echo #
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
-
---connection default
---echo #
---echo # Test after flushing privileges.
---echo #
-flush privileges;
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Now we also set a password for the user.
---echo #
-set password for u1 = PASSWORD('SOMETHINGELSE');
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-
---echo #
---echo # Here we should use the password field, as that primes over
---echo # the authentication_string field.
---echo #
-show grants for u1;
-
---echo #
---echo # Logging in with the user's password should work.
---echo #
---connect (con1, localhost, u1,'SOMETHINGELSE',)
-show grants;
---disconnect con1
---connection default
---echo #
---echo # Reload privileges and test logging in again.
---echo #
-flush privileges;
-show grants for u1;
---echo #
---echo # Here we connect via the user's password again.
---echo #
---connect (con1, localhost, u1,'SOMETHINGELSE',)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Now we remove the authentication plugin password, flush privileges and
---echo # try again.
---echo #
-update mysql.user set password=authentication_string, plugin='', authentication_string='' where user='u1';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-flush privileges;
-show grants for u1;
---echo #
---echo # Here we connect via the user's password.
---echo #
---connect (con1, localhost, u1,'SOMETHINGELSE',)
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
---disconnect con1
---connection default
-
---echo #
---echo # Try and set a wrong auth_string password, with mysql_native_password.
---echo # Make sure it fails.
---echo #
---error ER_PASSWD_LENGTH
-GRANT USAGE ON *.* TO u1 IDENTIFIED VIA mysql_native_password USING 'asd';
---echo #
---echo # Now set a correct password.
---echo #
-GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password
-USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626';
-show grants for u1;
-
---echo #
---echo # Test if the user can now use that password instead.
---echo #
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
-
---echo #
---echo # Test if the user can now use that password instead, after flushing privileges;
---echo #
---connection default
-flush privileges;
-
---connect (con1, localhost, u1,'SOMETHING',)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Clear all passwords from the user.
---echo #
-set password for u1 = '';
-select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
-
---echo #
---echo # Test no password connect.
---echo #
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
---connection default
-
---echo #
---echo # Test no password connect, after flushing privileges.
---echo #
-flush privileges;
---connect (con1, localhost, u1,,)
-show grants;
---disconnect con1
---connection default
-
-drop user u1;
diff --git a/mysql-test/main/sp-code.result b/mysql-test/main/sp-code.result
index c3af01d19e8..0ff30ba7764 100644
--- a/mysql-test/main/sp-code.result
+++ b/mysql-test/main/sp-code.result
@@ -1020,8 +1020,8 @@ i
SHOW PROCEDURE CODE p1;
Pos Instruction
0 set i@0 1
-1 set [upper_bound]@1 3
-2 jump_if_not 6(6) i@0 <= [upper_bound]@1
+1 set [target_bound]@1 3
+2 jump_if_not 6(6) i@0 <= [target_bound]@1
3 stmt 0 "SELECT i"
4 set i@0 i@0 + 1
5 jump 2
@@ -1058,11 +1058,11 @@ i j
SHOW PROCEDURE CODE p1;
Pos Instruction
0 set i@0 1
-1 set [upper_bound]@1 3
-2 jump_if_not 17(17) i@0 <= [upper_bound]@1
+1 set [target_bound]@1 3
+2 jump_if_not 17(17) i@0 <= [target_bound]@1
3 set j@2 1
-4 set [upper_bound]@3 3
-5 jump_if_not 13(13) j@2 <= [upper_bound]@3
+4 set [target_bound]@3 3
+5 jump_if_not 13(13) j@2 <= [target_bound]@3
6 jump_if_not 8(8) i@0 = 3
7 jump 17
8 jump_if_not 10(10) j@2 = 3
diff --git a/mysql-test/main/sp-cursor.result b/mysql-test/main/sp-cursor.result
index f1dd8ed5eaa..2656ef8821d 100644
--- a/mysql-test/main/sp-cursor.result
+++ b/mysql-test/main/sp-cursor.result
@@ -172,7 +172,7 @@ CALL p1('b1');
v_a
0
Warnings:
-Warning 1366 Incorrect integer value: 'b1' for column 'p_a' at row 1
+Warning 1366 Incorrect integer value: 'b1' for column ``.``.`p_a` at row 1
DROP PROCEDURE p1;
SET sql_mode=DEFAULT;
#
@@ -713,3 +713,27 @@ END;
$$
CALL p1;
DROP PROCEDURE p1;
+#
+# MDEV-17278 CURSOR FOR LOOP - ERROR: unexpected end of stream, read 0 bytes (SERVER CRASH)
+#
+CREATE TABLE t1 (id2 int, id int, en1 enum('aaa','a','b','c'));
+INSERT INTO t1 VALUES(1,1,'aaa'),(2,2,'a'),(3,3,'b'),(4,4,'c');
+CREATE PROCEDURE p1()
+BEGIN
+FOR rec IN (SELECT en1 FROM t1)
+DO
+SELECT rec.en1;
+END FOR;
+END;
+$$
+CALL p1();
+rec.en1
+aaa
+rec.en1
+a
+rec.en1
+b
+rec.en1
+c
+DROP PROCEDURE p1;
+DROP TABLE t1;
diff --git a/mysql-test/main/sp-cursor.test b/mysql-test/main/sp-cursor.test
index 735514ff376..97483ef9caf 100644
--- a/mysql-test/main/sp-cursor.test
+++ b/mysql-test/main/sp-cursor.test
@@ -723,3 +723,24 @@ $$
DELIMITER ;$$
CALL p1;
DROP PROCEDURE p1;
+
+
+--echo #
+--echo # MDEV-17278 CURSOR FOR LOOP - ERROR: unexpected end of stream, read 0 bytes (SERVER CRASH)
+--echo #
+
+CREATE TABLE t1 (id2 int, id int, en1 enum('aaa','a','b','c'));
+INSERT INTO t1 VALUES(1,1,'aaa'),(2,2,'a'),(3,3,'b'),(4,4,'c');
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ FOR rec IN (SELECT en1 FROM t1)
+ DO
+ SELECT rec.en1;
+ END FOR;
+END;
+$$
+DELIMITER ;$$
+CALL p1();
+DROP PROCEDURE p1;
+DROP TABLE t1;
diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result
index 74723f832a7..3d4e7895fa4 100644
--- a/mysql-test/main/sp-error.result
+++ b/mysql-test/main/sp-error.result
@@ -2784,7 +2784,7 @@ END|
CALL p1()|
Warnings:
-Warning 1366 Incorrect integer value: 'string' for column 'var1' at row 1
+Warning 1366 Incorrect integer value: 'string' for column ``.``.`var1` at row 1
SET sql_mode = DEFAULT;
CREATE PROCEDURE p2()
diff --git a/mysql-test/main/sp-for-loop.result b/mysql-test/main/sp-for-loop.result
index 0da09586df5..d62d6ae3612 100644
--- a/mysql-test/main/sp-for-loop.result
+++ b/mysql-test/main/sp-for-loop.result
@@ -80,7 +80,7 @@ CREATE FUNCTION f1 (a INT, b INT) RETURNS INT
BEGIN
DECLARE total INT DEFAULT 0;
fori:
-FOR i IN REVERSE a..1
+FOR i IN REVERSE 1..a
DO
SET total= total + i;
IF i = b THEN
diff --git a/mysql-test/main/sp-for-loop.test b/mysql-test/main/sp-for-loop.test
index 6350e9fb9d3..420ab58aaa7 100644
--- a/mysql-test/main/sp-for-loop.test
+++ b/mysql-test/main/sp-for-loop.test
@@ -86,7 +86,7 @@ CREATE FUNCTION f1 (a INT, b INT) RETURNS INT
BEGIN
DECLARE total INT DEFAULT 0;
fori:
- FOR i IN REVERSE a..1
+ FOR i IN REVERSE 1..a
DO
SET total= total + i;
IF i = b THEN
diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result
index 051fbf3a7e8..662d52902d0 100644
--- a/mysql-test/main/sp-security.result
+++ b/mysql-test/main/sp-security.result
@@ -507,7 +507,7 @@ GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO
user19857@localhost;
SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
-Host User Plugin Authentication_string
+Host User plugin authentication_string
localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C
connect mysqltest_2_con,localhost,user19857,meow,test;
connection mysqltest_2_con;
@@ -534,7 +534,7 @@ DROP PROCEDURE IF EXISTS test.sp19857;
connection con1root;
disconnect mysqltest_2_con;
SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857';
-Host User Plugin Authentication_string
+Host User plugin authentication_string
localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C
DROP USER user19857@localhost;
disconnect con1root;
@@ -765,21 +765,23 @@ connection default;
disconnect conn1;
drop user bug12602983_user@localhost;
drop database mysqltest_db;
+create user u1@localhost;
+grant all privileges on *.* to u1@localhost with grant option;
+connect u1, localhost, u1;
set password=password('foobar');
create procedure sp1() select 1;
show grants;
-Grants for root@localhost
-GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
-GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+Grants for u1@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'u1'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants;
-Grants for root@localhost
-GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
-GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'root'@'localhost'
-GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+Grants for u1@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'u1'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
+GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'u1'@'localhost'
drop procedure sp1;
-set password='';
-update mysql.user set plugin='';
+disconnect u1;
+connection default;
+drop user u1@localhost;
#
# MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
#
diff --git a/mysql-test/main/sp-security.test b/mysql-test/main/sp-security.test
index dd917eed671..7a87fae4097 100644
--- a/mysql-test/main/sp-security.test
+++ b/mysql-test/main/sp-security.test
@@ -1035,15 +1035,18 @@ drop database mysqltest_db;
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
+create user u1@localhost;
+grant all privileges on *.* to u1@localhost with grant option;
+connect u1, localhost, u1;
set password=password('foobar');
create procedure sp1() select 1;
show grants;
grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants;
drop procedure sp1;
-set password='';
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
+disconnect u1;
+connection default;
+drop user u1@localhost;
--echo #
--echo # MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result
index 0d4d18c577d..236695a6c0f 100644
--- a/mysql-test/main/sp-vars.result
+++ b/mysql-test/main/sp-vars.result
@@ -140,7 +140,7 @@ SELECT sp_vars_check_ret3();
sp_vars_check_ret3()
0
Warnings:
-Warning 1366 Incorrect integer value: 'Hello, world' for column 'sp_vars_check_ret3()' at row 1
+Warning 1366 Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 1
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
@@ -195,7 +195,7 @@ SELECT sp_vars_check_ret3();
sp_vars_check_ret3()
0
Warnings:
-Warning 1366 Incorrect integer value: 'Hello, world' for column 'sp_vars_check_ret3()' at row 1
+Warning 1366 Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 1
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
@@ -314,7 +314,7 @@ ERROR 22003: Out of range value for column 'sp_vars_check_ret1()' at row 1
SELECT sp_vars_check_ret2();
ERROR 22003: Out of range value for column 'sp_vars_check_ret2()' at row 1
SELECT sp_vars_check_ret3();
-ERROR 22007: Incorrect integer value: 'Hello, world' for column 'sp_vars_check_ret3()' at row 1
+ERROR 22007: Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 1
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
@@ -896,7 +896,7 @@ sp_var
@user_var
0
Warnings:
-Warning 1366 Incorrect integer value: 'Hello, world!' for column 'sp_var' at row 1
+Warning 1366 Incorrect integer value: 'Hello, world!' for column ``.``.`sp_var` at row 1
DROP PROCEDURE p1;
DROP TABLE t1;
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 16b0b1d60e5..39bc09e21d6 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -2293,9 +2293,11 @@ create procedure bug3843()
analyze table t1|
call bug3843()|
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
call bug3843()|
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
select 1+2|
1+2
@@ -2442,7 +2444,7 @@ drop procedure if exists bug4904|
create procedure bug4904()
begin
declare continue handler for sqlstate 'HY000' begin end;
-create table t2 as select * from t3;
+create table not_existing_table as select * from t3;
end|
call bug4904()|
ERROR 42S02: Table 'test.t3' doesn't exist
@@ -4331,8 +4333,11 @@ test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not of type 'BASE TABLE'
test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not of type 'BASE TABLE'
test.v1 analyze status Operation failed
@@ -4350,8 +4355,11 @@ test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not of type 'BASE TABLE'
test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not of type 'BASE TABLE'
test.v1 analyze status Operation failed
@@ -4369,8 +4377,11 @@ test.t3 optimize status OK
test.v1 optimize Error 'test.v1' is not of type 'BASE TABLE'
test.v1 optimize status Operation failed
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
test.v1 analyze Error 'test.v1' is not of type 'BASE TABLE'
test.v1 analyze status Operation failed
@@ -4579,7 +4590,7 @@ call bug15231_3()|
Result
Missed it (correct)
Level Code Message
-Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1
+Warning 1366 Incorrect decimal value: 'zap' for column ``.``.`x` at row 1
Result
Caught it (correct)
call bug15231_5()|
@@ -6444,7 +6455,7 @@ DROP TABLE t1;
CALL p2('text');
Warnings:
-Warning 1366 Incorrect integer value: 'text' for column 'v' at row 1
+Warning 1366 Incorrect integer value: 'text' for column ``.``.`v` at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -8363,7 +8374,7 @@ FETCH c INTO a;
CLOSE c;
END;
$$
-ERROR 22007: Incorrect integer value: 'y' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: 'y' for column ``.``.`a` at row 1
DROP TABLE t1;
SET sql_mode=DEFAULT;
#
@@ -8559,11 +8570,11 @@ RETURN a = timestamp'2038-01-19 03:14:07.999999'
END
$$
SELECT f1(e) FROM t1;
-ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30'
+ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000'
SELECT f2(e) FROM t1;
-ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30'
+ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000'
SELECT f3(e) FROM t1;
-ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30'
+ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000'
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
@@ -8697,3 +8708,38 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
DROP FUNCTION f1;
+#
+# MDEV-16036: Debug assertion failed in resignal on create
+# temporary table
+#
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ORACLE';
+CREATE or replace procedure p4()
+AS
+CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+NULL;
+END;
+EXIT HANDLER FOR OTHERS -- SQLEXCEPTION
+BEGIN
+GET DIAGNOSTICS CONDITION 1 @sqlstate = RETURNED_SQLSTATE, @errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
+SELECT @sqlstate, @errno, @text;
+SHOW WARNINGS;
+RESIGNAL; -- cause DBG_ASSERT failed
+END;
+BEGIN
+CREATE TEMPORARY TABLE IF NOT EXISTS t1(origine VARCHAR2(10) NOT NULL);
+END
+/
+call p4();
+call p4();
+@sqlstate @errno @text
+42S01 1050 Table 't1' already exists
+Level Code Message
+Note 1050 Table 't1' already exists
+Warnings:
+Note 1050 Table 't1' already exists
+drop procedure p4;
+drop table t1;
+set @@sql_mode=@save_sql_mode;
+# End of 10.3 tests
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 4f520f321c5..230e9c8bb18 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -2918,7 +2918,7 @@ create procedure bug4904()
begin
declare continue handler for sqlstate 'HY000' begin end;
- create table t2 as select * from t3;
+ create table not_existing_table as select * from t3;
end|
-- error 1146
@@ -10239,3 +10239,37 @@ CREATE TABLE t1 AS SELECT f1() AS c1, COALESCE(f1()) AS c2, CONCAT(f1()) AS c3;
SHOW CREATE TABLE t1;
DROP TABLE t1;
DROP FUNCTION f1;
+
+--echo #
+--echo # MDEV-16036: Debug assertion failed in resignal on create
+--echo # temporary table
+--echo #
+
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ORACLE';
+delimiter /;
+CREATE or replace procedure p4()
+AS
+ CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ NULL;
+ END;
+ EXIT HANDLER FOR OTHERS -- SQLEXCEPTION
+ BEGIN
+ GET DIAGNOSTICS CONDITION 1 @sqlstate = RETURNED_SQLSTATE, @errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
+ SELECT @sqlstate, @errno, @text;
+ SHOW WARNINGS;
+ RESIGNAL; -- cause DBG_ASSERT failed
+ END;
+BEGIN
+ CREATE TEMPORARY TABLE IF NOT EXISTS t1(origine VARCHAR2(10) NOT NULL);
+END
+/
+delimiter ;/
+call p4();
+call p4();
+drop procedure p4;
+drop table t1;
+set @@sql_mode=@save_sql_mode;
+
+--echo # End of 10.3 tests
diff --git a/mysql-test/main/sp_notembedded.result b/mysql-test/main/sp_notembedded.result
index 860f82ebd93..3883225e9bc 100644
--- a/mysql-test/main/sp_notembedded.result
+++ b/mysql-test/main/sp_notembedded.result
@@ -231,8 +231,6 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
disconnect con1;
connection default;
DROP PROCEDURE p1;
-DELETE FROM mysql.user WHERE User='mysqltest_1';
-FLUSH PRIVILEGES;
#
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
#
diff --git a/mysql-test/main/sp_notembedded.test b/mysql-test/main/sp_notembedded.test
index 64f1daeaeb9..2f1c4cd92f5 100644
--- a/mysql-test/main/sp_notembedded.test
+++ b/mysql-test/main/sp_notembedded.test
@@ -305,6 +305,7 @@ set session low_priority_updates=default;
#
# Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N
#
+--source include/switch_to_mysql_user.inc
INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
@@ -323,10 +324,7 @@ CREATE PROCEDURE p1(i INT) BEGIN END;
disconnect con1;
connection default;
DROP PROCEDURE p1;
-
-DELETE FROM mysql.user WHERE User='mysqltest_1';
-FLUSH PRIVILEGES;
-
+--source include/switch_to_mysql_global_priv.inc
--echo #
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
@@ -464,6 +462,7 @@ DROP EVENT teste_bug11763507;
# A case of SHOW GRANTS
# (creating a new procedure changes the password)
#
+--source include/switch_to_mysql_user.inc
grant create routine on test.* to foo1@localhost identified by 'foo';
update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1';
--connect (foo,localhost,foo1,foo)
@@ -479,6 +478,7 @@ show grants;
--disconnect foo
drop procedure spfoo;
drop user foo1@localhost;
+--source include/switch_to_mysql_global_priv.inc
#
# Restore global concurrent_insert value. Keep in the end of the test file.
diff --git a/mysql-test/main/sql_mode.result b/mysql-test/main/sql_mode.result
index 238bae2efd8..25a90703bf5 100644
--- a/mysql-test/main/sql_mode.result
+++ b/mysql-test/main/sql_mode.result
@@ -476,10 +476,14 @@ select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
set sql_mode=2147483648*2*2*2;
-ERROR 42000: Variable 'sql_mode' can't be set to the value of '17179869184'
select @@sql_mode;
@@sql_mode
-REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
+TIME_ROUND_FRACTIONAL
+set sql_mode=2147483648*2*2*2*2;
+ERROR 42000: Variable 'sql_mode' can't be set to the value of '34359738368'
+select @@sql_mode;
+@@sql_mode
+TIME_ROUND_FRACTIONAL
set sql_mode=PAD_CHAR_TO_FULL_LENGTH;
create table t1 (a int auto_increment primary key, b char(5));
insert into t1 (b) values('a'),('b\t'),('c ');
diff --git a/mysql-test/main/sql_mode.test b/mysql-test/main/sql_mode.test
index 8cf50f73f6f..97f5cf42791 100644
--- a/mysql-test/main/sql_mode.test
+++ b/mysql-test/main/sql_mode.test
@@ -263,8 +263,10 @@ set sql_mode=4194304;
select @@sql_mode;
set sql_mode=16384+(65536*4);
select @@sql_mode;
+set sql_mode=2147483648*2*2*2;
+select @@sql_mode;
--error 1231
-set sql_mode=2147483648*2*2*2; # that mode does not exist
+set sql_mode=2147483648*2*2*2*2; # that mode does not exist
select @@sql_mode;
#
diff --git a/mysql-test/main/ssl-crl-revoked-crl.result b/mysql-test/main/ssl-crl-revoked-crl.result
deleted file mode 100644
index 8ecc6a509d3..00000000000
--- a/mysql-test/main/ssl-crl-revoked-crl.result
+++ /dev/null
@@ -1 +0,0 @@
-# try logging in with a certificate in the server's --ssl-crl : should fail
diff --git a/mysql-test/main/ssl.result b/mysql-test/main/ssl.result
index 5de9e5174d8..8de36f55ecf 100644
--- a/mysql-test/main/ssl.result
+++ b/mysql-test/main/ssl.result
@@ -4,10 +4,10 @@ have_ssl
1
SHOW STATUS LIKE 'Ssl_server_not_before';
Variable_name Value
-Ssl_server_not_before Apr 25 20:52:21 2017 GMT
+Ssl_server_not_before Jan 27 10:11:10 2019 GMT
SHOW STATUS LIKE 'Ssl_server_not_after';
Variable_name Value
-Ssl_server_not_after Apr 20 20:52:21 2037 GMT
+Ssl_server_not_after Jan 22 10:11:10 2039 GMT
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
@@ -2175,8 +2175,3 @@ still connected?
still connected?
connection default;
disconnect ssl_con;
-create user mysqltest_1@localhost;
-grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
-Variable_name Value
-Ssl_cipher AES256-SHA
-drop user mysqltest_1@localhost;
diff --git a/mysql-test/main/ssl.test b/mysql-test/main/ssl.test
index f2ac288db7a..67db668a1c2 100644
--- a/mysql-test/main/ssl.test
+++ b/mysql-test/main/ssl.test
@@ -32,10 +32,5 @@ select 'still connected?';
connection default;
disconnect ssl_con;
-create user mysqltest_1@localhost;
-grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
---exec $MYSQL -umysqltest_1 --ssl-cipher=AES256-SHA -e "show status like 'ssl_cipher'" 2>&1
-drop user mysqltest_1@localhost;
-
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/main/ssl_cert_verify.result b/mysql-test/main/ssl_cert_verify.result
deleted file mode 100644
index 1da77329509..00000000000
--- a/mysql-test/main/ssl_cert_verify.result
+++ /dev/null
@@ -1,5 +0,0 @@
-#T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail.
-#T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass.
-Variable_name Value
-Ssl_version TLS_VERSION
-# restart server using restart
diff --git a/mysql-test/main/ssl_cert_verify.test b/mysql-test/main/ssl_cert_verify.test
deleted file mode 100644
index 83f621b7ca9..00000000000
--- a/mysql-test/main/ssl_cert_verify.test
+++ /dev/null
@@ -1,43 +0,0 @@
-# Want to skip this test from Valgrind execution
---source include/no_valgrind_without_big.inc
-# This test should work in embedded server after we fix mysqltest
--- source include/not_embedded.inc
--- source include/have_ssl_communication.inc
-# Save the initial number of concurrent sessions
---source include/count_sessions.inc
-
-let $ssl_verify_fail_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-fail.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-fail.pem;
-let $ssl_verify_pass_path = --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-key-verify-pass.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert-verify-pass.pem;
-
---echo #T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail.
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server
---source include/wait_until_disconnected.inc
-
---exec echo "restart:" $ssl_verify_fail_path > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---error 1
---exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'"
-
---echo #T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass.
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server
---source include/wait_until_disconnected.inc
-
---exec echo "restart:" $ssl_verify_pass_path > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
-
---replace_result TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION
---exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'"
-
---echo # restart server using restart
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---shutdown_server
---source include/wait_until_disconnected.inc
-
---exec echo "restart: " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
diff --git a/mysql-test/main/ssl_cipher-master.opt b/mysql-test/main/ssl_cipher-master.opt
deleted file mode 100644
index d750c46ba5c..00000000000
--- a/mysql-test/main/ssl_cipher-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---loose-ssl-cipher=AES128-SHA
diff --git a/mysql-test/main/ssl_cipher.result b/mysql-test/main/ssl_cipher.result
index 79998dfca80..266c9f9322a 100644
--- a/mysql-test/main/ssl_cipher.result
+++ b/mysql-test/main/ssl_cipher.result
@@ -1,6 +1,61 @@
-#
-# BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
-#
+create user ssl_user1@localhost require SSL;
+create user ssl_user2@localhost require cipher 'AES256-SHA';
+create user ssl_user3@localhost require cipher 'AES256-SHA' AND SUBJECT '/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client';
+create user ssl_user4@localhost require cipher 'AES256-SHA' AND SUBJECT '/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client' ISSUER '/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB';
+create user ssl_user5@localhost require cipher 'AES256-SHA' AND SUBJECT 'xxx';
+connect con1,localhost,ssl_user1,,,,,SSL-CIPHER=AES256-SHA;
+connect(localhost,ssl_user2,,test,MASTER_PORT,MASTER_SOCKET);
+connect con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES128-SHA;
+ERROR 28000: Access denied for user 'ssl_user2'@'localhost' (using password: NO)
+connect con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES256-SHA;
+connect con3,localhost,ssl_user3,,,,,SSL-CIPHER=AES256-SHA;
+connect con4,localhost,ssl_user4,,,,,SSL-CIPHER=AES256-SHA;
+connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
+connect con5,localhost,ssl_user5,,,,,SSL-CIPHER=AES256-SHA;
+ERROR 28000: Access denied for user 'ssl_user5'@'localhost' (using password: NO)
+connection con1;
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES256-SHA
+disconnect con1;
+connection con2;
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES256-SHA
+disconnect con2;
+connection con3;
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES256-SHA
+disconnect con3;
+connection con4;
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES256-SHA
+disconnect con4;
+connection default;
+drop user ssl_user1@localhost, ssl_user2@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES256-SHA
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES128-SHA
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name Value
+Ssl_cipher AES128-SHA
+mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxxVariable_name Value
+Ssl_cipher AES256-SHA
+Variable_name Value
+Ssl_cipher AES128-SHA
+select 'is still running; no cipher request crashed the server' as result from dual;
+result
+is still running; no cipher request crashed the server
+create user mysqltest_1@localhost;
+grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
+Variable_name Value
+Ssl_cipher AES256-SHA
+drop user mysqltest_1@localhost;
connect ssl_con,localhost,root,,,,,SSL;
SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value
@@ -8,5 +63,5 @@ Ssl_cipher AES128-SHA
SHOW STATUS LIKE 'Ssl_cipher_list';
Variable_name Value
Ssl_cipher_list AES128-SHA
-connection default;
disconnect ssl_con;
+connection default;
diff --git a/mysql-test/main/ssl_cipher.test b/mysql-test/main/ssl_cipher.test
index cf249343324..27854654a9f 100644
--- a/mysql-test/main/ssl_cipher.test
+++ b/mysql-test/main/ssl_cipher.test
@@ -1,23 +1,103 @@
-# Turn on ssl between the client and server
-# and run a number of tests
+#
+# Various tests that require setting of a specific ssl_cipher
+# which currently doesn't work in OpenSSL 1.1.1
+#
+--source include/have_ssl_communication.inc
---echo #
---echo # BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
---echo #
+if (`select @@version_ssl_library like 'OpenSSL 1.1.1%'`) {
+ skip OpenSSL 1.1.1;
+}
--- source include/have_ssl_communication.inc
+create user ssl_user1@localhost require SSL;
+create user ssl_user2@localhost require cipher 'AES256-SHA';
+create user ssl_user3@localhost require cipher 'AES256-SHA' AND SUBJECT '/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client';
+create user ssl_user4@localhost require cipher 'AES256-SHA' AND SUBJECT '/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB/CN=client' ISSUER '/CN=cacert/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB';
+create user ssl_user5@localhost require cipher 'AES256-SHA' AND SUBJECT 'xxx';
-# Save the initial number of concurrent sessions
---source include/count_sessions.inc
+connect (con1,localhost,ssl_user1,,,,,SSL-CIPHER=AES256-SHA);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES128-SHA);
+connect (con2,localhost,ssl_user2,,,,,SSL-CIPHER=AES256-SHA);
+connect (con3,localhost,ssl_user3,,,,,SSL-CIPHER=AES256-SHA);
+connect (con4,localhost,ssl_user4,,,,,SSL-CIPHER=AES256-SHA);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_ACCESS_DENIED_ERROR
+connect (con5,localhost,ssl_user5,,,,,SSL-CIPHER=AES256-SHA);
-connect (ssl_con,localhost,root,,,,,SSL);
+connection con1;
+SHOW STATUS LIKE 'Ssl_cipher';
+disconnect con1;
+connection con2;
+SHOW STATUS LIKE 'Ssl_cipher';
+disconnect con2;
+connection con3;
+SHOW STATUS LIKE 'Ssl_cipher';
+disconnect con3;
+connection con4;
+SHOW STATUS LIKE 'Ssl_cipher';
+disconnect con4;
+connection default;
+drop user ssl_user1@localhost, ssl_user2@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
-# Check Cipher Name and Cipher List
+#
+# Bug#21611 Slave can't connect when master-ssl-cipher specified
+# - Apparently selecting a cipher doesn't work at all
+# - Use a cipher that both yaSSL and OpenSSL supports
+#
+--write_file $MYSQLTEST_VARDIR/tmp/test.sql
SHOW STATUS LIKE 'Ssl_cipher';
-SHOW STATUS LIKE 'Ssl_cipher_list';
+EOF
+--exec $MYSQL_TEST --ssl-cipher=AES256-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
+# Test to connect using a list of ciphers
+--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER:AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
+# Test to connect using a specifi cipher
+--exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
+# Test to connect using an unknown cipher
+--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--error 1
+--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
+--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
-connection default;
-disconnect ssl_con;
+#
+# Bug#39172 Asking for DH+non-RSA key with server set to use other key caused
+# YaSSL to crash the server.
+#
-# Wait till all disconnects are completed
---source include/wait_until_count_sessions.inc
+# Common ciphers to openssl and yassl
+--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES256-SHA
+--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=AES128-SHA
+--disable_query_log
+--disable_result_log
+
+# Below here caused crashes. ################
+--error 0,1
+--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl-cipher';" --ssl-cipher=NOT----EXIST
+# These probably exist but the server's keys can't be used to accept these kinds of connections.
+--error 0,1
+--exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl-cipher';" --ssl-cipher=AES128-RMD
+
+# If this gives a result, then the bug is fixed.
+--enable_result_log
+--enable_query_log
+select 'is still running; no cipher request crashed the server' as result from dual;
+
+#
+# MDEV-10054 Secure login fails when CIPHER is required
+#
+create user mysqltest_1@localhost;
+grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA";
+--exec $MYSQL -umysqltest_1 --ssl-cipher=AES256-SHA -e "show status like 'ssl_cipher'" 2>&1
+drop user mysqltest_1@localhost;
+
+#
+# BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
+# it was a bug in yaSSL, fixed in d2e36e4258bb
+#
+let $restart_parameters=--ssl-cipher=AES128-SHA;
+source include/restart_mysqld.inc;
+connect (ssl_con,localhost,root,,,,,SSL);
+SHOW STATUS LIKE 'Ssl_cipher';
+SHOW STATUS LIKE 'Ssl_cipher_list';
+disconnect ssl_con;
+connection default;
diff --git a/mysql-test/main/ssl_crl-master.opt b/mysql-test/main/ssl_crl-master.opt
deleted file mode 100644
index 8500f8cd6e7..00000000000
--- a/mysql-test/main/ssl_crl-master.opt
+++ /dev/null
@@ -1,4 +0,0 @@
---ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
---ssl-key=$MYSQL_TEST_DIR/std_data/crl-server-key.pem
---ssl-cert=$MYSQL_TEST_DIR/std_data/crl-server-cert.pem
---ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
diff --git a/mysql-test/main/ssl_crl.combinations b/mysql-test/main/ssl_crl.combinations
new file mode 100644
index 00000000000..abeec480510
--- /dev/null
+++ b/mysql-test/main/ssl_crl.combinations
@@ -0,0 +1,5 @@
+[file]
+ssl-crl=$MYSQL_TEST_DIR/std_data/client-cert.crl
+
+[path]
+ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir
diff --git a/mysql-test/main/ssl_crl.result b/mysql-test/main/ssl_crl.result
index 570dd9cab06..598774bd772 100644
--- a/mysql-test/main/ssl_crl.result
+++ b/mysql-test/main/ssl_crl.result
@@ -1,23 +1,5 @@
-# test --crl for the client : should connect
+# try logging in with a certificate not in the server's --ssl-crl : should succeed
Variable_name Value
-have_openssl YES
-have_ssl YES
-ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
-ssl_capath
-ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem
-ssl_cipher
-ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
-ssl_crlpath
-ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem
-# test --crlpath for the client : should connect
-Variable_name Value
-have_openssl YES
-have_ssl YES
-ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
-ssl_capath
-ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem
-ssl_cipher
-ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
-ssl_crlpath
-ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem
+Ssl_version TLS_VERSION
# try logging in with a certificate in the server's --ssl-crl : should fail
+ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked
diff --git a/mysql-test/main/ssl_crl.test b/mysql-test/main/ssl_crl.test
index 65c14837e50..dc30a9b5934 100644
--- a/mysql-test/main/ssl_crl.test
+++ b/mysql-test/main/ssl_crl.test
@@ -2,15 +2,12 @@
-- source include/not_embedded.inc
-- source include/have_openssl.inc
---echo # test --crl for the client : should connect
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem test --ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl -e "SHOW VARIABLES like '%ssl%';"
-
---echo # test --crlpath for the client : should connect
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem --ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir test -e "SHOW VARIABLES like '%ssl%';"
+--echo # try logging in with a certificate not in the server's --ssl-crl : should succeed
+--replace_result TLSv1.3 TLS_VERSION TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-new-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-new-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'"
--echo # try logging in with a certificate in the server's --ssl-crl : should fail
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is wrong
+--replace_result "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0" "ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked"
--error 1
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW VARIABLES like '%ssl%';"
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
diff --git a/mysql-test/main/ssl_crl_clients-master.opt b/mysql-test/main/ssl_crl_clients-master.opt
deleted file mode 100644
index fa885a61a0c..00000000000
--- a/mysql-test/main/ssl_crl_clients-master.opt
+++ /dev/null
@@ -1,4 +0,0 @@
---ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
---ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem
---ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem
---ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
diff --git a/mysql-test/main/ssl_crl_clients-valid.result b/mysql-test/main/ssl_crl_clients-valid.result
deleted file mode 100644
index f3f47d51846..00000000000
--- a/mysql-test/main/ssl_crl_clients-valid.result
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test clients with and without CRL lists
-############ Test mysql ##############
-# Test mysql connecting to a server with an empty crl
-Variable_name Value
-have_openssl YES
-have_ssl YES
-ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
-ssl_capath
-ssl_cert MYSQL_TEST_DIR/std_data/crl-client-cert.pem
-ssl_cipher
-ssl_crl
-ssl_crlpath
-ssl_key MYSQL_TEST_DIR/std_data/crl-client-key.pem
-# Test mysql connecting to a server with a certificate revoked by -crl
-# Test mysql connecting to a server with a certificate revoked by -crlpath
-############ Test mysqladmin ##############
-# Test mysqladmin connecting to a server with an empty crl
-mysqld is alive
-# Test mysqladmin connecting to a server with a certificate revoked by -crl
-mysqladmin: connect to server at 'localhost' failed
-error: 'SSL connection error: Failed to set ciphers to use'
-# Test mysqladmin connecting to a server with a certificate revoked by -crlpath
-mysqladmin: connect to server at 'localhost' failed
-error: 'SSL connection error: error:00000005:lib(0):func(0):DH lib'
diff --git a/mysql-test/main/ssl_crl_clients.result b/mysql-test/main/ssl_crl_clients.result
index 3bb9b4ee7e2..0d8ed9a4158 100644
--- a/mysql-test/main/ssl_crl_clients.result
+++ b/mysql-test/main/ssl_crl_clients.result
@@ -1,7 +1,13 @@
# Test clients with and without CRL lists
############ Test mysql ##############
# Test mysql connecting to a server with a certificate revoked by -crl
+ERROR 2026 (HY000): SSL connection error: certificate revoked
# Test mysql connecting to a server with a certificate revoked by -crlpath
+ERROR 2026 (HY000): SSL connection error: certificate revoked
############ Test mysqladmin ##############
# Test mysqladmin connecting to a server with a certificate revoked by -crl
+mysqladmin: connect to server at 'localhost' failed
+error: 'SSL connection error: certificate revoked'
# Test mysqladmin connecting to a server with a certificate revoked by -crlpath
+mysqladmin: connect to server at 'localhost' failed
+error: 'SSL connection error: certificate revoked'
diff --git a/mysql-test/main/ssl_crl_clients.test b/mysql-test/main/ssl_crl_clients.test
index 7c05f498fbe..fc954a2fc38 100644
--- a/mysql-test/main/ssl_crl_clients.test
+++ b/mysql-test/main/ssl_crl_clients.test
@@ -4,38 +4,33 @@
--echo # Test clients with and without CRL lists
-let $ssl_base = --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-server-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-server-cert.pem;
-let $ssl_crl = $ssl_base --ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl;
-let $ssl_crlpath = $ssl_base --ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir;
+let $ssl_base = --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem --ssl-verify-server-cert;
+let $ssl_crl = $ssl_base --ssl-crl=$MYSQL_TEST_DIR/std_data/server-cert.crl;
+let $ssl_crlpath = $ssl_base --ssl-crlpath=$MYSQL_TMP_DIR;
+# See `openssl x509 -in server-cert.pem -noout -issuer_hash`
+copy_file $MYSQL_TEST_DIR/std_data/server-cert.crl $MYSQL_TMP_DIR/ed1f42db.r0;
--echo ############ Test mysql ##############
--echo # Test mysql connecting to a server with a certificate revoked by -crl
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--error 1
---exec $MYSQL $ssl_crl test -e "SHOW VARIABLES like '%ssl%';"
+--exec $MYSQL $ssl_crl test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
--echo # Test mysql connecting to a server with a certificate revoked by -crlpath
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--error 1
---exec $MYSQL $ssl_crlpath test -e "SHOW VARIABLES like '%ssl%';"
+--exec $MYSQL $ssl_crlpath test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
--echo ############ Test mysqladmin ##############
-let $admin_prefix = --no-defaults;
let $admin_suffix = --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping;
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crl
---disable_result_log
---replace_regex /.*mysqladmin.*: connect/mysqladmin: connect/
---error 2
---exec $MYSQLADMIN $admin_prefix $ssl_crl $admin_suffix 2>&1
---enable_result_log
+--replace_regex /.*mysqladmin.*:/mysqladmin:/
+--error 1
+--exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1
---disable_result_log
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crlpath
---replace_regex /.*mysqladmin.*: connect/mysqladmin: connect/
---error 2
---exec $MYSQLADMIN $admin_prefix $ssl_crlpath $admin_suffix 2>&1
---enable_result_log
+--replace_regex /.*mysqladmin.*:/mysqladmin:/
+--error 1
+--exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1
diff --git a/mysql-test/main/ssl_crl_clients_valid-master.opt b/mysql-test/main/ssl_crl_clients_valid-master.opt
deleted file mode 100644
index 258df564eba..00000000000
--- a/mysql-test/main/ssl_crl_clients_valid-master.opt
+++ /dev/null
@@ -1,4 +0,0 @@
---ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
---ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem
---ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem
---ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
diff --git a/mysql-test/main/ssl_crl_clients_valid.result b/mysql-test/main/ssl_crl_clients_valid.result
deleted file mode 100644
index 32ee72d5c39..00000000000
--- a/mysql-test/main/ssl_crl_clients_valid.result
+++ /dev/null
@@ -1,16 +0,0 @@
-# Test clients with and without CRL lists
-############ Test mysql ##############
-# Test mysql connecting to a server with an empty crl
-Variable_name Value
-have_openssl YES
-have_ssl YES
-ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
-ssl_capath
-ssl_cert MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem
-ssl_cipher
-ssl_crl MYSQL_TEST_DIR/std_data/crl-client-revoked.crl
-ssl_crlpath
-ssl_key MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem
-############ Test mysqladmin ##############
-# Test mysqladmin connecting to a server with an empty crl
-mysqld is alive
diff --git a/mysql-test/main/ssl_crl_clients_valid.test b/mysql-test/main/ssl_crl_clients_valid.test
deleted file mode 100644
index f08fbf09397..00000000000
--- a/mysql-test/main/ssl_crl_clients_valid.test
+++ /dev/null
@@ -1,23 +0,0 @@
-# This test should work in embedded server after we fix mysqltest
--- source include/not_embedded.inc
--- source include/have_openssl.inc
-
---echo # Test clients with and without CRL lists
-
-let $ssl_base = --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-server-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-server-cert.pem;
-let $ssl_crl = $ssl_base --ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl;
-let $ssl_crlpath = $ssl_base --ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir;
-
-
---echo ############ Test mysql ##############
-
---echo # Test mysql connecting to a server with an empty crl
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL $ssl_crl test -e "SHOW VARIABLES like '%ssl%';" 2>&1
-
---echo ############ Test mysqladmin ##############
-let $admin_prefix = --no-defaults;
-let $admin_suffix = --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping;
-
---echo # Test mysqladmin connecting to a server with an empty crl
---exec $MYSQLADMIN $admin_prefix $ssl_crl $admin_suffix 2>&1
diff --git a/mysql-test/main/ssl_crl_clrpath-master.opt b/mysql-test/main/ssl_crl_clrpath-master.opt
deleted file mode 100644
index b1f486a322b..00000000000
--- a/mysql-test/main/ssl_crl_clrpath-master.opt
+++ /dev/null
@@ -1,4 +0,0 @@
---ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
---ssl-key=$MYSQL_TEST_DIR/std_data/crl-server-key.pem
---ssl-cert=$MYSQL_TEST_DIR/std_data/crl-server-cert.pem
---ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir
diff --git a/mysql-test/main/ssl_crl_clrpath.result b/mysql-test/main/ssl_crl_clrpath.result
deleted file mode 100644
index b4b4d13eca1..00000000000
--- a/mysql-test/main/ssl_crl_clrpath.result
+++ /dev/null
@@ -1,23 +0,0 @@
-# test --crl for the client : should connect
-Variable_name Value
-have_openssl YES
-have_ssl YES
-ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
-ssl_capath
-ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem
-ssl_cipher
-ssl_crl
-ssl_crlpath MYSQL_TEST_DIR/std_data/crldir
-ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem
-# test --crlpath for the client : should connect
-Variable_name Value
-have_openssl YES
-have_ssl YES
-ssl_ca MYSQL_TEST_DIR/std_data/crl-ca-cert.pem
-ssl_capath
-ssl_cert MYSQL_TEST_DIR/std_data/crl-server-cert.pem
-ssl_cipher
-ssl_crl
-ssl_crlpath MYSQL_TEST_DIR/std_data/crldir
-ssl_key MYSQL_TEST_DIR/std_data/crl-server-key.pem
-# try logging in with a certificate in the server's --ssl-crlpath : should fail
diff --git a/mysql-test/main/ssl_crl_clrpath.test b/mysql-test/main/ssl_crl_clrpath.test
deleted file mode 100644
index 50d84ad175e..00000000000
--- a/mysql-test/main/ssl_crl_clrpath.test
+++ /dev/null
@@ -1,16 +0,0 @@
-# This test should work in embedded server after we fix mysqltest
--- source include/not_embedded.inc
--- source include/have_openssl.inc
-
---echo # test --crl for the client : should connect
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem test --ssl-crl=$MYSQL_TEST_DIR/std_data/crl-client-revoked.crl -e "SHOW VARIABLES like '%ssl%';"
-
---echo # test --crlpath for the client : should connect
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-valid-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-valid-cert.pem --ssl-crlpath=$MYSQL_TEST_DIR/std_data/crldir test -e "SHOW VARIABLES like '%ssl%';"
-
---echo # try logging in with a certificate in the server's --ssl-crlpath : should fail
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---error 1
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/crl-ca-cert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/crl-client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/crl-client-cert.pem test -e "SHOW VARIABLES like '%ssl%';"
diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result
index 9a5c023a72f..56efb53aab9 100644
--- a/mysql-test/main/stat_tables.result
+++ b/mysql-test/main/stat_tables.result
@@ -64,12 +64,12 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 179 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6
+1 SIMPLE orders ref PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey 5 dbt3_s001.customer.c_custkey 15 Using where
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -80,7 +80,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stats;
@@ -171,12 +171,12 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 179 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6
+1 SIMPLE orders ref PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey 5 dbt3_s001.customer.c_custkey 15 Using where
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
where c_custkey = o_custkey and l_orderkey = o_orderkey
@@ -187,7 +187,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
EXPLAIN select o_year,
@@ -207,14 +207,14 @@ and o_orderdate between date '1995-01-01' and date '1996-12-31'
group by o_year
order by o_year;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE part ALL PRIMARY NULL NULL NULL 200 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey_partkey 5 dbt3_s001.part.p_partkey 30 Using index condition
1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
1 SIMPLE n2 eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1
+1 SIMPLE orders eq_ref PRIMARY,i_o_orderdate,i_o_custkey PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1
+1 SIMPLE n1 ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5 Using where
select o_year,
sum(case when nation = 'UNITED STATES' then volume else 0 end) /
sum(volume) as mkt_share
@@ -587,10 +587,29 @@ explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
-1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
+1 SIMPLE global_priv ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
+# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
+#
+set @@use_stat_tables= PREFERABLY;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=4;
+set @save_use_stat_tables= @@use_stat_tables;
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+analyze table t1 persistent for columns (a) indexes ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select * from t1 where a=1 and b=3;
+a b
+1 3
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set use_stat_tables=@save_use_stat_tables;
+drop table t1;
+#
# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
#
SET use_stat_tables= PREFERABLY;
@@ -606,3 +625,59 @@ MAX(pk)
NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
+#
+# MDEV-17255: New optimizer defaults and ANALYZE TABLE
+#
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+set use_stat_tables= preferably_for_queries;
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will not collect statistics
+#
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 100.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will collect statistics if we use PERSISTENT
+# for columns, indexes or everything
+#
+analyze table t1 persistent for columns (a) indexes ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 25.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY
+# analyze table t1 will collect statistics
+#
+set use_stat_tables=PREFERABLY;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+test t1 b 2 10 0.0000 4.0000 1.1111 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a=1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
+drop table t1;
+set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test
index 19bc0fa2f46..2c1d53a2583 100644
--- a/mysql-test/main/stat_tables.test
+++ b/mysql-test/main/stat_tables.test
@@ -370,6 +370,23 @@ set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectiv
set use_stat_tables=@save_use_stat_tables;
--echo #
+--echo # MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
+--echo #
+
+set @@use_stat_tables= PREFERABLY;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=4;
+set @save_use_stat_tables= @@use_stat_tables;
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+
+analyze table t1 persistent for columns (a) indexes ();
+select * from t1 where a=1 and b=3;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set use_stat_tables=@save_use_stat_tables;
+drop table t1;
+
+--echo #
--echo # MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
--echo #
@@ -383,5 +400,47 @@ CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, t TEXT);
SELECT MAX(pk) FROM t1;
DROP TABLE t1;
+set use_stat_tables=@save_use_stat_tables;
+--echo #
+--echo # MDEV-17255: New optimizer defaults and ANALYZE TABLE
+--echo #
+
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+set use_stat_tables= preferably_for_queries;
+--echo #
+--echo # with use_stat_tables= PREFERABLY_FOR_QUERIES
+--echo # analyze table t1 will not collect statistics
+--echo #
+
+analyze table t1;
+select * from mysql.column_stats;
+analyze
+select * from t1 where a = 1 and b=3;
+
+--echo #
+--echo # with use_stat_tables= PREFERABLY_FOR_QUERIES
+--echo # analyze table t1 will collect statistics if we use PERSISTENT
+--echo # for columns, indexes or everything
+--echo #
+
+analyze table t1 persistent for columns (a) indexes ();
+select * from mysql.column_stats;
+--echo # filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a = 1 and b=3;
+
+--echo #
+--echo # with use_stat_tables= PREFERABLY
+--echo # analyze table t1 will collect statistics
+--echo #
+
+set use_stat_tables=PREFERABLY;
+analyze table t1;
+select * from mysql.column_stats;
+--echo # filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a=1 and b=3;
+drop table t1;
set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/stat_tables_disabled.result b/mysql-test/main/stat_tables_disabled.result
index b1c37169f02..c974bba5a4b 100644
--- a/mysql-test/main/stat_tables_disabled.result
+++ b/mysql-test/main/stat_tables_disabled.result
@@ -6,10 +6,10 @@ set global innodb_stats_persistent_sample_pages=100;
SET SESSION STORAGE_ENGINE='InnoDB';
select @@global.use_stat_tables;
@@global.use_stat_tables
-NEVER
+PREFERABLY
select @@session.use_stat_tables;
@@session.use_stat_tables
-NEVER
+PREFERABLY
set @save_use_stat_tables=@@use_stat_tables;
set use_stat_tables='preferably';
DROP DATABASE IF EXISTS dbt3_s001;
diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result
index 69c07b0932f..feb7a4c65b1 100644
--- a/mysql-test/main/stat_tables_innodb.result
+++ b/mysql-test/main/stat_tables_innodb.result
@@ -72,11 +72,11 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 Using index
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6 Using index
+1 SIMPLE orders ref|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (14%) Using where; Using filter
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
@@ -88,7 +88,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stats;
@@ -203,11 +203,11 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE nation ref PRIMARY,i_n_regionkey i_n_regionkey 5 dbt3_s001.region.r_regionkey 5
+1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.nation.n_nationkey 1 Using index
+1 SIMPLE customer ref PRIMARY,i_c_nationkey i_c_nationkey 5 dbt3_s001.nation.n_nationkey 6 Using index
+1 SIMPLE orders ref|filter PRIMARY,i_o_orderdate,i_o_custkey i_o_custkey|i_o_orderdate 5|4 dbt3_s001.customer.c_custkey 15 (14%) Using where; Using filter
1 SIMPLE lineitem ref PRIMARY,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
select n_name, sum(l_extendedprice * (1 - l_discount)) as revenue
from customer, orders, lineitem, supplier, nation, region
@@ -219,7 +219,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
n_name revenue
-PERU 321915.8715
+PERU 321915.87150000007
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
EXPLAIN select o_year,
@@ -239,14 +239,14 @@ and o_orderdate between date '1995-01-01' and date '1996-12-31'
group by o_year
order by o_year;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders ALL PRIMARY,i_o_orderdate,i_o_custkey NULL NULL NULL 1500 Using where; Using temporary; Using filesort
-1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
-1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
-1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
-1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 dbt3_s001.orders.o_orderkey 4 Using where
-1 SIMPLE part eq_ref PRIMARY PRIMARY 4 dbt3_s001.lineitem.l_partkey 1 Using where
+1 SIMPLE region ALL PRIMARY NULL NULL NULL 5 Using where; Using temporary; Using filesort
+1 SIMPLE part ALL PRIMARY NULL NULL NULL 200 Using where; Using join buffer (flat, BNL join)
+1 SIMPLE lineitem ref PRIMARY,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey,i_l_orderkey,i_l_orderkey_quantity i_l_suppkey_partkey 5 dbt3_s001.part.p_partkey 30 Using index condition
1 SIMPLE supplier eq_ref PRIMARY,i_s_nationkey PRIMARY 4 dbt3_s001.lineitem.l_suppkey 1 Using where
1 SIMPLE n2 eq_ref PRIMARY PRIMARY 4 dbt3_s001.supplier.s_nationkey 1
+1 SIMPLE orders eq_ref PRIMARY,i_o_orderdate,i_o_custkey PRIMARY 4 dbt3_s001.lineitem.l_orderkey 1 Using where
+1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
+1 SIMPLE n1 eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1 Using where
select o_year,
sum(case when nation = 'UNITED STATES' then volume else 0 end) /
sum(volume) as mkt_share
@@ -619,10 +619,29 @@ explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
-1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
+1 SIMPLE global_priv ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
#
+# MDEV-17734: AddressSanitizer: use-after-poison in create_key_parts_for_pseudo_indexes
+#
+set @@use_stat_tables= PREFERABLY;
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=4;
+set @save_use_stat_tables= @@use_stat_tables;
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+analyze table t1 persistent for columns (a) indexes ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select * from t1 where a=1 and b=3;
+a b
+1 3
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set use_stat_tables=@save_use_stat_tables;
+drop table t1;
+#
# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column
#
SET use_stat_tables= PREFERABLY;
@@ -638,6 +657,62 @@ MAX(pk)
NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
+#
+# MDEV-17255: New optimizer defaults and ANALYZE TABLE
+#
+create table t1 (a int, b int);
+insert into t1(a,b) values (1,2),(1,3),(1,4),(1,5),(2,6),(2,7),(3,8),(3,9),(3,9),(4,10);
+set use_stat_tables= preferably_for_queries;
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will not collect statistics
+#
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 100.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY_FOR_QUERIES
+# analyze table t1 will collect statistics if we use PERSISTENT
+# for columns, indexes or everything
+#
+analyze table t1 persistent for columns (a) indexes ();
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a = 1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 25.00 10.00 Using where
+#
+# with use_stat_tables= PREFERABLY
+# analyze table t1 will collect statistics
+#
+set use_stat_tables=PREFERABLY;
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select * from mysql.column_stats;
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+test t1 a 1 4 0.0000 4.0000 2.5000 0 NULL NULL
+test t1 b 2 10 0.0000 4.0000 1.1111 0 NULL NULL
+# filtered shows that we used the data from stat tables
+analyze
+select * from t1 where a=1 and b=3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
+drop table t1;
+set use_stat_tables=@save_use_stat_tables;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/stat_tables_rbr.result b/mysql-test/main/stat_tables_rbr.result
index 7ae7ade4398..130d1f6da9a 100644
--- a/mysql-test/main/stat_tables_rbr.result
+++ b/mysql-test/main/stat_tables_rbr.result
@@ -1,15 +1,15 @@
#
# Bug mdev-463: assertion failure when running ANALYZE with RBR on
#
-SET GLOBAL use_stat_tables = PREFERABLY;
connect con1,localhost,root,,;
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+set use_stat_tables= PREFERABLY;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
-SET GLOBAL use_stat_tables = DEFAULT;
+SET use_stat_tables = DEFAULT;
disconnect con1;
connection default;
SET use_stat_tables = PREFERABLY;
diff --git a/mysql-test/main/stat_tables_rbr.test b/mysql-test/main/stat_tables_rbr.test
index 29f7c4e6622..1b6a9603743 100644
--- a/mysql-test/main/stat_tables_rbr.test
+++ b/mysql-test/main/stat_tables_rbr.test
@@ -6,15 +6,14 @@
--echo # Bug mdev-463: assertion failure when running ANALYZE with RBR on
--echo #
-SET GLOBAL use_stat_tables = PREFERABLY;
-
--connect (con1,localhost,root,,)
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
+set use_stat_tables= PREFERABLY;
ANALYZE TABLE t1;
# Cleanup
DROP TABLE t1;
-SET GLOBAL use_stat_tables = DEFAULT;
+SET use_stat_tables = DEFAULT;
--disconnect con1
--connection default
diff --git a/mysql-test/main/statistics.result b/mysql-test/main/statistics.result
index 574eb5f4727..34a17cf049c 100644
--- a/mysql-test/main/statistics.result
+++ b/mysql-test/main/statistics.result
@@ -1086,9 +1086,6 @@ test t2 idx4 3 1.1304
ANALYZE TABLE t2 PERSISTENT FOR COLUMNS() INDEXES ALL;
Table Op Msg_type Msg_text
test.t2 analyze status Engine-independent statistics collected
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
test.t2 analyze status OK
SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
db_name table_name index_name prefix_arity avg_frequency
@@ -1149,11 +1146,6 @@ test t2 idx4 4 1.0000
ANALYZE TABLE t2 PERSISTENT FOR COLUMNS ALL INDEXES ALL;
Table Op Msg_type Msg_text
test.t2 analyze status Engine-independent statistics collected
-test.t2 analyze Note Data truncated for column 'avg_length' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
test.t2 analyze status OK
SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
db_name table_name index_name prefix_arity avg_frequency
@@ -1179,8 +1171,6 @@ test t2 idx3 1 8.5000
ANALYZE TABLE t2 PERSISTENT FOR COLUMNS() INDEXES ALL;
Table Op Msg_type Msg_text
test.t2 analyze status Engine-independent statistics collected
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
-test.t2 analyze Note Data truncated for column 'avg_frequency' at row 1
test.t2 analyze status OK
SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
db_name table_name index_name prefix_arity avg_frequency
diff --git a/mysql-test/main/status.result b/mysql-test/main/status.result
index 688d8acee1a..37c551328f0 100644
--- a/mysql-test/main/status.result
+++ b/mysql-test/main/status.result
@@ -324,7 +324,7 @@ Handler_mrr_key_refills 0
Handler_mrr_rowid_refills 0
Handler_prepare 0
Handler_read_first 0
-Handler_read_key 4
+Handler_read_key 9
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -403,9 +403,9 @@ Table_open_cache_overflows 0
SHOW STATUS LIKE 'Table_open_cache%';
Variable_name Value
Table_open_cache_active_instances 1
-Table_open_cache_hits 30
-Table_open_cache_misses 15
-Table_open_cache_overflows 5
+Table_open_cache_hits 72
+Table_open_cache_misses 18
+Table_open_cache_overflows 8
FLUSH TABLES;
FLUSH STATUS;
SET @@global.table_open_cache= @old_table_open_cache;
diff --git a/mysql-test/main/str_to_datetime_457.result b/mysql-test/main/str_to_datetime_457.result
index a024b30944c..e365c303c81 100644
--- a/mysql-test/main/str_to_datetime_457.result
+++ b/mysql-test/main/str_to_datetime_457.result
@@ -17,10 +17,7 @@ Warnings:
Warning 1292 Incorrect datetime value: '0'
select extract(hour from '100000:02:03'), extract(hour from '100000:02:03 ');
extract(hour from '100000:02:03') extract(hour from '100000:02:03 ')
-NULL NULL
-Warnings:
-Warning 1292 Incorrect time value: '100000:02:03'
-Warning 1292 Incorrect time value: '100000:02:03 '
+16 16
#
# backward compatibility craziness
#
diff --git a/mysql-test/main/strict.result b/mysql-test/main/strict.result
index 315bb9dc1b5..b9db4166398 100644
--- a/mysql-test/main/strict.result
+++ b/mysql-test/main/strict.result
@@ -8,43 +8,43 @@ CREATE TABLE t1 (col1 date);
INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29');
INSERT INTO t1 VALUES('0000-10-31');
INSERT INTO t1 VALUES('2004-0-31');
-ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-0-31' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-01-02'),('2004-0-31');
-ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 2
+ERROR 22007: Incorrect date value: '2004-0-31' for column `test`.`t1`.`col1` at row 2
INSERT INTO t1 VALUES('2004-10-0');
-ERROR 22007: Incorrect date value: '2004-10-0' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-10-0' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-09-31');
-ERROR 22007: Incorrect date value: '2004-09-31' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-09-31' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-32');
-ERROR 22007: Incorrect date value: '2004-10-32' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-10-32' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2003-02-29');
-ERROR 22007: Incorrect date value: '2003-02-29' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2003-02-29' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-13-15');
-ERROR 22007: Incorrect date value: '2004-13-15' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-13-15' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('0000-00-00');
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES ('59');
-ERROR 22007: Incorrect date value: '59' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '59' for column `test`.`t1`.`col1` at row 1
set @@sql_mode='STRICT_ALL_TABLES';
INSERT INTO t1 VALUES('2004-01-03'),('2004-0-31');
set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_IN_DATE';
INSERT INTO t1 VALUES('2004-0-30');
-ERROR 22007: Incorrect date value: '2004-0-30' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-0-30' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-01-04'),('2004-0-31'),('2004-01-05');
-ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 2
+ERROR 22007: Incorrect date value: '2004-0-31' for column `test`.`t1`.`col1` at row 2
INSERT INTO t1 VALUES('0000-00-00');
INSERT IGNORE INTO t1 VALUES('2004-0-29');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
INSERT INTO t1 VALUES('0000-00-00');
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`col1` at row 1
INSERT IGNORE INTO t1 VALUES('0000-00-00');
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
INSERT INTO t1 VALUES ('2004-0-30');
INSERT INTO t1 VALUES ('2004-2-30');
-ERROR 22007: Incorrect date value: '2004-2-30' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-2-30' for column `test`.`t1`.`col1` at row 1
set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES';
INSERT INTO t1 VALUES ('2004-2-30');
set @@sql_mode='ansi,traditional';
@@ -73,7 +73,7 @@ drop table t1;
set @@sql_mode='strict_trans_tables';
CREATE TABLE t1 (col1 date) engine=myisam;
INSERT INTO t1 VALUES('2004-13-31'),('2004-1-1');
-ERROR 22007: Incorrect date value: '2004-13-31' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-13-31' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES ('2004-1-2'), ('2004-13-31'),('2004-1-3');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 2
@@ -81,7 +81,7 @@ INSERT IGNORE INTO t1 VALUES('2004-13-31'),('2004-1-4');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT INTO t1 VALUES ('2003-02-29');
-ERROR 22007: Incorrect date value: '2003-02-29' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2003-02-29' for column `test`.`t1`.`col1` at row 1
INSERT ignore INTO t1 VALUES('2003-02-30');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
@@ -100,14 +100,14 @@ drop table t1;
set @@sql_mode='strict_trans_tables';
CREATE TABLE t1 (col1 date) engine=innodb;
INSERT INTO t1 VALUES('2004-13-31'),('2004-1-1');
-ERROR 22007: Incorrect date value: '2004-13-31' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-13-31' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES ('2004-1-2'), ('2004-13-31'),('2004-1-3');
-ERROR 22007: Incorrect date value: '2004-13-31' for column 'col1' at row 2
+ERROR 22007: Incorrect date value: '2004-13-31' for column `test`.`t1`.`col1` at row 2
INSERT IGNORE INTO t1 VALUES('2004-13-31'),('2004-1-4');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT INTO t1 VALUES ('2003-02-29');
-ERROR 22007: Incorrect date value: '2003-02-29' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2003-02-29' for column `test`.`t1`.`col1` at row 1
INSERT ignore INTO t1 VALUES('2003-02-30');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
@@ -125,21 +125,21 @@ CREATE TABLE t1 (col1 datetime);
INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00');
INSERT INTO t1 VALUES('0000-10-31 15:30:00');
INSERT INTO t1 VALUES('2004-0-31 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-0 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-09-31 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-32 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2003-02-29 15:30:00');
-ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-13-15 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('0000-00-00 15:30:00');
-ERROR 22007: Incorrect datetime value: '0000-00-00 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES ('59');
-ERROR 22007: Incorrect datetime value: '59' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '59' for column `test`.`t1`.`col1` at row 1
select * from t1;
col1
2004-10-31 15:30:00
@@ -149,49 +149,49 @@ drop table t1;
CREATE TABLE t1 (col1 timestamp);
INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00');
INSERT INTO t1 VALUES('0000-10-31 15:30:00');
-ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-0-31 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-0 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-09-31 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-32 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2003-02-29 15:30:00');
-ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-13-15 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-02-29 25:30:00');
-ERROR 22007: Incorrect datetime value: '2004-02-29 25:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-02-29 25:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-02-29 15:65:00');
-ERROR 22007: Incorrect datetime value: '2004-02-29 15:65:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-02-29 15:65:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-02-29 15:31:61');
-ERROR 22007: Incorrect datetime value: '2004-02-29 15:31:61' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-02-29 15:31:61' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('0000-00-00 15:30:00');
-ERROR 22007: Incorrect datetime value: '0000-00-00 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('0000-00-00 00:00:00');
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`col1` at row 1
INSERT IGNORE INTO t1 VALUES('0000-00-00 00:00:00');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT INTO t1 VALUES ('59');
-ERROR 22007: Incorrect datetime value: '59' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '59' for column `test`.`t1`.`col1` at row 1
set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES';
INSERT INTO t1 VALUES('2004-0-31 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-0 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-10-32 15:30:00');
-ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('2004-02-30 15:30:04');
-ERROR 22007: Incorrect datetime value: '2004-02-30 15:30:04' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '2004-02-30 15:30:04' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 VALUES('0000-00-00 00:00:00');
set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_IN_DATE';
INSERT INTO t1 VALUES('0000-00-00 00:00:00');
set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
INSERT INTO t1 VALUES('0000-00-00 00:00:00');
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`col1` at row 1
set @@sql_mode='ansi,traditional';
SELECT * FROM t1;
col1
@@ -214,11 +214,11 @@ ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_dat
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '0.10.2004 15.30' for function str_to_date
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect date value: '2004-09-31 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-09-31 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect date value: '2003-02-29 15:30:00' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2003-02-29 15:30:00' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
@@ -228,27 +228,27 @@ ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_dat
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '0.10.2004 15.30' for function str_to_date
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col2' at row 1
+ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column `test`.`t1`.`col2` at row 1
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col2' at row 1
+ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column `test`.`t1`.`col2` at row 1
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
ERROR HY000: Incorrect datetime value: '00.00.0000' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
+ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column `test`.`t1`.`col3` at row 1
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '31.0.2004 15.30' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '0.10.2004 15.30' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col3' at row 1
+ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column `test`.`t1`.`col3` at row 1
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i'));
-ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col3' at row 1
+ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column `test`.`t1`.`col3` at row 1
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i'));
ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_date
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
@@ -273,7 +273,7 @@ ERROR 22007: Incorrect datetime value: '2004-0-10 15:30'
INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME));
ERROR 22007: Incorrect datetime value: '0000-00-00'
INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME));
-ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
+ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column `test`.`t1`.`col3` at row 1
INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME));
ERROR 22007: Incorrect datetime value: '2004-10-0 15:30'
INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME));
@@ -291,7 +291,7 @@ ERROR 22007: Incorrect datetime value: '2004-10-0'
INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE));
ERROR 22007: Incorrect datetime value: '2004-0-10'
INSERT INTO t1 (col1) VALUES('2004-0-10');
-ERROR 22007: Incorrect date value: '2004-0-10' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '2004-0-10' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE));
ERROR 22007: Incorrect datetime value: '0000-00-00'
INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME));
@@ -302,7 +302,7 @@ ERROR 22007: Incorrect datetime value: '2004-0-10 15:30'
INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME));
ERROR 22007: Incorrect datetime value: '0000-00-00'
INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME));
-ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
+ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column `test`.`t1`.`col3` at row 1
INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME));
ERROR 22007: Incorrect datetime value: '2004-10-0 15:30'
INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME));
@@ -366,9 +366,9 @@ Warnings:
Warning 1365 Division by 0
Warning 1365 Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect integer value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -449,9 +449,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect integer value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -533,9 +533,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect integer value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -617,9 +617,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect integer value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -699,9 +699,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect integer value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -786,9 +786,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect decimal value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect decimal value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect decimal value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect decimal value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -853,9 +853,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect double value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect double value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect double value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect double value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -903,9 +903,9 @@ ERROR 22012: Division by 0
UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0;
ERROR 22012: Division by 0
INSERT INTO t1 (col1) VALUES ('');
-ERROR 22007: Incorrect double value: '' for column 'col1' at row 1
+ERROR 22007: Incorrect double value: '' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
-ERROR 22007: Incorrect double value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect double value: 'a59b' for column `test`.`t1`.`col1` at row 1
INSERT INTO t1 (col1) VALUES ('1a');
ERROR 01000: Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
@@ -1135,9 +1135,9 @@ NULL 10
drop table t1;
create table t1 (col1 date, col2 datetime, col3 timestamp);
insert into t1 values (0,0,0);
-ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '0' for column `test`.`t1`.`col1` at row 1
insert into t1 values (0.0,0.0,0.0);
-ERROR 22007: Incorrect date value: '0.0' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '0.0' for column `test`.`t1`.`col1` at row 1
insert into t1 (col1) values (convert('0000-00-00',date));
ERROR 22007: Incorrect datetime value: '0000-00-00'
insert into t1 (col1) values (cast('0000-00-00' as date));
@@ -1160,7 +1160,7 @@ insert ignore into t1 values ('0000-00-00');
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
insert into t1 select * from t1;
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`col1` at row 1
insert ignore into t1 values ('0000-00-00');
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -1168,15 +1168,15 @@ insert ignore into t1 (col1) values (cast('0000-00-00' as date));
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00'
insert into t1 select * from t1;
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column ``.`(temporary)`.`col1` at row 1
alter table t1 modify col1 datetime;
-ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00' for column `test`.`t1`.`col1` at row 1
alter ignore table t1 modify col1 datetime;
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
Warning 1264 Out of range value for column 'col1' at row 2
insert into t1 select * from t1;
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column ``.`(temporary)`.`col1` at row 1
select * from t1;
col1
0000-00-00 00:00:00
@@ -1256,12 +1256,12 @@ drop table t1;
set @@sql_mode='traditional';
create table t1 (d date);
insert into t1 values ('2000-10-00');
-ERROR 22007: Incorrect date value: '2000-10-00' for column 'd' at row 1
+ERROR 22007: Incorrect date value: '2000-10-00' for column `test`.`t1`.`d` at row 1
insert into t1 values (1000);
-ERROR 22007: Incorrect date value: '1000' for column 'd' at row 1
+ERROR 22007: Incorrect date value: '1000' for column `test`.`t1`.`d` at row 1
insert into t1 values ('2000-10-01');
update t1 set d = 1100;
-ERROR 22007: Incorrect date value: '1100' for column 'd' at row 1
+ERROR 22007: Incorrect date value: '1100' for column `test`.`t1`.`d` at row 1
select * from t1;
d
2000-10-01
@@ -1457,34 +1457,34 @@ col5 mediumint, col6 mediumint unsigned,
col7 int, col8 int unsigned,
col9 bigint, col10 bigint unsigned);
insert into t1(col1) values('-');
-ERROR 22007: Incorrect integer value: '-' for column 'col1' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`col1` at row 1
insert into t1(col2) values('+');
-ERROR 22007: Incorrect integer value: '+' for column 'col2' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`col2` at row 1
insert into t1(col3) values('-');
-ERROR 22007: Incorrect integer value: '-' for column 'col3' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`col3` at row 1
insert into t1(col4) values('+');
-ERROR 22007: Incorrect integer value: '+' for column 'col4' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`col4` at row 1
insert into t1(col5) values('-');
-ERROR 22007: Incorrect integer value: '-' for column 'col5' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`col5` at row 1
insert into t1(col6) values('+');
-ERROR 22007: Incorrect integer value: '+' for column 'col6' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`col6` at row 1
insert into t1(col7) values('-');
-ERROR 22007: Incorrect integer value: '-' for column 'col7' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`col7` at row 1
insert into t1(col8) values('+');
-ERROR 22007: Incorrect integer value: '+' for column 'col8' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`col8` at row 1
insert into t1(col9) values('-');
-ERROR 22007: Incorrect integer value: '-' for column 'col9' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`col9` at row 1
insert into t1(col10) values('+');
-ERROR 22007: Incorrect integer value: '+' for column 'col10' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`col10` at row 1
drop table t1;
set sql_mode='traditional';
create table t1(a year);
insert into t1 values ('-');
-ERROR 22007: Incorrect integer value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`a` at row 1
insert into t1 values ('+');
-ERROR 22007: Incorrect integer value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`a` at row 1
insert into t1 values ('');
-ERROR 22007: Incorrect integer value: '' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`a` at row 1
insert into t1 values ('2000a');
ERROR 01000: Data truncated for column 'a' at row 1
insert into t1 values ('2E3x');
diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result
index 6f9fd458892..393e9be8c22 100644
--- a/mysql-test/main/subselect.result
+++ b/mysql-test/main/subselect.result
@@ -344,7 +344,7 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index
-1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t6 ALL i1 NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where `test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`
@@ -1441,7 +1441,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1451,7 +1451,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1461,8 +1461,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1630,7 +1630,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -7023,8 +7023,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
diff --git a/mysql-test/main/subselect_exists2in.result b/mysql-test/main/subselect_exists2in.result
index 95fc1c19b82..029ac22a486 100644
--- a/mysql-test/main/subselect_exists2in.result
+++ b/mysql-test/main/subselect_exists2in.result
@@ -142,6 +142,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
create table t2 (
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
@@ -169,6 +170,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
create table t3 (
a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' '
@@ -230,6 +232,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -330,7 +333,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t2.b' of SELECT #3 was resolved in SELECT #2
-Note 1003 /* select#1 */ select (/* select#2 */ select 1 from dual where !(1 is not null and <in_optimizer>(1,1 in ( <materialize> (/* select#3 */ select `test`.`t3`.`c` from `test`.`t3` where `test`.`t3`.`c` is not null ), <primary_index_lookup>(1 in <temporary table> on distinct_key where 1 = `<subquery3>`.`c`))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1`
+Note 1003 /* select#1 */ select (/* select#2 */ select 1 from dual where !(1 is not null and <in_optimizer>(1,1 in (<primary_index_lookup>(1 in <temporary table> on distinct_key where 1 = `<subquery3>`.`c`))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1`
SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1;
( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )
1
@@ -344,7 +347,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t2.b' of SELECT #3 was resolved in SELECT #2
-Note 1003 /* select#1 */ select (/* select#2 */ select 1 from dual where !(1 is not null and <in_optimizer>(1,1 in ( <materialize> (/* select#3 */ select `test`.`t3`.`c` from `test`.`t3` where `test`.`t3`.`c` is not null ), <primary_index_lookup>(1 in <temporary table> on distinct_key where 1 = `<subquery3>`.`c`))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1`
+Note 1003 /* select#1 */ select (/* select#2 */ select 1 from dual where !(1 is not null and <in_optimizer>(1,1 in (<primary_index_lookup>(1 in <temporary table> on distinct_key where 1 = `<subquery3>`.`c`))))) AS `( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )` from `test`.`t1`
SELECT ( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1;
( SELECT b FROM t2 WHERE NOT EXISTS ( SELECT c FROM t3 WHERE c = b ) )
1
diff --git a/mysql-test/main/subselect_exists2in_costmat.result b/mysql-test/main/subselect_exists2in_costmat.result
index 98a949ece6d..1c9574aafd3 100644
--- a/mysql-test/main/subselect_exists2in_costmat.result
+++ b/mysql-test/main/subselect_exists2in_costmat.result
@@ -65,7 +65,7 @@ Name LIKE 'L%') AND
surfacearea > 1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL Name,SurfaceArea NULL NULL NULL 239 Using where
-2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4080 Using where
+2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4079 Using where
SELECT Name FROM Country
WHERE (EXISTS (select 1 from City where City.Population > 100000 and
Code = Country) OR
diff --git a/mysql-test/main/subselect_extra.result b/mysql-test/main/subselect_extra.result
index a3a0f1f9a15..edae4abfb3d 100644
--- a/mysql-test/main/subselect_extra.result
+++ b/mysql-test/main/subselect_extra.result
@@ -132,6 +132,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
create table t2 (
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
@@ -159,6 +160,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
create table t3 (
a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' '
@@ -220,6 +222,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -302,6 +305,7 @@ INSERT INTO t1 SELECT a + 64,b FROM t1;
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT 1 FROM t1 WHERE a IN
(SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
diff --git a/mysql-test/main/subselect_extra_no_semijoin.result b/mysql-test/main/subselect_extra_no_semijoin.result
index ec9ddb0452e..8aca24b6097 100644
--- a/mysql-test/main/subselect_extra_no_semijoin.result
+++ b/mysql-test/main/subselect_extra_no_semijoin.result
@@ -136,6 +136,7 @@ create index idx_t1_1 on t1 (a1,a2,b,c);
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
create table t2 (
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
@@ -163,6 +164,7 @@ create index idx_t2_1 on t2 (a1,a2,b,c);
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
create table t3 (
a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' '
@@ -224,6 +226,7 @@ create index idx_t3_1 on t3 (a1,a2,b,c);
create index idx_t3_2 on t3 (a1,a2,b);
analyze table t3;
Table Op Msg_type Msg_text
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status Table is already up to date
explain select a1,a2,b,c,min(c), max(c) from t1
where exists ( select * from t2
@@ -306,6 +309,7 @@ INSERT INTO t1 SELECT a + 64,b FROM t1;
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT 1 FROM t1 WHERE a IN
(SELECT a FROM t1 USE INDEX (i2) IGNORE INDEX (i2));
diff --git a/mysql-test/main/subselect_innodb.result b/mysql-test/main/subselect_innodb.result
index ec7f2c0a3d5..799adf1d116 100644
--- a/mysql-test/main/subselect_innodb.result
+++ b/mysql-test/main/subselect_innodb.result
@@ -561,6 +561,7 @@ update t2 set key2=key1;
alter table t2 add key(key2);
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
flush tables;
# Table tsubq must use 'ref' + Using filesort (not 'index' w/o filesort)
diff --git a/mysql-test/main/subselect_mat.result b/mysql-test/main/subselect_mat.result
index 4592b1d5f70..1850742c437 100644
--- a/mysql-test/main/subselect_mat.result
+++ b/mysql-test/main/subselect_mat.result
@@ -1693,8 +1693,8 @@ DROP TABLE t1,t2,t3,t4,t5;
CREATE TABLE t2 (a int);
INSERT IGNORE INTO t2 VALUES ('a'),('a');
Warnings:
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 2
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`a` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`a` at row 2
CREATE TABLE t4 (a varchar(1));
INSERT INTO t4 VALUES ('m'),('o');
CREATE TABLE t3 (a varchar(1) , b varchar(1) ) ;
@@ -2552,7 +2552,7 @@ select * from t1 where (a,b) in (select max(a),b from t2 group by b);
show status where Variable_name like 'Handler_read%' or Variable_name like 'Handler_%write%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 5000
+Handler_read_key 5004
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
diff --git a/mysql-test/main/subselect_mat_cost.result b/mysql-test/main/subselect_mat_cost.result
index 5acf8cbee37..9b0578b62b1 100644
--- a/mysql-test/main/subselect_mat_cost.result
+++ b/mysql-test/main/subselect_mat_cost.result
@@ -67,7 +67,7 @@ Name LIKE 'L%') AND
surfacearea > 1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL Name,SurfaceArea NULL NULL NULL 239 Using where
-2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4080 Using where
+2 MATERIALIZED City ALL Population,Country NULL NULL NULL 4079 Using where
SELECT Name FROM Country
WHERE (Code IN (select Country from City where City.Population > 100000) OR
Name LIKE 'L%') AND
@@ -113,7 +113,7 @@ Name LIKE 'L%') AND
surfacearea > 10*1000000;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country range Name,SurfaceArea SurfaceArea 4 NULL 5 Using index condition; Using where; Rowid-ordered scan
-2 DEPENDENT SUBQUERY City index_subquery Population,Country Country 3 func 18 Using where
+2 DEPENDENT SUBQUERY City index_subquery Population,Country Country 3 func 17 Using where
SELECT Name FROM Country
WHERE (Code IN (select Country from City where City.Population > 100000) OR
Name LIKE 'L%') AND
@@ -135,7 +135,7 @@ Country.SurfaceArea < 3000 AND Country.SurfaceArea > 10 AND
City.name LIKE '%Island%');
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL PRIMARY,SurfaceArea NULL NULL NULL 239 Using where
-1 PRIMARY City ref Country Country 3 world.Country.Code 18 Using where
+1 PRIMARY City ref Country Country 3 world.Country.Code 17 Using where
2 MATERIALIZED CountryLanguage ALL Percentage,Language NULL NULL NULL 984 Using where
SELECT *
FROM Country, City
@@ -160,7 +160,7 @@ Country.SurfaceArea < 3000 AND Country.SurfaceArea > 10 AND
Country.name LIKE '%Island%');
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL PRIMARY,SurfaceArea NULL NULL NULL 239 Using where
-1 PRIMARY City ref Country Country 3 world.Country.Code 18
+1 PRIMARY City ref Country Country 3 world.Country.Code 17
2 DEPENDENT SUBQUERY CountryLanguage index_subquery Percentage,Language Language 30 func 2 Using where
SELECT *
FROM Country, City
@@ -205,7 +205,7 @@ OR
(select Country, Language from CountryLanguage));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL PRIMARY,SurfaceArea NULL NULL NULL 239 Using where
-1 PRIMARY City ref Country Country 3 world.Country.Code 18 Using where
+1 PRIMARY City ref Country Country 3 world.Country.Code 17 Using where
3 MATERIALIZED CountryLanguage index PRIMARY,Language PRIMARY 33 NULL 984 Using index
2 DEPENDENT SUBQUERY CountryLanguage unique_subquery PRIMARY,Percentage,Language PRIMARY 33 func,func 1 Using where
SELECT City.Name, Country.Name
@@ -234,7 +234,7 @@ select count(*) from City
where City.id not in (select capital from Country
where capital is not null and population < 100000);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY City index NULL PRIMARY 4 NULL 4080 Using where; Using index
+1 PRIMARY City index NULL PRIMARY 4 NULL 4079 Using where; Using index
2 MATERIALIZED Country ALL NULL NULL NULL NULL 239 Using where
Q2.2e:
@@ -375,7 +375,7 @@ FROM City LEFT JOIN Country ON (Country = Code)
HAVING City.Name LIKE "Santa%");
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY CountryLanguage index NULL PRIMARY 33 NULL 984 Using where; Using index
-2 MATERIALIZED City ALL NULL NULL NULL NULL 4080
+2 MATERIALIZED City ALL NULL NULL NULL NULL 4079
2 MATERIALIZED Country eq_ref PRIMARY PRIMARY 3 world.City.Country 1 Using index
select count(*)
from CountryLanguage
@@ -433,7 +433,7 @@ capital is null);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL NULL NULL NULL NULL 239 Using where
1 PRIMARY City eq_ref PRIMARY PRIMARY 4 world.Country.Capital 1 Using where
-2 MATERIALIZED City index NULL CityName 35 NULL 4080 Using index
+2 MATERIALIZED City index NULL CityName 35 NULL 4079 Using index
select * from Country, City
where capital = id and
(City.name in (SELECT name FROM City
@@ -454,7 +454,7 @@ WHERE Country.Code NOT IN
(SELECT Country FROM City GROUP BY Name HAVING COUNT(Name) = 1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country ALL NULL NULL NULL NULL 239 Using where
-2 MATERIALIZED City ALL NULL NULL NULL NULL 4080 Using temporary
+2 MATERIALIZED City ALL NULL NULL NULL NULL 4079 Using temporary
SELECT Name
FROM Country
WHERE Country.Code NOT IN
@@ -517,7 +517,7 @@ GROUP BY City.Name
HAVING City.Name IN (select Name from Country where population < 1000000);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY Country index PRIMARY PRIMARY 3 NULL 239 Using index; Using temporary; Using filesort
-1 PRIMARY City ref Country Country 3 world.Country.Code 18
+1 PRIMARY City ref Country Country 3 world.Country.Code 17
2 MATERIALIZED Country ALL Name NULL NULL NULL 239 Using where
SELECT City.Name, City.Population
FROM City JOIN Country ON City.Country = Country.Code
@@ -542,7 +542,7 @@ SELECT Name, round(Population/1000)
FROM City
WHERE Country = "IND" AND Population < 100000);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY City ALL NULL NULL NULL NULL 4080 Using where
+1 PRIMARY City ALL NULL NULL NULL NULL 4079 Using where
2 DEPENDENT SUBQUERY City ref Population,Country,CityName CityName 35 func 1 Using where
3 DEPENDENT UNION City ref Population,Country,CityName CityName 35 func 1 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
diff --git a/mysql-test/main/subselect_mat_cost_bugs.result b/mysql-test/main/subselect_mat_cost_bugs.result
index 6377ae556d2..2c696ed36fd 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.result
+++ b/mysql-test/main/subselect_mat_cost_bugs.result
@@ -310,6 +310,7 @@ create index key3 on t2 (kp2);
SET @@optimizer_switch='materialization=off,semijoin=off,in_to_exists=on';
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
select c1 from t1 where c1 in (select kp1 from t2 where kp2 = 10 and c2 = 4) or c1 > 7;
diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result
index 8b1438db530..46b6dd0b8f4 100644
--- a/mysql-test/main/subselect_no_exists_to_in.result
+++ b/mysql-test/main/subselect_no_exists_to_in.result
@@ -1445,7 +1445,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1455,7 +1455,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1465,8 +1465,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1634,7 +1634,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -7023,8 +7023,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result
index 979b1ab5d47..d7b72eb5579 100644
--- a/mysql-test/main/subselect_no_mat.result
+++ b/mysql-test/main/subselect_no_mat.result
@@ -351,7 +351,7 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index
-1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t6 ALL i1 NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where `test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`
@@ -1448,7 +1448,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1458,7 +1458,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1468,8 +1468,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1637,7 +1637,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<expr_cache><`test`.`t1`.`s1`>(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result
index a43c4f031cf..0b528a7d3c1 100644
--- a/mysql-test/main/subselect_no_opts.result
+++ b/mysql-test/main/subselect_no_opts.result
@@ -1633,7 +1633,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -7014,8 +7014,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result
index f016f5e6b3c..5062c04af54 100644
--- a/mysql-test/main/subselect_no_scache.result
+++ b/mysql-test/main/subselect_no_scache.result
@@ -350,7 +350,7 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t7 index PRIMARY PRIMARY 4 NULL 2 100.00 Using index
-1 PRIMARY t6 ALL i1 NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t6 ALL i1 NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t7` join `test`.`t6` where `test`.`t6`.`clinic_uq` = `test`.`t7`.`uq`
@@ -1447,7 +1447,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 4 75.00 Using where; Using index; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using index
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`
select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1457,7 +1457,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`b` <> 30
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1467,8 +1467,8 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00
+1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 3 100.00 Using where; Using index; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where `test`.`t3`.`a` = `test`.`t1`.`b` and `test`.`t1`.`a` = `test`.`t2`.`a`
drop table t1, t2, t3;
@@ -1636,7 +1636,7 @@ Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.
explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index NULL s1 6 NULL 3 100.00 Using index
-2 SUBQUERY t2 index_subquery s1 s1 6 func 2 100.00 Using index; Using where; Full scan on NULL key
+2 SUBQUERY t2 index_subquery s1 s1 6 func 2 50.00 Using index; Using where; Full scan on NULL key
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`s1` AS `s1`,!<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where `test`.`t2`.`s1` < 'a2' having trigcond(`test`.`t2`.`s1` is null)))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
drop table t1,t2;
@@ -7029,8 +7029,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result
index 8e348100cb4..fa1312e5cda 100644
--- a/mysql-test/main/subselect_no_semijoin.result
+++ b/mysql-test/main/subselect_no_semijoin.result
@@ -7014,8 +7014,8 @@ SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index a a 5 NULL 2 Using where; Using index
-2 SUBQUERY <subquery3> ALL distinct_key NULL NULL NULL 1
-2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where
+2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 4 test.t2.c 1
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2
SELECT * FROM t1
WHERE a = (SELECT MAX(b) FROM t2 WHERE c IN (SELECT MAX(d) FROM t3)) OR a = 10;
diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result
index 03de4072815..b16cdc21a0b 100644
--- a/mysql-test/main/subselect_sj.result
+++ b/mysql-test/main/subselect_sj.result
@@ -3097,7 +3097,9 @@ insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
select a from t1, t2 where b between 1 and 2 and a in (select b from t2);
diff --git a/mysql-test/main/subselect_sj2_mat.result b/mysql-test/main/subselect_sj2_mat.result
index 65dfddce34d..c05db8d801f 100644
--- a/mysql-test/main/subselect_sj2_mat.result
+++ b/mysql-test/main/subselect_sj2_mat.result
@@ -76,8 +76,11 @@ insert into t3 select a,a, a,a,a from t0;
insert into t3 select a,a, a+100,a+100,a+100 from t0;
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
@@ -935,7 +938,9 @@ INSERT INTO t2 VALUES
(15,'g',6),(16,'x',7),(17,'f',8);
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
SELECT * FROM t1 WHERE b IN (
@@ -970,6 +975,7 @@ INSERT INTO t1 VALUES
('q','q'),('w','w'),('d','d'),('e','e');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
# This query returned 6 rows instead of 19
@@ -1006,6 +1012,7 @@ INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 SELECT * FROM t1;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
EXPLAIN
SELECT * FROM t2
@@ -1255,8 +1262,11 @@ INSERT IGNORE INTO t2 (t2id, t1idref) VALUES (200011, 200001),(200012, 200001),(
INSERT IGNORE INTO t3 VALUES (1, 200011, 1), (1, 200012, 2), (1, 200013, 3);
ANALYZE TABLE t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
set @tmp7474= @@optimizer_search_depth;
SET SESSION optimizer_search_depth = 1;
@@ -1875,12 +1885,17 @@ INSERT INTO `t5` VALUES
(677),(679),(680),(681),(682),(683),(684),(685),(686);
ANALYZE TABLE t1,t2,t3,t,t5;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
test.t analyze Error Table 'test.t' doesn't exist
test.t analyze status Operation failed
+test.t5 analyze status Engine-independent statistics collected
test.t5 analyze status OK
+set optimizer_switch='rowid_filter=off';
explain
SELECT * FROM t3
JOIN t4 ON (t4.id_product = t3.id_product AND t4.id_shop = 1)
@@ -1893,20 +1908,21 @@ AND t3.id_product IN (SELECT id_product FROM t2 t2_3 WHERE t2_3.id_t2 = 18 OR t2
AND t3.id_product IN (SELECT id_product FROM t2 t2_4 WHERE t2_4.id_t2 = 34 OR t2_4.id_t2 = 23)
AND t3.id_product IN (SELECT id_product FROM t2 t2_5 WHERE t2_5.id_t2 = 29 OR t2_5.id_t2 = 28 OR t2_5.id_t2 = 26);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using index
-1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.id_product 1 Using index
+1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 12
+1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t2_2.id_product 1 Using where; Using index
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
-1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t1.id_product,const 1 Using where; Using index
-1 PRIMARY <subquery6> eq_ref distinct_key distinct_key 4 func 1 Using where
1 PRIMARY t5 ALL NULL NULL NULL NULL 18 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <subquery6> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t3.id_product,const 1 Using where; Using index
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using where; Using index; Using join buffer (flat, BNL join)
+3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12 Using where
5 MATERIALIZED t2_4 range id_t2,id_product id_t2 5 NULL 18 Using index condition; Using where
-4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 33 Using index condition; Using where
-3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12
-2 MATERIALIZED t2_1 ref id_t2,id_product id_t2 5 const 51
6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 31 Using index condition; Using where
+2 MATERIALIZED t2_1 ref id_t2,id_product id_t2 5 const 51
+4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 33 Using index condition; Using where
+set optimizer_switch='rowid_filter=default';
drop table t1,t2,t3,t4,t5;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
diff --git a/mysql-test/main/subselect_sj2_mat.test b/mysql-test/main/subselect_sj2_mat.test
index 47e48283b44..91057f0b201 100644
--- a/mysql-test/main/subselect_sj2_mat.test
+++ b/mysql-test/main/subselect_sj2_mat.test
@@ -475,6 +475,8 @@ INSERT INTO `t5` VALUES
(677),(679),(680),(681),(682),(683),(684),(685),(686);
ANALYZE TABLE t1,t2,t3,t,t5;
+
+set optimizer_switch='rowid_filter=off';
explain
SELECT * FROM t3
@@ -488,6 +490,8 @@ AND t3.id_product IN (SELECT id_product FROM t2 t2_3 WHERE t2_3.id_t2 = 18 OR t2
AND t3.id_product IN (SELECT id_product FROM t2 t2_4 WHERE t2_4.id_t2 = 34 OR t2_4.id_t2 = 23)
AND t3.id_product IN (SELECT id_product FROM t2 t2_5 WHERE t2_5.id_t2 = 29 OR t2_5.id_t2 = 28 OR t2_5.id_t2 = 26);
+set optimizer_switch='rowid_filter=default';
+
drop table t1,t2,t3,t4,t5;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result
index 92719507742..ca6eaeb8e4e 100644
--- a/mysql-test/main/subselect_sj_jcl6.result
+++ b/mysql-test/main/subselect_sj_jcl6.result
@@ -3111,7 +3111,9 @@ insert into t2 select b+10 from t2;
insert into t2 select b+10 from t2;
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
explain
select a from t1, t2 where b between 1 and 2 and a in (select b from t2);
diff --git a/mysql-test/main/subselect_sj_mat.result b/mysql-test/main/subselect_sj_mat.result
index 3f99d340af8..ee45627749c 100644
--- a/mysql-test/main/subselect_sj_mat.result
+++ b/mysql-test/main/subselect_sj_mat.result
@@ -328,7 +328,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 16 func,func 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 100.00
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-3 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
+3 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 2 100.00 Using index
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` semi join (`test`.`t2`) semi join (`test`.`t2i` join `test`.`t3`) where `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and `test`.`t2`.`b1` > '0' and `test`.`t3`.`c2` > '0'
@@ -370,7 +370,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 16 func,func 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 16 func,func 1 100.00
5 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-5 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
+5 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 2 100.00 Using index
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 100.00 Using where
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
3 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
@@ -396,7 +396,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 16 func,func 1 100.00
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary; End temporary; Using join buffer (flat, BNL join)
5 MATERIALIZED t3c ALL NULL NULL NULL NULL 4 100.00 Using where
-5 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
+5 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3c.c1,test.t3c.c2 2 100.00 Using index
4 MATERIALIZED t3b ALL NULL NULL NULL NULL 4 100.00 Using where
3 DEPENDENT SUBQUERY t3a ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
@@ -429,7 +429,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery5> eq_ref distinct_key # # # 1 100.00 #
1 PRIMARY <subquery2> eq_ref distinct_key # # # 1 100.00 #
5 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
-5 MATERIALIZED t2i index it2i1,it2i2,it2i3 # # # 5 80.00 #
+5 MATERIALIZED t2i ref it2i1,it2i2,it2i3 # # # 2 100.00 #
2 MATERIALIZED t2 ALL NULL # # # 5 100.00 #
4 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
3 MATERIALIZED t3 ALL NULL # # # 4 100.00 #
@@ -464,7 +464,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 16 func,func 1 100.00
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-4 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
+4 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 2 100.00 Using index
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
@@ -485,15 +485,15 @@ where (c1, c2) in (select b1, b2 from t2i where b2 > '0')) and
a1 = c1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+1 PRIMARY <subquery4> ALL distinct_key NULL NULL NULL 4 100.00 Using where
1 PRIMARY t3 ALL NULL NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
-1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 16 func,func 1 100.00
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 4 100.00 Using where
-4 MATERIALIZED t2i index it2i1,it2i2,it2i3 it2i3 18 NULL 5 80.00 Using where; Using index; Using join buffer (flat, BNL join)
+4 MATERIALIZED t2i ref it2i1,it2i2,it2i3 it2i3 18 test.t3.c1,test.t3.c2 2 100.00 Using index
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
3 DEPENDENT UNION t2 ALL NULL NULL NULL NULL 5 100.00 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t1` semi join (`test`.`t2i` join `test`.`t3`) join `test`.`t3` where `test`.`t3`.`c1` = `test`.`t1`.`a1` and `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select `test`.`t1`.`a1`,`test`.`t1`.`a2` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t1`.`a1` and <cache>(`test`.`t1`.`a2`) = `test`.`t1`.`a2` union /* select#3 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1` and <cache>(`test`.`t1`.`a2`) = `test`.`t2`.`b2`))) and `test`.`t3`.`c2` > '0'
+Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t1` semi join (`test`.`t2i` join `test`.`t3`) join `test`.`t3` where `test`.`t3`.`c1` = `test`.`t1`.`a1` and `test`.`t2i`.`b1` = `test`.`t3`.`c1` and `test`.`t3`.`c1` = `test`.`t1`.`a1` and `test`.`t2i`.`b2` = `test`.`t3`.`c2` and `test`.`t3`.`c2` = `test`.`t3`.`c2` and <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select `test`.`t1`.`a1`,`test`.`t1`.`a2` from `test`.`t1` where `test`.`t1`.`a1` > '0' and <cache>(`test`.`t1`.`a1`) = `test`.`t1`.`a1` and <cache>(`test`.`t1`.`a2`) = `test`.`t1`.`a2` union /* select#3 */ select `test`.`t2`.`b1`,`test`.`t2`.`b2` from `test`.`t2` where `test`.`t2`.`b1` < '9' and <cache>(`test`.`t1`.`a1`) = `test`.`t2`.`b1` and <cache>(`test`.`t1`.`a2`) = `test`.`t2`.`b2`))) and `test`.`t3`.`c2` > '0'
select * from t1, t3
where (a1, a2) in (select * from t1 where a1 > '0' UNION select * from t2 where b1 < '9') and
(c1, c2) in (select c1, c2 from t3
@@ -1730,8 +1730,8 @@ DROP TABLE t1,t2,t3,t4,t5;
CREATE TABLE t2 (a int);
INSERT IGNORE INTO t2 VALUES ('a'),('a');
Warnings:
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 2
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`a` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`a` at row 2
CREATE TABLE t4 (a varchar(1));
INSERT INTO t4 VALUES ('m'),('o');
CREATE TABLE t3 (a varchar(1) , b varchar(1) ) ;
@@ -2592,7 +2592,7 @@ select * from t1 where (a,b) in (select max(a),b from t2 group by b);
show status where Variable_name like 'Handler_read%' or Variable_name like 'Handler_%write%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 5000
+Handler_read_key 5004
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
diff --git a/mysql-test/main/system_mysql_db.result b/mysql-test/main/system_mysql_db.result
index a4c414888ca..e7cd9bc628b 100644
--- a/mysql-test/main/system_mysql_db.result
+++ b/mysql-test/main/system_mysql_db.result
@@ -6,6 +6,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -60,57 +61,8 @@ db CREATE TABLE `db` (
KEY `User` (`User`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges'
show create table user;
-Table Create Table
-user CREATE TABLE `user` (
- `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
- `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
- `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `ssl_cipher` blob NOT NULL,
- `x509_issuer` blob NOT NULL,
- `x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
- `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
- `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
- `max_user_connections` int(11) NOT NULL DEFAULT 0,
- `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
- `authentication_string` text COLLATE utf8_bin NOT NULL,
- `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
- `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
- PRIMARY KEY (`Host`,`User`)
-) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
+View Create View character_set_client collation_connection
+user CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci
show create table func;
Table Create Table
func CREATE TABLE `func` (
@@ -120,6 +72,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -191,7 +151,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -217,7 +177,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
diff --git a/mysql-test/main/no_password_column-mdev-11170.result b/mysql-test/main/system_mysql_db_507.result
index 94d49a4e762..1fa4af66719 100644
--- a/mysql-test/main/no_password_column-mdev-11170.result
+++ b/mysql-test/main/system_mysql_db_507.result
@@ -3,8 +3,6 @@
# Fatal error: mysql.user table is damaged or in
# unsupported 3.20 format
#
-create table backup_user like mysql.user;
-insert into backup_user select * from mysql.user;
#
# Original mysql.user table
#
@@ -60,7 +58,12 @@ max_statement_time decimal(12,6) NO 0.000000
#
# Drop the password column.
#
-alter table mysql.user drop column password;
+alter table mysql.user drop column password,
+drop column is_role,
+drop column default_role,
+add column password_last_changed timestamp null default null after password_expired,
+add column password_lifetime smallint unsigned after password_last_changed,
+add column account_locked enum('n','y') character set utf8 not null default 'n' after password_lifetime;
flush privileges;
#
# Create users without the password column present.
@@ -164,6 +167,3 @@ ioo % Y mysql_old_password 7a8f886d28473e85
#
# Reset to final original state.
#
-drop table mysql.user;
-rename table backup_user to mysql.user;
-flush privileges;
diff --git a/mysql-test/main/no_password_column-mdev-11170.test b/mysql-test/main/system_mysql_db_507.test
index 2cc4ba82ee8..b57a2a09c8e 100644
--- a/mysql-test/main/no_password_column-mdev-11170.test
+++ b/mysql-test/main/system_mysql_db_507.test
@@ -5,9 +5,7 @@
--echo # unsupported 3.20 format
--echo #
-
-create table backup_user like mysql.user;
-insert into backup_user select * from mysql.user;
+--source include/switch_to_mysql_user.inc
--echo #
--echo # Original mysql.user table
@@ -17,7 +15,12 @@ describe mysql.user;
--echo #
--echo # Drop the password column.
--echo #
-alter table mysql.user drop column password;
+alter table mysql.user drop column password,
+ drop column is_role,
+ drop column default_role,
+ add column password_last_changed timestamp null default null after password_expired,
+ add column password_lifetime smallint unsigned after password_last_changed,
+ add column account_locked enum('n','y') character set utf8 not null default 'n' after password_lifetime;
flush privileges;
--echo #
@@ -85,11 +88,7 @@ select user, host, select_priv, plugin, authentication_string from mysql.user
where user like "%oo"
order by user;
-
--echo #
--echo # Reset to final original state.
--echo #
-drop table mysql.user;
-rename table backup_user to mysql.user;
-
-flush privileges;
+--source include/switch_to_mysql_global_priv.inc
diff --git a/mysql-test/main/system_mysql_db_fix40123.result b/mysql-test/main/system_mysql_db_fix40123.result
index d76a2ef923e..c4c4d3df706 100644
--- a/mysql-test/main/system_mysql_db_fix40123.result
+++ b/mysql-test/main/system_mysql_db_fix40123.result
@@ -6,6 +6,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -121,6 +122,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -192,7 +201,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -218,7 +227,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
diff --git a/mysql-test/main/system_mysql_db_fix40123.test b/mysql-test/main/system_mysql_db_fix40123.test
index 2d17a0964e5..3f313c4ec1f 100644
--- a/mysql-test/main/system_mysql_db_fix40123.test
+++ b/mysql-test/main/system_mysql_db_fix40123.test
@@ -72,7 +72,7 @@ CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL,
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
-- enable_query_log
diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result
index fdc708db313..3a79afb04f0 100644
--- a/mysql-test/main/system_mysql_db_fix50030.result
+++ b/mysql-test/main/system_mysql_db_fix50030.result
@@ -6,6 +6,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -121,6 +122,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -192,7 +201,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -218,7 +227,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
diff --git a/mysql-test/main/system_mysql_db_fix50030.test b/mysql-test/main/system_mysql_db_fix50030.test
index 9506c3465e7..33dcc873615 100644
--- a/mysql-test/main/system_mysql_db_fix50030.test
+++ b/mysql-test/main/system_mysql_db_fix50030.test
@@ -79,7 +79,7 @@ INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','r
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
-- enable_query_log
diff --git a/mysql-test/main/system_mysql_db_fix50117.result b/mysql-test/main/system_mysql_db_fix50117.result
index d76a2ef923e..c4c4d3df706 100644
--- a/mysql-test/main/system_mysql_db_fix50117.result
+++ b/mysql-test/main/system_mysql_db_fix50117.result
@@ -6,6 +6,7 @@ db
event
func
general_log
+global_priv
gtid_slave_pos
help_category
help_keyword
@@ -121,6 +122,14 @@ func CREATE TABLE `func` (
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions'
+show create table global_priv;
+Table Create Table
+global_priv CREATE TABLE `global_priv` (
+ `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ `Priv` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '{}' CHECK (json_valid(`Priv`)),
+ PRIMARY KEY (`Host`,`User`)
+) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges'
show create table tables_priv;
Table Create Table
tables_priv CREATE TABLE `tables_priv` (
@@ -192,7 +201,7 @@ proc CREATE TABLE `proc` (
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
@@ -218,7 +227,7 @@ event CREATE TABLE `event` (
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
- `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NOT NULL DEFAULT '',
+ `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
diff --git a/mysql-test/main/system_mysql_db_fix50117.test b/mysql-test/main/system_mysql_db_fix50117.test
index f8bef3da162..2fe6869d761 100644
--- a/mysql-test/main/system_mysql_db_fix50117.test
+++ b/mysql-test/main/system_mysql_db_fix50117.test
@@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_b
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, transaction_registry, table_stats, column_stats, index_stats, roles_mapping, gtid_slave_pos, global_priv;
-- enable_query_log
diff --git a/mysql-test/main/temp_table_frm.result b/mysql-test/main/temp_table_frm.result
index 19c66380af2..a9c59ff5969 100644
--- a/mysql-test/main/temp_table_frm.result
+++ b/mysql-test/main/temp_table_frm.result
@@ -1,3 +1,7 @@
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set @@optimizer_use_condition_selectivity=1;
+set @@use_stat_tables= NEVER;
set @@session.max_heap_table_size=16*1024*1024;
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
create temporary table t2 (a int) engine=memory;
@@ -18,4 +22,6 @@ OPENED_PLUGIN_LIBRARIES 0
OPENED_TABLE_DEFINITIONS 2
OPENED_TABLES 1
OPENED_VIEWS 0
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
drop table t1;
diff --git a/mysql-test/main/temp_table_frm.test b/mysql-test/main/temp_table_frm.test
index 178bd15004b..ddc4ffa575c 100644
--- a/mysql-test/main/temp_table_frm.test
+++ b/mysql-test/main/temp_table_frm.test
@@ -3,6 +3,11 @@
#
# Ensure we don't overflow the internal heap table size in the join
+set @save_use_stat_tables= @@use_stat_tables;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+
+set @@optimizer_use_condition_selectivity=1;
+set @@use_stat_tables= NEVER;
set @@session.max_heap_table_size=16*1024*1024;
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
create temporary table t2 (a int) engine=memory;
@@ -13,4 +18,6 @@ let $tmpdir= `select @@tmpdir`;
truncate table t2;
select variable_name, session_status.variable_value - t1.variable_value
from information_schema.session_status join t1 using (variable_name);
-drop table t1;
+set @@use_stat_tables= @save_use_stat_tables;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+drop table t1; \ No newline at end of file
diff --git a/mysql-test/main/temporal_literal.result b/mysql-test/main/temporal_literal.result
index d2417d7f9eb..2197b990f3b 100644
--- a/mysql-test/main/temporal_literal.result
+++ b/mysql-test/main/temporal_literal.result
@@ -294,17 +294,17 @@ SELECT TIMESTAMP'2001-00-00 00:00:00.9999999';
TIMESTAMP'2001-00-00 00:00:00.9999999'
2001-00-00 00:00:00.999999
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-00-00 00:00:00.9999999'
+Note 1292 Truncated incorrect DATETIME value: '2001-00-00 00:00:00.9999999'
SELECT TIMESTAMP'2001-00-01 00:00:00.9999999';
TIMESTAMP'2001-00-01 00:00:00.9999999'
2001-00-01 00:00:00.999999
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-00-01 00:00:00.9999999'
+Note 1292 Truncated incorrect DATETIME value: '2001-00-01 00:00:00.9999999'
SELECT TIMESTAMP'2001-01-00 00:00:00.9999999';
TIMESTAMP'2001-01-00 00:00:00.9999999'
2001-01-00 00:00:00.999999
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-01-00 00:00:00.9999999'
+Note 1292 Truncated incorrect DATETIME value: '2001-01-00 00:00:00.9999999'
#
# String literal with bad dates and nanoseconds to DATETIME(N)
#
@@ -416,7 +416,7 @@ SELECT TIME'10:10:10.1234567';
TIME'10:10:10.1234567'
10:10:10.123456
Warnings:
-Note 1292 Truncated incorrect time value: '10:10:10.1234567'
+Note 1292 Truncated incorrect TIME value: '10:10:10.1234567'
SELECT TIME('10:10:10.1234567');
TIME('10:10:10.1234567')
10:10:10.123456
@@ -440,7 +440,7 @@ SELECT TIMESTAMP'2001-01-01 10:10:10.1234567';
TIMESTAMP'2001-01-01 10:10:10.1234567'
2001-01-01 10:10:10.123456
Warnings:
-Note 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567'
+Note 1292 Truncated incorrect DATETIME value: '2001-01-01 10:10:10.1234567'
SELECT TIMESTAMP('2001-01-01 10:10:10.1234567');
TIMESTAMP('2001-01-01 10:10:10.1234567')
2001-01-01 10:10:10.123456
@@ -463,7 +463,7 @@ Warning 1292 Truncated incorrect datetime value: '2001-01-01 10:10:10.1234567xyz
CREATE TABLE t1 (a TIME(6));
INSERT INTO t1 VALUES (TIME'10:20:30.1234567');
Warnings:
-Note 1292 Truncated incorrect time value: '10:20:30.1234567'
+Note 1292 Truncated incorrect TIME value: '10:20:30.1234567'
INSERT INTO t1 VALUES (TIME('10:20:30.1234567'));
Warnings:
Note 1292 Truncated incorrect time value: '10:20:30.1234567'
diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result
index 6de62d7ea30..dd137045d1a 100644
--- a/mysql-test/main/timezone2.result
+++ b/mysql-test/main/timezone2.result
@@ -353,5 +353,207 @@ Warning 1292 Truncated incorrect datetime value: '00:00:00'
SET old_mode=DEFAULT;
SET timestamp=DEFAULT;
#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+SELECT UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+a
+1288481125
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 SELECT MAX(a) AS a FROM t1;
+SELECT a, UNIX_TIMESTAMP(a) FROM t2;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:25 1288481125
+DROP TABLE t2;
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t2 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(t1.a), UNIX_TIMESTAMP(t2.a) FROM t1,t2;
+UNIX_TIMESTAMP(t1.a) UNIX_TIMESTAMP(t2.a)
+1288477526 1288481125
+SELECT * FROM t1,t2 WHERE t1.a < t2.a;
+a a
+2010-10-31 02:25:26 2010-10-31 02:25:25
+DROP TABLE t1,t2;
+BEGIN NOT ATOMIC
+DECLARE a,b TIMESTAMP;
+SET time_zone='+00:00';
+SET a=FROM_UNIXTIME(1288477526);
+SET b=FROM_UNIXTIME(1288481125);
+SELECT a < b;
+SET time_zone='Europe/Moscow';
+SELECT a < b;
+END;
+$$
+a < b
+1
+a < b
+1
+CREATE OR REPLACE FUNCTION f1(uts INT) RETURNS TIMESTAMP
+BEGIN
+DECLARE ts TIMESTAMP;
+DECLARE tz VARCHAR(64) DEFAULT @@time_zone;
+SET time_zone='+00:00';
+SET ts=FROM_UNIXTIME(uts);
+SET time_zone=tz;
+RETURN ts;
+END;
+$$
+SET time_zone='+00:00';
+SELECT f1(1288477526) < f1(1288481125);
+f1(1288477526) < f1(1288481125)
+1
+SET time_zone='Europe/Moscow';
+SELECT f1(1288477526) < f1(1288481125);
+f1(1288477526) < f1(1288481125)
+1
+DROP FUNCTION f1;
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/,
+FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT *, LEAST(a,b) FROM t1;
+a b LEAST(a,b)
+2010-10-30 22:25:26 2010-10-30 23:25:25 2010-10-30 22:25:26
+SET time_zone='Europe/Moscow';
+SELECT *, LEAST(a,b) FROM t1;
+a b LEAST(a,b)
+2010-10-31 02:25:26 2010-10-31 02:25:25 2010-10-31 02:25:26
+SELECT UNIX_TIMESTAMP(a), UNIX_TIMESTAMP(b), UNIX_TIMESTAMP(LEAST(a,b)) FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) UNIX_TIMESTAMP(LEAST(a,b))
+1288477526 1288481125 1288477526
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP,c TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (
+FROM_UNIXTIME(1288477526) /*summer time in Moscow*/,
+FROM_UNIXTIME(1288481125) /*winter time in Moscow*/,
+FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SELECT b BETWEEN a AND c FROM t1;
+b BETWEEN a AND c
+1
+SET time_zone='Europe/Moscow';
+SELECT b BETWEEN a AND c FROM t1;
+b BETWEEN a AND c
+1
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-30 22:25:26 1288477526
+2010-10-30 23:25:25 1288481125
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-30 22:25:26 1288477526
+2010-10-30 23:25:25 1288481125
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:25 1288481125
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 GROUP BY a;
+a UNIX_TIMESTAMP(a)
+2010-10-31 02:25:26 1288477526
+2010-10-31 02:25:26 1288481126
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 ne
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 ne
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP,c TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126),FROM_UNIXTIME(1288481127));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 0
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+UNIX_TIMESTAMP(a) UNIX_TIMESTAMP(b) x
+1288477526 1288481126 0
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+DROP TABLE t1;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000000),FROM_UNIXTIME(1200000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000001),FROM_UNIXTIME(1200000001));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000000),FROM_UNIXTIME(1400000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000001),FROM_UNIXTIME(1400000001));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+a b
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+a b
+DROP TABLE t1;
+#
+# MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a INT, ts TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1, FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+CREATE TABLE t2 AS SELECT ts, COALESCE(ts) AS cts FROM t1 GROUP BY cts;
+SELECT ts, cts, UNIX_TIMESTAMP(ts) AS uts, UNIX_TIMESTAMP(cts) AS ucts FROM t2;
+ts cts uts ucts
+2010-10-31 02:25:26 2010-10-31 02:25:26 1288481126 1288481126
+DROP TABLE t1,t2;
+SET time_zone=DEFAULT;
+#
# End of 10.4 tests
#
diff --git a/mysql-test/main/timezone2.test b/mysql-test/main/timezone2.test
index 773b40ec86c..db515653651 100644
--- a/mysql-test/main/timezone2.test
+++ b/mysql-test/main/timezone2.test
@@ -325,5 +325,184 @@ SET old_mode=DEFAULT;
SET timestamp=DEFAULT;
--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+
+# MAX()
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+SELECT UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 SELECT MAX(a) AS a FROM t1;
+SELECT a, UNIX_TIMESTAMP(a) FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+# Comparison
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Moscow*/);
+INSERT INTO t2 VALUES (FROM_UNIXTIME(1288477526+3599) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(t1.a), UNIX_TIMESTAMP(t2.a) FROM t1,t2;
+SELECT * FROM t1,t2 WHERE t1.a < t2.a;
+DROP TABLE t1,t2;
+
+
+# SP variable comparison
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE a,b TIMESTAMP;
+ SET time_zone='+00:00';
+ SET a=FROM_UNIXTIME(1288477526);
+ SET b=FROM_UNIXTIME(1288481125);
+ SELECT a < b;
+ SET time_zone='Europe/Moscow';
+ SELECT a < b;
+END;
+$$
+DELIMITER ;$$
+
+
+# SP function comparison
+DELIMITER $$;
+CREATE OR REPLACE FUNCTION f1(uts INT) RETURNS TIMESTAMP
+BEGIN
+ DECLARE ts TIMESTAMP;
+ DECLARE tz VARCHAR(64) DEFAULT @@time_zone;
+ SET time_zone='+00:00';
+ SET ts=FROM_UNIXTIME(uts);
+ SET time_zone=tz;
+ RETURN ts;
+END;
+$$
+DELIMITER ;$$
+SET time_zone='+00:00';
+SELECT f1(1288477526) < f1(1288481125);
+SET time_zone='Europe/Moscow';
+SELECT f1(1288477526) < f1(1288481125);
+DROP FUNCTION f1;
+
+
+# LEAST()
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/,
+ FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT *, LEAST(a,b) FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT *, LEAST(a,b) FROM t1;
+SELECT UNIX_TIMESTAMP(a), UNIX_TIMESTAMP(b), UNIX_TIMESTAMP(LEAST(a,b)) FROM t1;
+DROP TABLE t1;
+
+
+# BETWEEN
+CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP,c TIMESTAMP);
+SET time_zone='+00:00';
+INSERT INTO t1 VALUES (
+ FROM_UNIXTIME(1288477526) /*summer time in Moscow*/,
+ FROM_UNIXTIME(1288481125) /*winter time in Moscow*/,
+ FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SELECT b BETWEEN a AND c FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT b BETWEEN a AND c FROM t1;
+DROP TABLE t1;
+
+
+# ORDER BY
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481125) /*winter time in Moscow*/);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+SELECT COALESCE(a) AS a, UNIX_TIMESTAMP(a) FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+
+# GROUP BY
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526) /*summer time in Mowcow*/);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+SELECT a, UNIX_TIMESTAMP(a) FROM t1 GROUP BY a;
+DROP TABLE t1;
+
+
+# CASE
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),CASE a WHEN b THEN 'eq' ELSE 'ne' END AS x FROM t1;
+DROP TABLE t1;
+
+
+# IN
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP,c TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126),FROM_UNIXTIME(1288481127));
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+SET time_zone='Europe/Moscow';
+SELECT UNIX_TIMESTAMP(a),UNIX_TIMESTAMP(b),a IN (b,c) AS x FROM t1;
+DROP TABLE t1;
+
+# Comparison and IN in combination with a subquery (with one row)
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+DROP TABLE t1;
+
+# Comparison and IN in combinarion with a subquery (with multiple rows)
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000000),FROM_UNIXTIME(1200000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1100000001),FROM_UNIXTIME(1200000001));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1288477526),FROM_UNIXTIME(1288481126));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000000),FROM_UNIXTIME(1400000000));
+INSERT INTO t1 VALUES (FROM_UNIXTIME(1300000001),FROM_UNIXTIME(1400000001));
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+
+SET time_zone='Europe/Moscow';
+SELECT * FROM t1 WHERE a = (SELECT MAX(b) FROM t1);
+SELECT * FROM t1 WHERE a = (SELECT MIN(b) FROM t1);
+SELECT * FROM t1 WHERE a IN ((SELECT MAX(b) FROM t1), (SELECT MIN(b) FROM t1));
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (a INT, ts TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1, FROM_UNIXTIME(1288481126) /*winter time in Moscow*/);
+SET time_zone='Europe/Moscow';
+CREATE TABLE t2 AS SELECT ts, COALESCE(ts) AS cts FROM t1 GROUP BY cts;
+SELECT ts, cts, UNIX_TIMESTAMP(ts) AS uts, UNIX_TIMESTAMP(cts) AS ucts FROM t2;
+DROP TABLE t1,t2;
+SET time_zone=DEFAULT;
+
+--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result
index 72d0658386d..1adf3c68a08 100644
--- a/mysql-test/main/trigger.result
+++ b/mysql-test/main/trigger.result
@@ -622,7 +622,7 @@ drop table t1;
set sql_mode="traditional";
create table t1 (a date);
insert into t1 values ('2004-01-00');
-ERROR 22007: Incorrect date value: '2004-01-00' for column 'a' at row 1
+ERROR 22007: Incorrect date value: '2004-01-00' for column `test`.`t1`.`a` at row 1
set sql_mode="";
create trigger t1_bi before insert on t1 for each row set new.a = '2004-01-00';
set sql_mode="traditional";
@@ -2146,7 +2146,7 @@ insert into t2 values (1),(2);
delete from t1 where i=1;
show status like 'Opened_tables';
Variable_name Value
-Opened_tables 3
+Opened_tables 6
select * from t1;
i
2
diff --git a/mysql-test/main/trigger_notembedded.test b/mysql-test/main/trigger_notembedded.test
index a31594826e7..051cd43f16f 100644
--- a/mysql-test/main/trigger_notembedded.test
+++ b/mysql-test/main/trigger_notembedded.test
@@ -907,7 +907,7 @@ connection flush;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for global read lock";
+ where state = "Waiting for backup lock";
--source include/wait_condition.inc
create trigger t1_bi before insert on t1 for each row begin end;
unlock tables;
diff --git a/mysql-test/main/truncate_coverage.result b/mysql-test/main/truncate_coverage.result
index 078de1ef3ab..9a343832b69 100644
--- a/mysql-test/main/truncate_coverage.result
+++ b/mysql-test/main/truncate_coverage.result
@@ -40,7 +40,7 @@ TRUNCATE TABLE m1;
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
# Sending:
-FLUSH TABLES;
+FLUSH TABLES m1;
connection default;
# Waiting for FLUSH TABLES to be blocked.
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/truncate_coverage.test b/mysql-test/main/truncate_coverage.test
index 3351ce84232..1b793c6638c 100644
--- a/mysql-test/main/truncate_coverage.test
+++ b/mysql-test/main/truncate_coverage.test
@@ -81,12 +81,12 @@ SET DEBUG_SYNC= 'open_tables_after_open_and_process_table SIGNAL opened WAIT_FOR
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
--echo # Sending:
---send FLUSH TABLES
+--send FLUSH TABLES m1
connection default;
--echo # Waiting for FLUSH TABLES to be blocked.
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
- WHERE state= 'Waiting for table flush' AND info= 'FLUSH TABLES';
+ WHERE state= 'Waiting for table metadata lock' AND info= 'FLUSH TABLES m1';
--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL dropped';
diff --git a/mysql-test/main/type_date.result b/mysql-test/main/type_date.result
index 3515312d5b7..149fafb57f4 100644
--- a/mysql-test/main/type_date.result
+++ b/mysql-test/main/type_date.result
@@ -108,7 +108,7 @@ DROP TABLE t1, t2, t3;
CREATE TABLE t1 (y YEAR);
INSERT IGNORE INTO t1 VALUES ('abc');
Warnings:
-Warning 1366 Incorrect integer value: 'abc' for column 'y' at row 1
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`y` at row 1
SELECT * FROM t1;
y
0000
@@ -221,7 +221,7 @@ a
0000-00-00
0000-00-00
INSERT INTO t1 VALUES ('0000-00-00');
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'a' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`a` at row 1
SET SQL_MODE=DEFAULT;
DROP TABLE t1,t2;
CREATE TABLE t1 (a DATE);
@@ -250,7 +250,7 @@ a
1000-00-00
1000-00-00
INSERT INTO t1 VALUES ('1000-00-00');
-ERROR 22007: Incorrect date value: '1000-00-00' for column 'a' at row 1
+ERROR 22007: Incorrect date value: '1000-00-00' for column `test`.`t1`.`a` at row 1
SET SQL_MODE=DEFAULT;
DROP TABLE t1,t2;
CREATE TABLE t1 SELECT curdate() AS f1;
@@ -504,7 +504,7 @@ SET sql_mode=DEFAULT;
CREATE TABLE t1 (a DATE DEFAULT '0000-00-00');
SET sql_mode=TRADITIONAL;
INSERT INTO t1 VALUES ('0000-00-00');
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'a' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`a` at row 1
INSERT INTO t1 VALUES ();
ERROR 22007: Incorrect default value '0000-00-00' for column 'a'
INSERT INTO t1 VALUES (DEFAULT);
@@ -545,7 +545,7 @@ CREATE TABLE t1 (a DATE);;
INSERT INTO t1 VALUES (0);
SET sql_mode='TRADITIONAL';
CREATE TABLE t2 AS SELECT * FROM t1;
-ERROR 22007: Incorrect date value: '0000-00-00' for column 'a' at row 1
+ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t2`.`a` at row 1
DROP TABLE t1;
#
# End of MDEV-8373 Zero date can be inserted in strict no-zero mode through CREATE TABLE AS SELECT timestamp_field
@@ -819,9 +819,9 @@ DATE(a) DATE(b) DATE(c)
NULL NULL NULL
2001-01-01 2001-01-01 2001-01-01
Warnings:
-Warning 1292 Incorrect datetime value: '1' for column 'a' at row 1
-Warning 1292 Incorrect datetime value: '1' for column 'b' at row 1
-Warning 1292 Incorrect datetime value: '1' for column 'c' at row 1
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`a` at row 1
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`b` at row 1
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`c` at row 1
SELECT DATE(COALESCE(a)), DATE(COALESCE(b)), DATE(COALESCE(c)) FROM t1;
DATE(COALESCE(a)) DATE(COALESCE(b)) DATE(COALESCE(c))
NULL NULL NULL
@@ -839,9 +839,9 @@ DATE(a) DATE(b) DATE(c)
NULL NULL NULL
2001-01-01 2001-01-01 2001-01-01
Warnings:
-Warning 1292 Incorrect datetime value: '1' for column 'a' at row 1
-Warning 1292 Incorrect datetime value: '1' for column 'b' at row 1
-Warning 1292 Incorrect datetime value: '1' for column 'c' at row 1
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`a` at row 1
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`b` at row 1
+Warning 1292 Incorrect datetime value: '1' for column `test`.`t1`.`c` at row 1
SELECT DATE(COALESCE(a)), DATE(COALESCE(b)), DATE(COALESCE(c)) FROM t1;
DATE(COALESCE(a)) DATE(COALESCE(b)) DATE(COALESCE(c))
NULL NULL NULL
diff --git a/mysql-test/main/type_date_round.result b/mysql-test/main/type_date_round.result
new file mode 100644
index 00000000000..0da78c6afe5
--- /dev/null
+++ b/mysql-test/main/type_date_round.result
@@ -0,0 +1,174 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# DATE: SET
+#
+CREATE TABLE t1 (a DATE, b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT a FROM t1;
+a
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+#
+# DATE: ALTER
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATE;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT a FROM t1;
+a
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATE;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATE;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2000-12-31
+2000-12-31
+DROP TABLE t1;
+#
+# DATE: CAST
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATE) FROM t1;
+a CAST(a AS DATE)
+2000-12-31 23:59:59.9999 2000-12-31
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATE) FROM t1;
+a CAST(a AS DATE)
+2000-12-31 23:59:59.9999 2000-12-31
+2000-12-31 23:59:59.9999999 2000-12-31
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATE) FROM t1;
+a CAST(a AS DATE)
+20001231235959.9999000000 2000-12-31
+20001231235959.9999999000 2000-12-31
+DROP TABLE t1;
+#
+# Equal field propagation
+#
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (20010101);
+INSERT INTO t1 VALUES (20010102);
+SELECT * FROM t1 WHERE a= 20010101235959.9999999;
+a
+2001-01-02
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999';
+a
+2001-01-02
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+a
+2001-01-02
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+a
+2001-01-02
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DATE'2001-01-02'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DATE'2001-01-02'
+DROP TABLE t1;
+#
+# Comparing non-temporal to DATE
+#
+# Although conversion from non-temporal to DATE (e.g. on SET) does not round,
+# comparison between non-temporal to DATE is performed as DATETIME.
+# So rounding does happen here.
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE CONCAT(a)=DATE'2001-01-02';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+a
+20010101235959.9999999
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+a
+20010101235959.9999999
+DROP TABLE t1;
diff --git a/mysql-test/main/type_date_round.test b/mysql-test/main/type_date_round.test
new file mode 100644
index 00000000000..61e1d0a401c
--- /dev/null
+++ b/mysql-test/main/type_date_round.test
@@ -0,0 +1,113 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # DATE: SET
+--echo #
+
+CREATE TABLE t1 (a DATE, b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATE, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATE, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # DATE: ALTER
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATE;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATE;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATE;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # DATE: CAST
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATE) FROM t1;
+DROP TABLE t1;
+
+# This truncates microseconds but rounds nanoseconds (MySQL Bug #92475)
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATE) FROM t1;
+DROP TABLE t1;
+
+# This truncates microseconds but rounds nanoseconds (MySQL Bug #92475)
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATE) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Equal field propagation
+--echo #
+
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES (20010101);
+INSERT INTO t1 VALUES (20010102);
+# DATE is compared to non-temporal as DATETIME
+# In the below queries nanoseconds should round to microseconds
+SELECT * FROM t1 WHERE a= 20010101235959.9999999;
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999';
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND a>='2001-01-01 23:59:59.9999999';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 23:59:59.9999999' AND CONCAT(a)='2001-01-02';
+DROP TABLE t1;
+
+
+--echo #
+--echo # Comparing non-temporal to DATE
+--echo #
+
+--echo # Although conversion from non-temporal to DATE (e.g. on SET) does not round,
+--echo # comparison between non-temporal to DATE is performed as DATETIME.
+--echo # So rounding does happen here.
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+SELECT * FROM t1 WHERE CONCAT(a)=DATE'2001-01-02';
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=DATE'2001-01-02';
+SELECT * FROM t1 WHERE COALESCE(a)=DATE'2001-01-02';
+DROP TABLE t1;
diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result
index 4a95556db55..64c523f26ce 100644
--- a/mysql-test/main/type_datetime.result
+++ b/mysql-test/main/type_datetime.result
@@ -216,7 +216,7 @@ insert into t1 set dt='2007-03-23 13:49:38',da=dt;
Warnings:
Note 1265 Data truncated for column 'da' at row 1
insert into t1 values ('2007-03-32','2007-03-23 13:49:38');
-ERROR 22007: Incorrect date value: '2007-03-32' for column 'da' at row 1
+ERROR 22007: Incorrect date value: '2007-03-32' for column `test`.`t1`.`da` at row 1
select * from t1;
da dt
1962-03-03 1962-03-03 00:00:00
@@ -610,7 +610,7 @@ insert into t1 set dt='2007-03-23 13:49:38',da=dt;
Warnings:
Note 1265 Data truncated for column 'da' at row 1
insert into t1 values ('2007-03-32','2007-03-23 13:49:38');
-ERROR 22007: Incorrect date value: '2007-03-32' for column 'da' at row 1
+ERROR 22007: Incorrect date value: '2007-03-32' for column `test`.`t1`.`da` at row 1
select * from t1;
da dt
1962-03-03 1962-03-03 00:00:00
@@ -854,7 +854,7 @@ SET sql_mode=DEFAULT;
CREATE TABLE t1 (a DATETIME DEFAULT '0000-00-00 00:00:00');
SET sql_mode=TRADITIONAL;
INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`a` at row 1
INSERT INTO t1 VALUES ();
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'a'
INSERT INTO t1 VALUES (DEFAULT);
@@ -895,7 +895,7 @@ CREATE TABLE t1 (a DATETIME);;
INSERT INTO t1 VALUES (0);
SET sql_mode='TRADITIONAL';
CREATE TABLE t2 AS SELECT * FROM t1;
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t2`.`a` at row 1
DROP TABLE t1;
#
# End of MDEV-8373 Zero date can be inserted in strict no-zero mode through CREATE TABLE AS SELECT timestamp_field
diff --git a/mysql-test/main/type_datetime_round.result b/mysql-test/main/type_datetime_round.result
new file mode 100644
index 00000000000..c6584223268
--- /dev/null
+++ b/mysql-test/main/type_datetime_round.result
@@ -0,0 +1,205 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# DATETIME: SET
+#
+CREATE TABLE t1 (a DATETIME(3), b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# DATETIME: ALTER
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# Corner case:
+# ALTER DATETIME to a shorter DATETIME
+# All values round, maximum possible value truncates.
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a DATETIME(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '9999-12-30 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '9999-12-31 22:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '9999-12-31 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (3, '9999-12-31 23:59:59.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a DATETIME(5);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 4
+SELECT * FROM t1;
+ID a comment
+0 9999-12-30 23:59:59.00000 Should round
+1 9999-12-31 23:00:00.00000 Should round
+2 9999-12-31 23:59:59.00000 Should round
+3 9999-12-31 23:59:59.99999 Should truncate
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# NOW
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a DATETIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-01 00:00:00.0000
+3 2011-01-01 00:00:00.0000
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# DATETIME: CAST
+#
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+a CAST(a AS DATETIME(3))
+2000-12-31 23:59:59.9999 2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+a CAST(a AS DATETIME(3))
+2000-12-31 23:59:59.9999 2001-01-01 00:00:00.000
+2000-12-31 23:59:59.9999999 2001-01-01 00:00:00.000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+a CAST(a AS DATETIME(3))
+20001231235959.9999000000 2001-01-01 00:00:00.000
+20001231235959.9999999000 2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# Equal field propagation
+#
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES (20010101235959.999999);
+INSERT INTO t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=20010101235959.9999999;
+a
+2001-01-02 00:00:00.000000
+SELECT * FROM t1 WHERE a='20010101235959.9999999';
+a
+2001-01-02 00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+a
+2001-01-02 00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+a
+2001-01-02 00:00:00.000000
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'2001-01-02 00:00:00'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect datetime value: '20010101235959.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'2001-01-02 00:00:00'
+DROP TABLE t1;
+#
+# Comparing non-temporal to DATETIME
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE CONCAT(a)=TIMESTAMP'2001-01-02 00:00:00';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+a
+2001-01-01 23:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+a
+20010101235959.9999999
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+a
+20010101235959.9999999
+DROP TABLE t1;
+#
+# Literal corner case
+#
+SELECT TIMESTAMP'9999-12-31 23:59:59.999999';
+TIMESTAMP'9999-12-31 23:59:59.999999'
+9999-12-31 23:59:59.999999
+SELECT TIME'9999-12-31 23:59:59.9999999';
+ERROR HY000: Incorrect TIME value: '9999-12-31 23:59:59.9999999'
diff --git a/mysql-test/main/type_datetime_round.test b/mysql-test/main/type_datetime_round.test
new file mode 100644
index 00000000000..15aec2cf4e0
--- /dev/null
+++ b/mysql-test/main/type_datetime_round.test
@@ -0,0 +1,147 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # DATETIME: SET
+--echo #
+
+CREATE TABLE t1 (a DATETIME(3), b DATETIME(4));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # DATETIME: ALTER
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a DATETIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Corner case:
+--echo # ALTER DATETIME to a shorter DATETIME
+--echo # All values round, maximum possible value truncates.
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a DATETIME(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '9999-12-30 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '9999-12-31 22:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '9999-12-31 23:59:58.999999', 'Should round');
+INSERT INTO t1 VALUES (3, '9999-12-31 23:59:59.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a DATETIME(5);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # NOW
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a DATETIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # DATETIME: CAST
+--echo #
+
+CREATE TABLE t1 (a DATETIME(4));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+SELECT a, CAST(a AS DATETIME(3)) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Equal field propagation
+--echo #
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES (20010101235959.999999);
+INSERT INTO t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=20010101235959.9999999;
+SELECT * FROM t1 WHERE a='20010101235959.9999999';
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND a>='20010101235959.9999999';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='20010101235959.9999999' AND CONCAT(a)='2001-01-02 00:00:00.000000';
+DROP TABLE t1;
+
+--echo #
+--echo # Comparing non-temporal to DATETIME
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+SELECT * FROM t1 WHERE CONCAT(a)=TIMESTAMP'2001-01-02 00:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+SELECT * FROM t1 WHERE a=TIMESTAMP'2001-01-02 00:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIMESTAMP'2001-01-02 00:00:00';
+DROP TABLE t1;
+
+--echo #
+--echo # Literal corner case
+--echo #
+
+SELECT TIMESTAMP'9999-12-31 23:59:59.999999';
+--error ER_WRONG_VALUE
+SELECT TIME'9999-12-31 23:59:59.9999999';
diff --git a/mysql-test/main/type_decimal.result b/mysql-test/main/type_decimal.result
index dadaa5a4b77..769c59b197d 100644
--- a/mysql-test/main/type_decimal.result
+++ b/mysql-test/main/type_decimal.result
@@ -176,9 +176,9 @@ Note 1265 Data truncated for column 'a' at row 2
insert ignore into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'a' at row 2
+Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column `test`.`t1`.`a` at row 2
Note 1265 Data truncated for column 'a' at row 3
-Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'a' at row 4
+Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column `test`.`t1`.`a` at row 4
insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
diff --git a/mysql-test/main/type_float.result b/mysql-test/main/type_float.result
index bd1a722f80b..0ce54c0126c 100644
--- a/mysql-test/main/type_float.result
+++ b/mysql-test/main/type_float.result
@@ -498,7 +498,7 @@ Warnings:
Warning 1265 Data truncated for column 'f' at row 1
INSERT IGNORE INTO t1 VALUES ('.');
Warnings:
-Warning 1366 Incorrect double value: '.' for column 'f' at row 1
+Warning 1366 Incorrect double value: '.' for column `test`.`t1`.`f` at row 1
SELECT * FROM t1 ORDER BY f;
f
0
diff --git a/mysql-test/main/type_interval.result b/mysql-test/main/type_interval.result
new file mode 100644
index 00000000000..65c84022210
--- /dev/null
+++ b/mysql-test/main/type_interval.result
@@ -0,0 +1,83 @@
+#
+# Start of 10.4 tests
+#
+#
+# MDEV-17776 CAST(x AS INTERVAL DAY_SECOND(N))
+#
+CREATE TABLE t1 (a VARCHAR(128));
+INSERT INTO t1 VALUES
+('00:00:00'),
+('+00:00:01'),
+('-00:00:01'),
+('838:59:59'),
+('839:00:00'),
+('2018:01:02'),
+('87649415:59:59'),
+('3652058 23:59:59'),
+('87649416:00:00'),
+('3652059 00:00:00');
+SELECT
+EXTRACT(DAY FROM a) AS d,
+EXTRACT(HOUR FROM a) AS h,
+a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+d h a cast_itds
+0 0 00:00:00 00:00:00.000000
+0 0 +00:00:01 00:00:01.000000
+0 0 -00:00:01 -00:00:01.000000
+34 22 838:59:59 34 22:59:59.000000
+34 23 839:00:00 34 23:00:00.000000
+84 2 2018:01:02 84 02:01:02.000000
+3652058 23 87649415:59:59 3652058 23:59:59.000000
+3652058 23 3652058 23:59:59 3652058 23:59:59.000000
+NULL NULL 87649416:00:00 NULL
+NULL NULL 3652059 00:00:00 NULL
+Warnings:
+Warning 1292 Incorrect interval value: '87649416:00:00'
+Warning 1292 Incorrect interval value: '87649416:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649416:00:00'
+Warning 1292 Incorrect interval value: '3652059 00:00:00'
+Warning 1292 Incorrect interval value: '3652059 00:00:00'
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '3652059 00:00:00'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(0),
+(1),
+(-1),
+(8385959),
+(8390000),
+(20180102),
+(876494155959),
+(876494160000);
+SELECT
+EXTRACT(DAY FROM a) AS d,
+EXTRACT(HOUR FROM a) AS h,
+a,
+CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+d h a cast_itds
+0 0 0.000000000 00:00:00.000000
+0 0 1.000000000 00:00:01.000000
+0 0 -1.000000000 -00:00:01.000000
+34 22 8385959.000000000 34 22:59:59.000000
+34 23 8390000.000000000 34 23:00:00.000000
+84 2 20180102.000000000 84 02:01:02.000000
+3652058 23 876494155959.000000000 3652058 23:59:59.000000
+NULL NULL 876494160000.000000000 NULL
+Warnings:
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '0.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '1.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '-1.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8385959.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '8390000.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '20180102.000000000'
+Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '876494155959.000000000'
+Warning 1292 Incorrect interval value: '876494160000.000000000' for column `test`.`t1`.`a` at row 8
+Warning 1292 Incorrect interval value: '876494160000.000000000' for column `test`.`t1`.`a` at row 8
+Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '876494160000.000000000'
+DROP TABLE t1;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/type_interval.test b/mysql-test/main/type_interval.test
new file mode 100644
index 00000000000..15999dc609d
--- /dev/null
+++ b/mysql-test/main/type_interval.test
@@ -0,0 +1,54 @@
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+
+--echo #
+--echo # MDEV-17776 CAST(x AS INTERVAL DAY_SECOND(N))
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(128));
+INSERT INTO t1 VALUES
+('00:00:00'),
+('+00:00:01'),
+('-00:00:01'),
+('838:59:59'),
+('839:00:00'),
+('2018:01:02'),
+('87649415:59:59'),
+('3652058 23:59:59'),
+('87649416:00:00'),
+('3652059 00:00:00');
+
+SELECT
+ EXTRACT(DAY FROM a) AS d,
+ EXTRACT(HOUR FROM a) AS h,
+ a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a DECIMAL(32,9));
+INSERT INTO t1 VALUES
+(0),
+(1),
+(-1),
+(8385959),
+(8390000),
+(20180102),
+(876494155959),
+(876494160000);
+
+SELECT
+ EXTRACT(DAY FROM a) AS d,
+ EXTRACT(HOUR FROM a) AS h,
+ a,
+ CAST(a AS INTERVAL DAY_SECOND(6)) AS cast_itds
+FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/type_newdecimal.result b/mysql-test/main/type_newdecimal.result
index 140f36b1261..44f200c229b 100644
--- a/mysql-test/main/type_newdecimal.result
+++ b/mysql-test/main/type_newdecimal.result
@@ -825,7 +825,7 @@ Warning 1365 Division by 0
Warning 1365 Division by 0
Warning 1365 Division by 0
INSERT INTO Sow6_2f VALUES ('a59b');
-ERROR 22007: Incorrect decimal value: 'a59b' for column 'col1' at row 1
+ERROR 22007: Incorrect decimal value: 'a59b' for column `test`.`Sow6_2f`.`col1` at row 1
drop table Sow6_2f;
select 10.3330000000000/12.34500000;
10.3330000000000/12.34500000
diff --git a/mysql-test/main/type_newdecimal.test b/mysql-test/main/type_newdecimal.test
index d2d64b0baee..56273a47b44 100644
--- a/mysql-test/main/type_newdecimal.test
+++ b/mysql-test/main/type_newdecimal.test
@@ -837,6 +837,7 @@ UPDATE Sow6_2f SET col1 = col1 / 0 WHERE col1 > 0;
#-- should return SQLSTATE 22012 division by zero
SELECT MOD(col1,0) FROM Sow6_2f;
#-- should return SQLSTATE 22012 division by zero
+--replace_result sow Sow
-- error 1366
INSERT INTO Sow6_2f VALUES ('a59b');
#-- should return SQLSTATE 22018 invalid character value for cast
diff --git a/mysql-test/main/type_num.result b/mysql-test/main/type_num.result
index 966d94ee385..2dadb4f1f8d 100644
--- a/mysql-test/main/type_num.result
+++ b/mysql-test/main/type_num.result
@@ -42,171 +42,171 @@ Note 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect double value: '' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect double value: '' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a TINYINT);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a SMALLINT);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect integer value: '' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL);
INSERT INTO t1 VALUES ('');
-ERROR 22007: Incorrect decimal value: '' for column 'a' at row 1
+ERROR 22007: Incorrect decimal value: '' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect double value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect double value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect double value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect double value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a TINYINT);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a SMALLINT);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL);
INSERT INTO t1 VALUES ('x');
-ERROR 22007: Incorrect decimal value: 'x' for column 'a' at row 1
+ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect double value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect double value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect double value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect double value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a TINYINT);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect integer value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a SMALLINT);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect integer value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect integer value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect integer value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL);
INSERT INTO t1 VALUES (' x');
-ERROR 22007: Incorrect decimal value: ' x' for column 'a' at row 1
+ERROR 22007: Incorrect decimal value: ' x' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect double value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect double value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a TINYINT);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect integer value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a SMALLINT);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect integer value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect integer value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect integer value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL);
INSERT INTO t1 VALUES ('.');
-ERROR 22007: Incorrect decimal value: '.' for column 'a' at row 1
+ERROR 22007: Incorrect decimal value: '.' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect double value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect double value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a TINYINT);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect integer value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a SMALLINT);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect integer value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect integer value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect integer value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL);
INSERT INTO t1 VALUES ('-');
-ERROR 22007: Incorrect decimal value: '-' for column 'a' at row 1
+ERROR 22007: Incorrect decimal value: '-' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect double value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect double value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect double value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a TINYINT);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect integer value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a SMALLINT);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect integer value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect integer value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect integer value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect integer value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL);
INSERT INTO t1 VALUES ('+');
-ERROR 22007: Incorrect decimal value: '+' for column 'a' at row 1
+ERROR 22007: Incorrect decimal value: '+' for column `test`.`t1`.`a` at row 1
DROP TABLE t1;
CREATE TABLE t1 (a FLOAT);
INSERT INTO t1 VALUES ('1x');
@@ -425,58 +425,58 @@ Note 1265 Data truncated for column 'i8' at row 1
Note 1265 Data truncated for column 'd' at row 1
INSERT IGNORE INTO t1 VALUES ('','','','','','','');
Warnings:
-Warning 1366 Incorrect double value: '' for column 'f4' at row 1
-Warning 1366 Incorrect double value: '' for column 'f8' at row 1
-Warning 1366 Incorrect integer value: '' for column 'i1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'i2' at row 1
-Warning 1366 Incorrect integer value: '' for column 'i4' at row 1
-Warning 1366 Incorrect integer value: '' for column 'i8' at row 1
-Warning 1366 Incorrect decimal value: '' for column 'd' at row 1
+Warning 1366 Incorrect double value: '' for column `test`.`t1`.`f4` at row 1
+Warning 1366 Incorrect double value: '' for column `test`.`t1`.`f8` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`i1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`i2` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`i4` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`i8` at row 1
+Warning 1366 Incorrect decimal value: '' for column `test`.`t1`.`d` at row 1
INSERT IGNORE INTO t1 VALUES ('x','x','x','x','x','x','x');
Warnings:
-Warning 1366 Incorrect double value: 'x' for column 'f4' at row 1
-Warning 1366 Incorrect double value: 'x' for column 'f8' at row 1
-Warning 1366 Incorrect integer value: 'x' for column 'i1' at row 1
-Warning 1366 Incorrect integer value: 'x' for column 'i2' at row 1
-Warning 1366 Incorrect integer value: 'x' for column 'i4' at row 1
-Warning 1366 Incorrect integer value: 'x' for column 'i8' at row 1
-Warning 1366 Incorrect decimal value: 'x' for column 'd' at row 1
+Warning 1366 Incorrect double value: 'x' for column `test`.`t1`.`f4` at row 1
+Warning 1366 Incorrect double value: 'x' for column `test`.`t1`.`f8` at row 1
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`i1` at row 1
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`i2` at row 1
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`i4` at row 1
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`i8` at row 1
+Warning 1366 Incorrect decimal value: 'x' for column `test`.`t1`.`d` at row 1
INSERT IGNORE INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x');
Warnings:
-Warning 1366 Incorrect double value: ' x' for column 'f4' at row 1
-Warning 1366 Incorrect double value: ' x' for column 'f8' at row 1
-Warning 1366 Incorrect integer value: ' x' for column 'i1' at row 1
-Warning 1366 Incorrect integer value: ' x' for column 'i2' at row 1
-Warning 1366 Incorrect integer value: ' x' for column 'i4' at row 1
-Warning 1366 Incorrect integer value: ' x' for column 'i8' at row 1
-Warning 1366 Incorrect decimal value: ' x' for column 'd' at row 1
+Warning 1366 Incorrect double value: ' x' for column `test`.`t1`.`f4` at row 1
+Warning 1366 Incorrect double value: ' x' for column `test`.`t1`.`f8` at row 1
+Warning 1366 Incorrect integer value: ' x' for column `test`.`t1`.`i1` at row 1
+Warning 1366 Incorrect integer value: ' x' for column `test`.`t1`.`i2` at row 1
+Warning 1366 Incorrect integer value: ' x' for column `test`.`t1`.`i4` at row 1
+Warning 1366 Incorrect integer value: ' x' for column `test`.`t1`.`i8` at row 1
+Warning 1366 Incorrect decimal value: ' x' for column `test`.`t1`.`d` at row 1
INSERT IGNORE INTO t1 VALUES ('.','.','.','.','.','.','.');
Warnings:
-Warning 1366 Incorrect double value: '.' for column 'f4' at row 1
-Warning 1366 Incorrect double value: '.' for column 'f8' at row 1
-Warning 1366 Incorrect integer value: '.' for column 'i1' at row 1
-Warning 1366 Incorrect integer value: '.' for column 'i2' at row 1
-Warning 1366 Incorrect integer value: '.' for column 'i4' at row 1
-Warning 1366 Incorrect integer value: '.' for column 'i8' at row 1
-Warning 1366 Incorrect decimal value: '.' for column 'd' at row 1
+Warning 1366 Incorrect double value: '.' for column `test`.`t1`.`f4` at row 1
+Warning 1366 Incorrect double value: '.' for column `test`.`t1`.`f8` at row 1
+Warning 1366 Incorrect integer value: '.' for column `test`.`t1`.`i1` at row 1
+Warning 1366 Incorrect integer value: '.' for column `test`.`t1`.`i2` at row 1
+Warning 1366 Incorrect integer value: '.' for column `test`.`t1`.`i4` at row 1
+Warning 1366 Incorrect integer value: '.' for column `test`.`t1`.`i8` at row 1
+Warning 1366 Incorrect decimal value: '.' for column `test`.`t1`.`d` at row 1
INSERT IGNORE INTO t1 VALUES ('-','-','-','-','-','-','-');
Warnings:
-Warning 1366 Incorrect double value: '-' for column 'f4' at row 1
-Warning 1366 Incorrect double value: '-' for column 'f8' at row 1
-Warning 1366 Incorrect integer value: '-' for column 'i1' at row 1
-Warning 1366 Incorrect integer value: '-' for column 'i2' at row 1
-Warning 1366 Incorrect integer value: '-' for column 'i4' at row 1
-Warning 1366 Incorrect integer value: '-' for column 'i8' at row 1
-Warning 1366 Incorrect decimal value: '-' for column 'd' at row 1
+Warning 1366 Incorrect double value: '-' for column `test`.`t1`.`f4` at row 1
+Warning 1366 Incorrect double value: '-' for column `test`.`t1`.`f8` at row 1
+Warning 1366 Incorrect integer value: '-' for column `test`.`t1`.`i1` at row 1
+Warning 1366 Incorrect integer value: '-' for column `test`.`t1`.`i2` at row 1
+Warning 1366 Incorrect integer value: '-' for column `test`.`t1`.`i4` at row 1
+Warning 1366 Incorrect integer value: '-' for column `test`.`t1`.`i8` at row 1
+Warning 1366 Incorrect decimal value: '-' for column `test`.`t1`.`d` at row 1
INSERT IGNORE INTO t1 VALUES ('+','+','+','+','+','+','+');
Warnings:
-Warning 1366 Incorrect double value: '+' for column 'f4' at row 1
-Warning 1366 Incorrect double value: '+' for column 'f8' at row 1
-Warning 1366 Incorrect integer value: '+' for column 'i1' at row 1
-Warning 1366 Incorrect integer value: '+' for column 'i2' at row 1
-Warning 1366 Incorrect integer value: '+' for column 'i4' at row 1
-Warning 1366 Incorrect integer value: '+' for column 'i8' at row 1
-Warning 1366 Incorrect decimal value: '+' for column 'd' at row 1
+Warning 1366 Incorrect double value: '+' for column `test`.`t1`.`f4` at row 1
+Warning 1366 Incorrect double value: '+' for column `test`.`t1`.`f8` at row 1
+Warning 1366 Incorrect integer value: '+' for column `test`.`t1`.`i1` at row 1
+Warning 1366 Incorrect integer value: '+' for column `test`.`t1`.`i2` at row 1
+Warning 1366 Incorrect integer value: '+' for column `test`.`t1`.`i4` at row 1
+Warning 1366 Incorrect integer value: '+' for column `test`.`t1`.`i8` at row 1
+Warning 1366 Incorrect decimal value: '+' for column `test`.`t1`.`d` at row 1
INSERT IGNORE INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x');
Warnings:
Warning 1265 Data truncated for column 'f4' at row 1
diff --git a/mysql-test/main/type_time.result b/mysql-test/main/type_time.result
index fe72f2dc576..a448c5fb702 100644
--- a/mysql-test/main/type_time.result
+++ b/mysql-test/main/type_time.result
@@ -320,7 +320,7 @@ DROP TABLE t2,t1;
SET sql_mode=traditional;
CREATE TABLE t1 (a TIME(6));
INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
-ERROR 22007: Incorrect time value: '18446744069414584320' for column 'a' at row 1
+ERROR 22007: Incorrect time value: '18446744069414584320' for column `test`.`t1`.`a` at row 1
SET sql_mode=DEFAULT;
INSERT IGNORE INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
Warnings:
@@ -1179,7 +1179,7 @@ SELECT CAST(a AS TIME), CAST(-9223372036854775808 AS TIME) FROM t1;
CAST(a AS TIME) CAST(-9223372036854775808 AS TIME)
-838:59:59 -838:59:59
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'a' at row 1
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1`.`a` at row 1
Warning 1292 Truncated incorrect time value: '-9223372036854775808'
DROP TABLE t1;
CREATE TABLE t1 (a INT, b DECIMAL, c DOUBLE);
@@ -1196,12 +1196,12 @@ a TIME(a) TIME(b) TIME(c)
9 00:00:09 00:00:09 00:00:09.000000
9000000 838:59:59 838:59:59 838:59:59.999999
Warnings:
-Warning 1292 Incorrect time value: '-9000000' for column 'a' at row 1
-Warning 1292 Incorrect time value: '-9000000' for column 'b' at row 1
-Warning 1292 Incorrect time value: '-9000000' for column 'c' at row 1
-Warning 1292 Incorrect time value: '9000000' for column 'a' at row 6
-Warning 1292 Incorrect time value: '9000000' for column 'b' at row 6
-Warning 1292 Incorrect time value: '9000000' for column 'c' at row 6
+Warning 1292 Incorrect time value: '-9000000' for column `test`.`t1`.`a` at row 1
+Warning 1292 Incorrect time value: '-9000000' for column `test`.`t1`.`b` at row 1
+Warning 1292 Incorrect time value: '-9000000' for column `test`.`t1`.`c` at row 1
+Warning 1292 Incorrect time value: '9000000' for column `test`.`t1`.`a` at row 6
+Warning 1292 Incorrect time value: '9000000' for column `test`.`t1`.`b` at row 6
+Warning 1292 Incorrect time value: '9000000' for column `test`.`t1`.`c` at row 6
DROP TABLE t1;
CREATE TABLE t1 (a INT, b DECIMAL, c DOUBLE);
INSERT INTO t1 VALUES (0,0,0),(1,1,1),(9,9,9);
@@ -1213,9 +1213,9 @@ a TIME(a) TIME(b) TIME(c)
9 00:00:09 00:00:09 00:00:09.000000
9000000 838:59:59 838:59:59 838:59:59.999999
Warnings:
-Warning 1292 Incorrect time value: '9000000' for column 'a' at row 4
-Warning 1292 Incorrect time value: '9000000' for column 'b' at row 4
-Warning 1292 Incorrect time value: '9000000' for column 'c' at row 4
+Warning 1292 Incorrect time value: '9000000' for column `test`.`t1`.`a` at row 4
+Warning 1292 Incorrect time value: '9000000' for column `test`.`t1`.`b` at row 4
+Warning 1292 Incorrect time value: '9000000' for column `test`.`t1`.`c` at row 4
DROP TABLE t1;
#
# MDEV-8862 Wrong field type for MAX(COALESCE(datetime_column))
@@ -2168,5 +2168,23 @@ Warning 1292 Truncated incorrect datetime value: 'z'
Warning 1292 Truncated incorrect datetime value: 'z'
Warning 1292 Truncated incorrect time value: 'z'
#
+# MDEV-17319 Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed upon inserting into TIME field
+#
+CREATE TABLE t1 (t TIME);
+SET SESSION SQL_MODE='TRADITIONAL';
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00');
+ERROR 22007: Incorrect time value: '0000-00-00 00:00:00' for column `test`.`t1`.`t` at row 1
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+#
+# MDEV-18070 Assertion `nanoseconds <= 1000000000' failed in Temporal::add_nanoseconds_ssff with TIME_ROUND_FRACTIONAL
+#
+CREATE TABLE t1 (t TIME);
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+INSERT INTO t1 VALUES (3e19);
+Warnings:
+Warning 1264 Out of range value for column 't' at row 1
+DROP TABLE t1;
+#
# End of 10.4 tests
#
diff --git a/mysql-test/main/type_time.test b/mysql-test/main/type_time.test
index 5e4090f48a4..7eb75b95af2 100644
--- a/mysql-test/main/type_time.test
+++ b/mysql-test/main/type_time.test
@@ -1410,5 +1410,26 @@ SELECT TIMESTAMP(0)='z', DATE(0)='z', TIME(0)='z';
--echo #
+--echo # MDEV-17319 Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed upon inserting into TIME field
+--echo #
+
+CREATE TABLE t1 (t TIME);
+SET SESSION SQL_MODE='TRADITIONAL';
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00');
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18070 Assertion `nanoseconds <= 1000000000' failed in Temporal::add_nanoseconds_ssff with TIME_ROUND_FRACTIONAL
+--echo #
+
+CREATE TABLE t1 (t TIME);
+SET SQL_MODE= 'TIME_ROUND_FRACTIONAL';
+INSERT INTO t1 VALUES (3e19);
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/type_time_round.result b/mysql-test/main/type_time_round.result
new file mode 100644
index 00000000000..31e97c888db
--- /dev/null
+++ b/mysql-test/main/type_time_round.result
@@ -0,0 +1,260 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# TIME: SET
+#
+CREATE TABLE t1 (a TIME(3), b TIME(4));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(3), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT a FROM t1;
+a
+00:00:01.000000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(6), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+00:00:01.000000
+DROP TABLE t1;
+#
+# TIME: ALTER
+#
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+a
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+ALTER TABLE t1 MODIFY a TIME(3);
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+00:00:01.000
+00:00:01.000
+DROP TABLE t1;
+#
+# TIME: CAST
+#
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+00:00:00.9999 00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+00:00:00.9999 00:00:01.000
+00:00:00.9999999 00:00:01.000
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+0.9999000000 00:00:01.000
+0.9999999000 00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+a CAST(a AS TIME(3))
+0.9999 00:00:01.000
+0.9999999 00:00:01.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+a CAST(a AS TIME(6))
+00:00:00.9999999 00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '00:00:00.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+a CAST(a AS TIME(6))
+0.9999999000 00:00:01.000000
+DROP TABLE t1;
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+a CAST(a AS TIME(6))
+0.9999999 00:00:01.000000
+DROP TABLE t1;
+#
+# NOW
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+id a
+1 24:00:00.0000
+2 24:00:00.0000
+3 24:00:00.0000
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# Equal field propagation
+#
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES (0.999999);
+INSERT INTO t1 VALUES (0.9999999);
+SELECT * FROM t1 WHERE a=0.9999999;
+a
+00:00:01.000000
+SELECT * FROM t1 WHERE a='0.9999999';
+a
+00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+a
+00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1292 Truncated incorrect time value: '0.9999999'
+SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+a
+00:00:01.000000
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIME'00:00:01'
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
+Warnings:
+Note 1292 Truncated incorrect time value: '0.9999999'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIME'00:00:01'
+DROP TABLE t1;
+#
+# Comparing non-temporal to TIME
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('22:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+a
+22:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '22:59:59.9999999'
+SELECT * FROM t1 WHERE CONCAT(a)=TIME'23:00:00';
+a
+22:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '22:59:59.9999999'
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+a
+22:59:59.9999999
+Warnings:
+Note 1292 Truncated incorrect time value: '22:59:59.9999999'
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (225959.9999999);
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+a
+225959.9999999
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+a
+225959.9999999
+DROP TABLE t1;
+#
+# Literal corner case
+#
+SELECT TIME'838:59:59.999999';
+TIME'838:59:59.999999'
+838:59:59.999999
+SELECT TIME'838:59:59.9999999';
+ERROR HY000: Incorrect TIME value: '838:59:59.9999999'
+SELECT TIME'839:00:00';
+ERROR HY000: Incorrect TIME value: '839:00:00'
diff --git a/mysql-test/main/type_time_round.test b/mysql-test/main/type_time_round.test
new file mode 100644
index 00000000000..6d4b2d8947a
--- /dev/null
+++ b/mysql-test/main/type_time_round.test
@@ -0,0 +1,184 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # TIME: SET
+--echo #
+
+CREATE TABLE t1 (a TIME(3), b TIME(4));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(3), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999');
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(3), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(3), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6), b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'00:00:00.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6), b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(6), b DOUBLE);
+INSERT INTO t1 VALUES(NULL,0.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # TIME: ALTER
+--echo #
+
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+ALTER TABLE t1 MODIFY a TIME(3);
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # TIME: CAST
+--echo #
+
+CREATE TABLE t1 (a TIME(4));
+INSERT INTO t1 VALUES('00:00:00.9999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999');
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(3)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('00:00:00.9999999');
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES(0.9999999);
+SELECT a, CAST(a AS TIME(6)) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # NOW
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIME(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # Equal field propagation
+--echo #
+
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES (0.999999);
+INSERT INTO t1 VALUES (0.9999999);
+SELECT * FROM t1 WHERE a=0.9999999;
+SELECT * FROM t1 WHERE a='0.9999999';
+SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND a>='0.9999999';
+EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='0.9999999' AND CONCAT(a)='00:00:01.000000';
+DROP TABLE t1;
+
+
+--echo #
+--echo # Comparing non-temporal to TIME
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('22:59:59.9999999');
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+SELECT * FROM t1 WHERE CONCAT(a)=TIME'23:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (225959.9999999);
+SELECT * FROM t1 WHERE a=TIME'23:00:00';
+SELECT * FROM t1 WHERE COALESCE(a)=TIME'23:00:00';
+DROP TABLE t1;
+
+--echo #
+--echo # Literal corner case
+--echo #
+
+SELECT TIME'838:59:59.999999';
+--error ER_WRONG_VALUE
+SELECT TIME'838:59:59.9999999';
+--error ER_WRONG_VALUE
+SELECT TIME'839:00:00';
diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result
index e8bd81a7df5..57fdcdf9af9 100644
--- a/mysql-test/main/type_timestamp.result
+++ b/mysql-test/main/type_timestamp.result
@@ -778,7 +778,7 @@ SET sql_mode=DEFAULT;
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SET sql_mode=TRADITIONAL;
INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`a` at row 1
INSERT INTO t1 VALUES ();
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'a'
INSERT INTO t1 VALUES (DEFAULT);
@@ -819,7 +819,7 @@ CREATE TABLE t1 (a TIMESTAMP);;
INSERT INTO t1 VALUES (0);
SET sql_mode='TRADITIONAL';
CREATE TABLE t2 AS SELECT * FROM t1;
-ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t2`.`a` at row 1
DROP TABLE t1;
#
# End of MDEV-8373 Zero date can be inserted in strict no-zero mode through CREATE TABLE AS SELECT timestamp_field
@@ -1045,5 +1045,136 @@ CREATE TABLE t1 (a TIMESTAMP);
INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED);
DROP TABLE t1;
#
+# MDEV-17928 Conversion from TIMESTAMP to VARCHAR SP variables does not work well on fractional digits
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE ts10 TIMESTAMP(1) DEFAULT NOW();
+DECLARE ts16 TIMESTAMP(1) DEFAULT NOW(6);
+DECLARE dt10 DATETIME(1) DEFAULT NOW();
+DECLARE dt16 DATETIME(1) DEFAULT NOW(6);
+DECLARE vts10 VARCHAR(32) DEFAULT ts10;
+DECLARE vts16 VARCHAR(32) DEFAULT ts16;
+DECLARE vdt10 VARCHAR(32) DEFAULT dt10;
+DECLARE vdt16 VARCHAR(32) DEFAULT dt16;
+DECLARE tts10 TEXT(32) DEFAULT ts10;
+DECLARE tts16 TEXT(32) DEFAULT ts16;
+DECLARE tdt10 TEXT(32) DEFAULT dt10;
+DECLARE tdt16 TEXT(32) DEFAULT dt16;
+SELECT vts10, vts16, vdt10, vdt16;
+SELECT tts10, tts16, tdt10, tdt16;
+END;
+$$
+CALL p1;
+vts10 2001-01-01 10:20:30.0
+vts16 2001-01-01 10:20:30.1
+vdt10 2001-01-01 10:20:30.0
+vdt16 2001-01-01 10:20:30.1
+tts10 2001-01-01 10:20:30.0
+tts16 2001-01-01 10:20:30.1
+tdt10 2001-01-01 10:20:30.0
+tdt16 2001-01-01 10:20:30.1
+DROP PROCEDURE p1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+# Testing Item_func_rollup_const::val_native()
+# There is a bug in the below output (MDEV-16612)
+# Please remove this comment when MDEV-16612 is fixed and results are re-recorded
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2);
+BEGIN NOT ATOMIC
+DECLARE v TIMESTAMP DEFAULT '2001-01-01 10:20:30'; -- "v" will be wrapped into Item_func_rollup_const
+SELECT id, v AS v, COUNT(*) FROM t1 GROUP BY id,v WITH ROLLUP;
+END;
+$$
+id v COUNT(*)
+1 2001-01-01 10:20:30 1
+1 2001-01-01 10:20:30 1
+2 2001-01-01 10:20:30 1
+2 2001-01-01 10:20:30 1
+NULL 2001-01-01 10:20:30 2
+DROP TABLE t1;
+#
+# Testing Type_handler_timestamp_common::Item_save_in_field()
+# "txt" is expected to have three fractional digits
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+CREATE TABLE t1 (ts1 TIMESTAMP(1) NOT NULL, ts2 TIMESTAMP(3) NOT NULL, txt TEXT);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00', '0000-00-00 00:00:00',COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(),NOW(),COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(1),NOW(3),COALESCE(ts1,ts2));
+SELECT * FROM t1;
+ts1 ts2 txt
+0000-00-00 00:00:00.0 0000-00-00 00:00:00.000 0000-00-00 00:00:00.000
+2001-01-01 10:20:30.0 2001-01-01 10:20:30.000 2001-01-01 10:20:30.000
+2001-01-01 10:20:30.1 2001-01-01 10:20:30.123 2001-01-01 10:20:30.100
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# Testing Field_timestamp::store_native
+#
+SET sql_mode='';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00','0000-00-00 00:00:00');
+SET sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
+UPDATE t1 SET a=b;
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`a` at row 1
+UPDATE t1 SET a=COALESCE(b);
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column `test`.`t1`.`a` at row 1
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+#
+CREATE TABLE t1 (a INT, b TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'2018-06-19 00:00:00');
+SELECT NULLIF(b, 'N/A') AS f, MAX(a) FROM t1 GROUP BY f;
+f MAX(a)
+2018-06-19 00:00:00 1
+Warnings:
+Warning 1292 Truncated incorrect datetime value: 'N/A'
+DROP TABLE t1;
+#
+# MDEV-17972 Assertion `is_valid_value_slow()' failed in Datetime::Datetime
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30');
+FLUSH TABLES;
+MYD
+FF77777777FFFFFF
+SELECT a, CAST(a AS DATETIME) AS dt0, CAST(a AS DATETIME(6)) AS dt6 FROM t1;
+a dt0 dt6
+2033-07-07 03:01:11.999999 2033-07-07 03:01:11 2033-07-07 03:01:11.999999
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# MDEV-18072 Assertion `is_null() == item->null_value || conv' failed in Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon query with GROUP BY
+#
+CREATE TABLE t1 (t TIMESTAMP);
+INSERT INTO t1 () VALUES (),();
+SELECT IF(0,t,NULL) AS f FROM t1 GROUP BY 'foo';
+f
+NULL
+DROP TABLE t1;
+#
+# MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
+#
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (pk INT PRIMARY KEY, b TIMESTAMP) ENGINE=MyISAM;
+SELECT ( SELECT b FROM t1 LIMIT 1 ) AS sq FROM t2 LEFT JOIN t3 USING (pk);
+sq
+NULL
+NULL
+DROP TABLE t1, t2, t3;
+#
# End of 10.4 tests
#
diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test
index 0a3ffb2b899..6b1447e5108 100644
--- a/mysql-test/main/type_timestamp.test
+++ b/mysql-test/main/type_timestamp.test
@@ -629,6 +629,142 @@ CREATE TABLE t1 (a TIMESTAMP);
INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED);
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17928 Conversion from TIMESTAMP to VARCHAR SP variables does not work well on fractional digits
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE ts10 TIMESTAMP(1) DEFAULT NOW();
+ DECLARE ts16 TIMESTAMP(1) DEFAULT NOW(6);
+ DECLARE dt10 DATETIME(1) DEFAULT NOW();
+ DECLARE dt16 DATETIME(1) DEFAULT NOW(6);
+ DECLARE vts10 VARCHAR(32) DEFAULT ts10;
+ DECLARE vts16 VARCHAR(32) DEFAULT ts16;
+ DECLARE vdt10 VARCHAR(32) DEFAULT dt10;
+ DECLARE vdt16 VARCHAR(32) DEFAULT dt16;
+ DECLARE tts10 TEXT(32) DEFAULT ts10;
+ DECLARE tts16 TEXT(32) DEFAULT ts16;
+ DECLARE tdt10 TEXT(32) DEFAULT dt10;
+ DECLARE tdt16 TEXT(32) DEFAULT dt16;
+
+ SELECT vts10, vts16, vdt10, vdt16;
+ SELECT tts10, tts16, tdt10, tdt16;
+END;
+$$
+DELIMITER ;$$
+--vertical_results
+CALL p1;
+--horizontal_results
+DROP PROCEDURE p1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+
+--echo # Testing Item_func_rollup_const::val_native()
+
+--echo # There is a bug in the below output (MDEV-16612)
+--echo # Please remove this comment when MDEV-16612 is fixed and results are re-recorded
+
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2);
+DELIMITER $$;
+BEGIN NOT ATOMIC
+ DECLARE v TIMESTAMP DEFAULT '2001-01-01 10:20:30'; -- "v" will be wrapped into Item_func_rollup_const
+ SELECT id, v AS v, COUNT(*) FROM t1 GROUP BY id,v WITH ROLLUP;
+END;
+$$
+DELIMITER ;$$
+DROP TABLE t1;
+
+--echo #
+--echo # Testing Type_handler_timestamp_common::Item_save_in_field()
+--echo # "txt" is expected to have three fractional digits
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456');
+CREATE TABLE t1 (ts1 TIMESTAMP(1) NOT NULL, ts2 TIMESTAMP(3) NOT NULL, txt TEXT);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00', '0000-00-00 00:00:00',COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(),NOW(),COALESCE(ts1,ts2));
+INSERT INTO t1 VALUES (NOW(1),NOW(3),COALESCE(ts1,ts2));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # Testing Field_timestamp::store_native
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00','0000-00-00 00:00:00');
+SET sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE';
+--error ER_TRUNCATED_WRONG_VALUE
+UPDATE t1 SET a=b;
+--error ER_TRUNCATED_WRONG_VALUE
+UPDATE t1 SET a=COALESCE(b);
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-17979 Assertion `0' failed in Item::val_native upon SELECT with timestamp, NULLIF, GROUP BY
+--echo #
+
+CREATE TABLE t1 (a INT, b TIMESTAMP) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'2018-06-19 00:00:00');
+SELECT NULLIF(b, 'N/A') AS f, MAX(a) FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17972 Assertion `is_valid_value_slow()' failed in Datetime::Datetime
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30');
+FLUSH TABLES;
+--remove_file $MYSQLD_DATADIR/test/t1.MYD
+--disable_query_log
+# Write a data file with one record:
+# 0xFF - record flags
+# 0x77777777 - TIMESTAMP integer part
+# 0xFFFFFF - TIMESTAMP bad fractional part
+--eval SELECT CONCAT(0xFF,0x77777777,0xFFFFFF) INTO OUTFILE '$MYSQLD_DATADIR/test/t1.MYD' FIELDS TERMINATED BY '' ESCAPED BY '' LINES TERMINATED BY ''
+--eval SELECT HEX(LOAD_FILE('$MYSQLD_DATADIR/test/t1.MYD')) AS MYD
+--enable_query_log
+SELECT a, CAST(a AS DATETIME) AS dt0, CAST(a AS DATETIME(6)) AS dt6 FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-18072 Assertion `is_null() == item->null_value || conv' failed in Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon query with GROUP BY
+--echo #
+
+CREATE TABLE t1 (t TIMESTAMP);
+INSERT INTO t1 () VALUES (),();
+SELECT IF(0,t,NULL) AS f FROM t1 GROUP BY 'foo';
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18145 Assertion `0' failed in Item::val_native upon SELECT subquery with timestamp
+--echo #
+
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (pk INT PRIMARY KEY, b TIMESTAMP) ENGINE=MyISAM;
+SELECT ( SELECT b FROM t1 LIMIT 1 ) AS sq FROM t2 LEFT JOIN t3 USING (pk);
+DROP TABLE t1, t2, t3;
+
+
--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/type_timestamp_round.result b/mysql-test/main/type_timestamp_round.result
new file mode 100644
index 00000000000..7931aa0ff5b
--- /dev/null
+++ b/mysql-test/main/type_timestamp_round.result
@@ -0,0 +1,191 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+#
+# TIMESTAMP: SET
+#
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+Warnings:
+Note 1265 Data truncated for column 'a' at row 2
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# TIMESTAMP: ALTER
+#
+CREATE TABLE t1 (a TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2000-12-31 23:59:59.9999999'
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+a
+2001-01-01 00:00:00.000
+2001-01-01 00:00:00.000
+DROP TABLE t1;
+#
+# Corner case:
+# ALTER TIMESTAMP to a shorter TIMESTAMP
+# All values round, maximum possible value truncates.
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a TIMESTAMP(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '2038-01-18 23:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '2038-01-19 03:14:06.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '2038-01-19 03:14:07.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a TIMESTAMP(5);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 3
+SELECT * FROM t1;
+ID a comment
+0 2038-01-19 00:00:00.00000 Should round
+1 2038-01-19 03:14:07.00000 Should round
+2 2038-01-19 03:14:07.99999 Should truncate
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# NOW
+#
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-01 00:00:00.0000
+3 2011-01-01 00:00:00.0000
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+#
+# DATETIME to TIMESTAMP conversion with DST change
+#
+SET sql_mode=IF(@@version LIKE '%MariaDB%',
+'STRICT_ALL_TABLES,TIME_ROUND_FRACTIONAL',
+'STRICT_ALL_TABLES');
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap */);
+ERROR 22007: Incorrect datetime value: '2010-03-28 01:59:59.9' for column `test`.`t1`.`a` at row 1
+SELECT * FROM t1;
+a
+2010-03-28 01:59:59
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET sql_mode=@default_sql_mode;
+SET sql_mode=IF(@@version LIKE '%MariaDB%','TIME_ROUND_FRACTIONAL','');
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap, then gets fixed to the first second of the summer time */);
+Warnings:
+Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+a UNIX_TIMESTAMP(a)
+2010-03-28 01:59:59 1269730799
+2010-03-28 03:00:00 1269730800
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+SET sql_mode=@default_sql_mode;
+#
+# Comparing non-temporal to TIMESTAMP
+#
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+a a
+2001-01-01 23:59:59.9999999 2001-01-02 00:00:00
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1,t2 WHERE CONCAT(t1.a)=t2.a;
+a a
+2001-01-01 23:59:59.9999999 2001-01-02 00:00:00
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+a a
+2001-01-01 23:59:59.9999999 2001-01-02 00:00:00
+Warnings:
+Note 1292 Truncated incorrect datetime value: '2001-01-01 23:59:59.9999999'
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+a a
+20010101235959.9999999 2001-01-02 00:00:00
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+a a
+20010101235959.9999999 2001-01-02 00:00:00
+DROP TABLE t1,t2;
+#
+# MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+#
+# Test Field_timestamp::store_native()
+#
+SET sql_mode=@default_sql_mode;
+SET time_zone='+00:00';
+CREATE TABLE t1 (ts0 TIMESTAMP, ts1 TIMESTAMP(1));
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30', '2001-01-01 10:20:30.9');
+SELECT * FROM t1;
+ts0 ts1
+2001-01-01 10:20:30 2001-01-01 10:20:30.9
+# This should round
+UPDATE t1 SET ts0=COALESCE(ts1);
+SELECT * FROM t1;
+ts0 ts1
+2001-01-01 10:20:31 2001-01-01 10:20:30.9
+# Corner case
+UPDATE t1 SET ts1=FROM_UNIXTIME(2147483647.9);
+UPDATE t1 SET ts0=COALESCE(ts1);
+Warnings:
+Warning 1264 Out of range value for column 'ts0' at row 1
+SELECT * FROM t1;
+ts0 ts1
+2038-01-19 03:14:07 2038-01-19 03:14:07.9
+DROP TABLE t1;
+SET time_zone=DEFAULT;
diff --git a/mysql-test/main/type_timestamp_round.test b/mysql-test/main/type_timestamp_round.test
new file mode 100644
index 00000000000..19e0ea86da5
--- /dev/null
+++ b/mysql-test/main/type_timestamp_round.test
@@ -0,0 +1,160 @@
+SET sql_mode=IF(@@version LIKE '%MariaDB%', 'TIME_ROUND_FRACTIONAL', '');
+SET @default_sql_mode=@@sql_mode;
+
+--echo #
+--echo # TIMESTAMP: SET
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b VARCHAR(64));
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES(NULL,'2000-12-31 23:59:59.9999999');
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIMESTAMP(3) NULL DEFAULT NULL, b DECIMAL(38,10));
+INSERT INTO t1 VALUES(NULL,20001231235959.9999);
+INSERT INTO t1 VALUES(NULL,20001231235959.9999999);
+UPDATE t1 SET a=b;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # TIMESTAMP: ALTER
+--echo #
+
+CREATE TABLE t1 (a TIMESTAMP(4) NULL DEFAULT NULL);
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999');
+INSERT INTO t1 VALUES('2000-12-31 23:59:59.9999999');
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DECIMAL(38,10));
+INSERT INTO t1 VALUES(20001231235959.9999);
+INSERT INTO t1 VALUES(20001231235959.9999999);
+ALTER TABLE t1 MODIFY a TIMESTAMP(3) NULL DEFAULT NULL;
+SELECT a FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Corner case:
+--echo # ALTER TIMESTAMP to a shorter TIMESTAMP
+--echo # All values round, maximum possible value truncates.
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (ID INT, a TIMESTAMP(6), comment VARCHAR(64));
+INSERT INTO t1 VALUES (0, '2038-01-18 23:59:59.999999', 'Should round');
+INSERT INTO t1 VALUES (1, '2038-01-19 03:14:06.999999', 'Should round');
+INSERT INTO t1 VALUES (2, '2038-01-19 03:14:07.999999', 'Should truncate');
+ALTER TABLE t1 MODIFY a TIMESTAMP(5);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # NOW
+--echo #
+
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE OR REPLACE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIMESTAMP(6));
+INSERT INTO t1 (a) VALUES (CURRENT_TIME(6));
+SELECT * FROM t1;
+DROP TABLE t1;
+SET timestamp=DEFAULT;
+SET time_zone=DEFAULT;
+
+
+--echo #
+--echo # DATETIME to TIMESTAMP conversion with DST change
+--echo #
+
+--disable_warnings
+SET sql_mode=IF(@@version LIKE '%MariaDB%',
+ 'STRICT_ALL_TABLES,TIME_ROUND_FRACTIONAL',
+ 'STRICT_ALL_TABLES');
+--enable_warnings
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap */);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+--disable_warnings
+SET sql_mode=@default_sql_mode;
+--enable_warnings
+
+SET sql_mode=IF(@@version LIKE '%MariaDB%','TIME_ROUND_FRACTIONAL','');
+SET time_zone='Europe/Moscow';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.0' /* Winter time */);
+INSERT INTO t1 VALUES ('2010-03-28 01:59:59.9' /* Rounds to the DST gap, then gets fixed to the first second of the summer time */);
+SELECT a, UNIX_TIMESTAMP(a) FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+--disable_warnings
+SET sql_mode=@default_sql_mode;
+--enable_warnings
+
+
+--echo #
+--echo # Comparing non-temporal to TIMESTAMP
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64));
+INSERT t1 VALUES ('2001-01-01 23:59:59.9999999');
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+SELECT * FROM t1,t2 WHERE CONCAT(t1.a)=t2.a;
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (a DECIMAL(32,7));
+INSERT t1 VALUES (20010101235959.9999999);
+CREATE TABLE t2 (a TIMESTAMP);
+INSERT INTO t2 VALUES ('2001-01-02 00:00:00');
+SELECT * FROM t1,t2 WHERE t1.a=t2.a;
+SELECT * FROM t1,t2 WHERE COALESCE(t1.a)=t2.a;
+DROP TABLE t1,t2;
+
+
+--echo #
+--echo # MDEV-13995 MAX(timestamp) returns a wrong result near DST change
+--echo #
+--echo # Test Field_timestamp::store_native()
+--echo #
+
+SET sql_mode=@default_sql_mode;
+SET time_zone='+00:00';
+CREATE TABLE t1 (ts0 TIMESTAMP, ts1 TIMESTAMP(1));
+INSERT INTO t1 VALUES ('2001-01-01 10:20:30', '2001-01-01 10:20:30.9');
+SELECT * FROM t1;
+--echo # This should round
+UPDATE t1 SET ts0=COALESCE(ts1);
+SELECT * FROM t1;
+--echo # Corner case
+UPDATE t1 SET ts1=FROM_UNIXTIME(2147483647.9);
+UPDATE t1 SET ts0=COALESCE(ts1);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
diff --git a/mysql-test/main/udf.result b/mysql-test/main/udf.result
index 6af6b167511..6655982a38f 100644
--- a/mysql-test/main/udf.result
+++ b/mysql-test/main/udf.result
@@ -465,3 +465,122 @@ a b
Hello HL
DROP FUNCTION METAPHON;
DROP TABLE t1;
+#
+# MDEV-15424: Unreasonal SQL Error (1356) on select from view
+#
+CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
+create table t1(a int , b int);
+insert into t1 values(100, 54), (200, 199);
+create view v1 as select myfunc_int(max(a) over (order by b) , b) from t1;
+select * from v1;
+myfunc_int(max(a) over (order by b) , b)
+154
+399
+drop view v1;
+drop function myfunc_int;
+drop table t1;
+
+MDEV-15073: Generic UDAF parser code in server for windows functions
+
+CREATE AGGREGATE FUNCTION avgcost
+RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+CREATE AGGREGATE FUNCTION avg2
+RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+create table t1(pk int primary key,
+a int,
+sum int,
+price float(24));
+insert into t1 values
+(1, 1, 100, 50.00),
+(2, 1, 100, 100.00),
+(3, 1, 100, 50.00),
+(4, 1, 100, 50.00),
+(5, 1, 100, 50.00),
+(6, 1, 100, NULL),
+(7, 1, NULL, NULL),
+(8, 2, 2, 2),
+(9, 2, 4, 4);
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+pk a sum price avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+1 1 100 50 75.0000
+2 1 100 100 66.6667
+3 1 100 50 66.6667
+4 1 100 50 50.0000
+5 1 100 50 50.0000
+6 1 100 NULL 50.0000
+7 1 NULL NULL 0.0000
+8 2 2 2 3.3333
+9 2 4 4 3.3333
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+pk a sum price avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+1 1 100 50 50.0000
+2 1 100 100 75.0000
+3 1 100 50 75.0000
+4 1 100 50 50.0000
+5 1 100 50 50.0000
+6 1 100 NULL 50.0000
+7 1 NULL NULL 0.0000
+8 2 2 2 2.0000
+9 2 4 4 3.3333
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+1 1 100 50 0.7500
+2 1 100 100 0.6667
+3 1 100 50 0.6667
+4 1 100 50 0.5000
+5 1 100 50 0.5000
+6 1 100 NULL 0.5000
+7 1 NULL NULL 0.0000
+8 2 2 2 1.0000
+9 2 4 4 1.0000
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+1 1 100 50 0.5000
+2 1 100 100 0.7500
+3 1 100 50 0.7500
+4 1 100 50 0.5000
+5 1 100 50 0.5000
+6 1 100 NULL 0.5000
+7 1 NULL NULL 0.0000
+8 2 2 2 1.0000
+9 2 4 4 1.0000
+select pk, a, sum, price, tttttttt(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from 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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from ' at line 1
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from 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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from ' at line 1
+select pk, a, sum, price, round(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from 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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from ' at line 1
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from 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 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from ' at line 1
+set @save_sql_mode = @@sql_mode;
+set sql_mode="oracle";
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+1 1 100 50 0.5000
+2 1 100 100 0.7500
+3 1 100 50 0.7500
+4 1 100 50 0.5000
+5 1 100 50 0.5000
+6 1 100 NULL 0.5000
+7 1 NULL NULL 0.0000
+8 2 2 2 1.0000
+9 2 4 4 1.0000
+set sql_mode= @save_sql_mode;
+drop table t1;
+DROP FUNCTION avgcost;
+DROP FUNCTION avg2;
+DROP FUNCTION myfunc_double;
diff --git a/mysql-test/main/udf.test b/mysql-test/main/udf.test
index c3a25c6bcce..bb8493135aa 100644
--- a/mysql-test/main/udf.test
+++ b/mysql-test/main/udf.test
@@ -528,3 +528,82 @@ DROP FUNCTION METAPHON;
#INSERT INTO t1 (a) VALUES ('Hello');
#SELECT * FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-15424: Unreasonal SQL Error (1356) on select from view
+--echo #
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
+create table t1(a int , b int);
+insert into t1 values(100, 54), (200, 199);
+create view v1 as select myfunc_int(max(a) over (order by b) , b) from t1;
+select * from v1;
+drop view v1;
+drop function myfunc_int;
+drop table t1;
+
+--echo
+--echo MDEV-15073: Generic UDAF parser code in server for windows functions
+--echo
+
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE AGGREGATE FUNCTION avgcost
+ RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE AGGREGATE FUNCTION avg2
+ RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
+
+create table t1(pk int primary key,
+ a int,
+ sum int,
+ price float(24));
+insert into t1 values
+ (1, 1, 100, 50.00),
+ (2, 1, 100, 100.00),
+ (3, 1, 100, 50.00),
+ (4, 1, 100, 50.00),
+ (5, 1, 100, 50.00),
+ (6, 1, 100, NULL),
+ (7, 1, NULL, NULL),
+ (8, 2, 2, 2),
+ (9, 2, 4, 4);
+
+--sorted_result
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+--sorted_result
+select pk, a, sum, price, avgcost(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+
+--sorted_result
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)
+from t1;
+--sorted_result
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, tttttttt(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, round(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+--error ER_PARSE_ERROR
+select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+
+set @save_sql_mode = @@sql_mode;
+set sql_mode="oracle";
+--sorted_result
+select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING)
+from t1;
+set sql_mode= @save_sql_mode;
+
+drop table t1;
+DROP FUNCTION avgcost;
+DROP FUNCTION avg2;
+DROP FUNCTION myfunc_double;
diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result
index 0c6ddd3675a..7ad588114b6 100644
--- a/mysql-test/main/union.result
+++ b/mysql-test/main/union.result
@@ -564,7 +564,7 @@ explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index
-2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index; Using join buffer (flat, BNL join)
+2 UNION t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
explain (select * from t1 where a=1) union (select * from t1 where b=1);
id select_type table type possible_keys key key_len ref rows Extra
@@ -2165,6 +2165,44 @@ select @advertAcctId as a from dual union all select 1.0 from dual;
a
1000003.0
1.0
+#
+# MDEV-13784: query causes seg fault
+#
+CREATE TABLE t1 (`bug_id` int NOT NULL PRIMARY KEY, `product_id` int NOT NULL);
+INSERT INTO t1 VALUES (45199,1184);
+CREATE TABLE t2 (`product_id` int NOT NULL,`userid` int NOT NULL, PRIMARY KEY (`product_id`,`userid`));
+INSERT INTO t2 VALUES (1184,103),(1184,624),(1184,1577),(1184,1582);
+CREATE TABLE t3 (`id` int NOT NULL PRIMARY KEY,`name` varchar(64));
+CREATE TABLE t4 ( `userid` int NOT NULL PRIMARY KEY, `login_name` varchar(255));
+INSERT INTO t4 VALUES (103,'foo'),(624,'foo'),(1577,'foo'),(1582,'foo');
+CREATE TABLE t5 (`id` int NOT NULL PRIMARY KEY, `name` varchar(64));
+explain select
+(
+select login_name from t4 where userId = (
+select userid from t2 where product_id = t1.product_id
+union
+select userid from t2 where product_id = (
+select id from t5 where name = (select name from t3 where id = t1.product_id)) limit 1 )
+) as x from t1 where (t1.bug_id=45199);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
+2 SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 func 1 Using where
+3 SUBQUERY t2 ref PRIMARY PRIMARY 4 const 3 Using index
+4 UNION t2 ref PRIMARY PRIMARY 4 func 1 Using where; Using index
+5 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+6 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+NULL UNION RESULT <union3,4> ALL NULL NULL NULL NULL NULL
+select
+(
+select login_name from t4 where userId = (
+select userid from t2 where product_id = t1.product_id
+union
+select userid from t2 where product_id = (
+select id from t5 where name = (select name from t3 where id = t1.product_id)) limit 1 )
+) as x from t1 where (t1.bug_id=45199);
+x
+foo
+drop table t1, t2, t3, t4, t5;
End of 5.5 tests
#
# WL#1763 Avoid creating temporary table in UNION ALL
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index ca14731600e..dc9a4617fb3 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -1495,6 +1495,41 @@ eval SET NAMES $old_charset;
SET @advertAcctId = 1000003;
select @advertAcctId as a from dual union all select 1.0 from dual;
+--echo #
+--echo # MDEV-13784: query causes seg fault
+--echo #
+
+CREATE TABLE t1 (`bug_id` int NOT NULL PRIMARY KEY, `product_id` int NOT NULL);
+INSERT INTO t1 VALUES (45199,1184);
+
+CREATE TABLE t2 (`product_id` int NOT NULL,`userid` int NOT NULL, PRIMARY KEY (`product_id`,`userid`));
+INSERT INTO t2 VALUES (1184,103),(1184,624),(1184,1577),(1184,1582);
+
+CREATE TABLE t3 (`id` int NOT NULL PRIMARY KEY,`name` varchar(64));
+
+
+CREATE TABLE t4 ( `userid` int NOT NULL PRIMARY KEY, `login_name` varchar(255));
+INSERT INTO t4 VALUES (103,'foo'),(624,'foo'),(1577,'foo'),(1582,'foo');
+CREATE TABLE t5 (`id` int NOT NULL PRIMARY KEY, `name` varchar(64));
+
+explain select
+(
+ select login_name from t4 where userId = (
+ select userid from t2 where product_id = t1.product_id
+ union
+ select userid from t2 where product_id = (
+ select id from t5 where name = (select name from t3 where id = t1.product_id)) limit 1 )
+) as x from t1 where (t1.bug_id=45199);
+select
+(
+ select login_name from t4 where userId = (
+ select userid from t2 where product_id = t1.product_id
+ union
+ select userid from t2 where product_id = (
+ select id from t5 where name = (select name from t3 where id = t1.product_id)) limit 1 )
+) as x from t1 where (t1.bug_id=45199);
+drop table t1, t2, t3, t4, t5;
+
--echo End of 5.5 tests
--echo #
diff --git a/mysql-test/main/update.result b/mysql-test/main/update.result
index ccf2f4451ea..ab6596e8bf1 100644
--- a/mysql-test/main/update.result
+++ b/mysql-test/main/update.result
@@ -234,7 +234,9 @@ insert into t2 values ( 1, 'abcd1e');
insert into t2 values ( 2, 'abcd2e');
analyze table t1,t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
update t1, t2 set t1.a = t2.a where t2.b = t1.b;
show warnings;
@@ -326,7 +328,7 @@ delete from t1 order by a limit 1;
show status like 'handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 0
+Handler_read_key 4
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
diff --git a/mysql-test/main/update_use_source.result b/mysql-test/main/update_use_source.result
index e5585fcee5d..9e43b54d81c 100644
--- a/mysql-test/main/update_use_source.result
+++ b/mysql-test/main/update_use_source.result
@@ -1177,6 +1177,7 @@ insert t1 (c1,c2,c3) select 3,seq,seq%10 from seq_1_to_200;
create index t1_idx1 on t1(c3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
update t1 set c1=2 where exists (select 'x' from t1);
select count(*) from t1 where c1=2;
diff --git a/mysql-test/main/userstat.result b/mysql-test/main/userstat.result
index 2c8a3d3e97d..0067149691a 100644
--- a/mysql-test/main/userstat.result
+++ b/mysql-test/main/userstat.result
@@ -119,7 +119,7 @@ Handler_mrr_key_refills 0
Handler_mrr_rowid_refills 0
Handler_prepare 18
Handler_read_first 0
-Handler_read_key 9
+Handler_read_key 17
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
@@ -137,7 +137,7 @@ Handler_update 5
Handler_write 7
select variable_value - @global_read_key as "handler_read_key" from information_schema.global_status where variable_name="handler_read_key";
handler_read_key
-9
+17
disconnect ssl_con;
set @@global.userstat=0;
select * from information_schema.index_statistics;
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index eed9b224e2e..bbe1d9b69d7 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -615,6 +615,7 @@ select is_updatable from information_schema.views;
is_updatable
YES
YES
+YES
select * from t1;
col1 col2
5 Hello, view world
@@ -1279,10 +1280,10 @@ load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields term
Warnings:
Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
-Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
+Warning 1366 Incorrect integer value: 'error ' for column `test`.`t1`.`a` at row 3
Warning 1369 CHECK OPTION failed `test`.`v1`
Note 1265 Data truncated for column 'a' at row 3
-Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 4
+Warning 1366 Incorrect integer value: 'wrong end ' for column `test`.`t1`.`a` at row 4
Warning 1369 CHECK OPTION failed `test`.`v1`
select * from t1 order by a,b;
a b
@@ -4624,7 +4625,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,10 AS `a` from `test`.`t1` where !<expr_cache><10,`test`.`t1`.`a`>(<in_optimizer>(10,<exists>(/* select#2 */ select NULL from `test`.`t4` where `test`.`t4`.`a` >= `test`.`t1`.`a` and trigcond(<cache>(10) = NULL or <cache>(NULL is null)) having trigcond(NULL is null))))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,10 AS `a` from `test`.`t1` where !<expr_cache><10,`test`.`t1`.`a`>(<in_optimizer>(10,<exists>(/* select#2 */ select NULL from `test`.`t4` where `test`.`t4`.`a` >= `test`.`t1`.`a` and trigcond(<cache>(10) = NULL or 1) having trigcond(NULL is null))))
SELECT * FROM t1, t2
WHERE t2.a NOT IN (SELECT t3.b FROM t3 RIGHT JOIN t4 ON (t4.a = t3.a)
WHERE t4.a >= t1.a);
@@ -4640,7 +4641,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1276 Field or reference 'v1.a' of SELECT #2 was resolved in SELECT #1
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,10 AS `a` from `test`.`t1` where !<expr_cache><10,`test`.`t1`.`a`>(<in_optimizer>(10,<exists>(/* select#2 */ select NULL from `test`.`t4` where `test`.`t4`.`a` >= `test`.`t1`.`a` and trigcond(<cache>(10) = NULL or <cache>(NULL is null)) having trigcond(NULL is null))))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,10 AS `a` from `test`.`t1` where !<expr_cache><10,`test`.`t1`.`a`>(<in_optimizer>(10,<exists>(/* select#2 */ select NULL from `test`.`t4` where `test`.`t4`.`a` >= `test`.`t1`.`a` and trigcond(<cache>(10) = NULL or 1) having trigcond(NULL is null))))
SELECT * FROM v1, t2
WHERE t2.a NOT IN (SELECT t3.b FROM t3 RIGHT JOIN t4 ON (t4.a = t3.a)
WHERE t4.a >= v1.a);
diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result
index eeb507ecad2..df1429eaa4d 100644
--- a/mysql-test/main/view_grant.result
+++ b/mysql-test/main/view_grant.result
@@ -562,11 +562,6 @@ use test;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost;
drop user mysqltest_1@localhost;
drop database mysqltest;
-drop view if exists v1;
-drop table if exists t1;
-create table t1 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
create user 'test14256'@'%';
grant all on test.* to 'test14256'@'%';
connect test14256,localhost,test14256,,test;
@@ -592,9 +587,6 @@ test14256@% test14256@% 1
connection root;
disconnect test14256;
drop user test14256;
-insert into mysql.user select * from t1;
-flush privileges;
-drop table t1;
connection root;
create database mysqltest;
use mysqltest;
diff --git a/mysql-test/main/view_grant.test b/mysql-test/main/view_grant.test
index a70241138aa..65757e95fb3 100644
--- a/mysql-test/main/view_grant.test
+++ b/mysql-test/main/view_grant.test
@@ -669,16 +669,6 @@ drop database mysqltest;
#
# Bug#14256 definer in view definition is not fully qualified
#
---disable_warnings
-drop view if exists v1;
-drop table if exists t1;
---enable_warnings
-
-# Backup anonymous users and remove them. (They get in the way of
-# the one we test with here otherwise.)
-create table t1 as select * from mysql.user where user='';
-delete from mysql.user where user='';
-flush privileges;
# Create the test user
create user 'test14256'@'%';
@@ -708,12 +698,6 @@ connection root;
disconnect test14256;
drop user test14256;
-# Restore the anonymous users.
-insert into mysql.user select * from t1;
-flush privileges;
-
-drop table t1;
-
#
# Bug#14726 freeing stack variable in case of an error of opening a view when
# we have locked tables with LOCK TABLES statement.
diff --git a/mysql-test/main/warnings.result b/mysql-test/main/warnings.result
index 7c7e049ff2d..db3ef5f17d2 100644
--- a/mysql-test/main/warnings.result
+++ b/mysql-test/main/warnings.result
@@ -31,19 +31,19 @@ Error 1064 You have an error in your SQL syntax; check the manual that correspon
insert into t1 values (1);
insert ignore into t1 values ("hej");
Warnings:
-Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
+Warning 1366 Incorrect integer value: 'hej' for column `test`.`t1`.`a` at row 1
insert ignore into t1 values ("hej"),("då");
Warnings:
-Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
-Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2
+Warning 1366 Incorrect integer value: 'hej' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect integer value: 'då' for column `test`.`t1`.`a` at row 2
set SQL_WARNINGS=1;
insert ignore into t1 values ("hej");
Warnings:
-Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
+Warning 1366 Incorrect integer value: 'hej' for column `test`.`t1`.`a` at row 1
insert ignore into t1 values ("hej"),("då");
Warnings:
-Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
-Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2
+Warning 1366 Incorrect integer value: 'hej' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect integer value: 'då' for column `test`.`t1`.`a` at row 2
drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
@@ -171,44 +171,44 @@ create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update ignore t1 set a='abc';
Warnings:
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 1
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 2
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 3
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 4
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 5
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 6
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 7
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 8
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 9
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 10
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 10
show warnings limit 2, 1;
Level Code Message
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 3
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 3
show warnings limit 0, 10;
Level Code Message
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 1
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 2
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 3
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 4
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 5
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 6
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 7
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 8
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 9
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 10
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 1
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 2
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 3
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 4
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 5
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 6
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 7
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 8
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 9
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 10
show warnings limit 9, 1;
Level Code Message
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 10
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 10
show warnings limit 10, 1;
Level Code Message
show warnings limit 9, 2;
Level Code Message
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 10
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 10
show warnings limit 0, 0;
Level Code Message
show warnings limit 1;
Level Code Message
-Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 1
+Warning 1366 Incorrect integer value: 'abc' for column `test`.`t1`.`a` at row 1
show warnings limit 0;
Level Code Message
show warnings limit 1, 0;
@@ -254,13 +254,13 @@ SELECT f1 INTO x FROM t3 LIMIT 1;
END//
CALL sp1();
Warnings:
-Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
+Warning 1366 Incorrect decimal value: 'a`' for column ``.``.`x` at row 1
CALL sp2();
Warnings:
-Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
+Warning 1366 Incorrect decimal value: 'a`' for column ``.``.`x` at row 1
CALL sp3();
Warnings:
-Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
+Warning 1366 Incorrect decimal value: 'a`' for column ``.``.`x` at row 1
SET sql_mode = DEFAULT;
DROP PROCEDURE IF EXISTS sp1;
SET sql_mode = '';
@@ -271,7 +271,7 @@ SELECT f1 into x from t2 limit 1;
END//
CALL sp1();
Warnings:
-Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
+Warning 1366 Incorrect decimal value: 'a`' for column ``.``.`x` at row 1
SET sql_mode = DEFAULT;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index 2f757756117..279404968bf 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -3362,7 +3362,134 @@ Kaolin Tuning 88 68.7500
Tatiana Tuning 83 68.7500
drop table t1;
#
-# Start of 10.3 tests
+# MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free
+# or Invalid write in JOIN::make_aggr_tables_info
+#
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) order by 1+2;
+BIT_OR(100) OVER ()
+100
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT * FROM (
+SELECT
+ROW_NUMBER() OVER(), i, sum(i)
+FROM t1
+WHERE 1=0
+limit 0
+) AS sq;
+ROW_NUMBER() OVER() i sum(i)
+SELECT * FROM (
+SELECT
+ROW_NUMBER() OVER(), i, sum(i)
+FROM t1
+WHERE 1=0
+GROUP BY i
+) AS sq;
+ROW_NUMBER() OVER() i sum(i)
+drop table t1;
+create table t1 (a int);
+explain
+select distinct 1, row_number() over (order by 1) from t1 where a=0 group by a with rollup;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+select distinct 1, row_number() over (order by 1) from t1 where a=0 group by a with rollup;
+1 row_number() over (order by 1)
+drop table t1;
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) WITH ROLLUP
+HAVING @A := 'qwerty';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) WITH ROLLUP
+HAVING @A := 'qwerty';
+BIT_OR(100) OVER ()
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100)
+HAVING @A := 'qwerty';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100)
+HAVING @A := 'qwerty';
+BIT_OR(100) OVER ()
+create table t1 (a int);
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM t1
+GROUP BY LEFT('2018-08-24', 100) having 1=1 limit 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit
+drop table t1;
+#
+# MDEV-13170: Database service (MySQL) stops after update with trigger
+#
+CREATE TABLE t1 ( t1_id int, point_id int, ml_id int, UNIQUE KEY t1_ml_u (ml_id,point_id)) ;
+INSERT INTO t1 VALUES (1,1,8884),(2,1,8885);
+CREATE TABLE t2 ( db_time datetime, au_nr int, col_id int, new_val int);
+CREATE TABLE t3 (id1 int, id2 int, d1 int);
+CREATE TRIGGER t1_aurtrg AFTER UPDATE ON t1 FOR EACH ROW begin
+CREATE OR REPLACE TEMPORARY TABLE trg_u AS
+WITH l AS
+(SELECT a.*,
+Max(t2.col_id) over (PARTITION BY a.d1),
+Max(t2.new_val) over (PARTITION BY a.d1)
+FROM
+(SELECT d1 , id1, id2 FROM t3) a
+JOIN t2 ON (a.d1=t2.db_time AND a.id1=t2.au_nr))
+SELECT 1;
+END;//
+update t1 set ml_id=8884 where point_id=1;
+ERROR 23000: Duplicate entry '8884-1' for key 't1_ml_u'
+update t1 set ml_id=8884 where point_id=1;
+ERROR 23000: Duplicate entry '8884-1' for key 't1_ml_u'
+drop table t1, t2,t3;
+CREATE TABLE t1 (i INT, a char);
+INSERT INTO t1 VALUES (1, 'a'),(2, 'b');
+create view v1 as select * from t1;
+PREPARE stmt FROM "SELECT i, row_number() over (partition by i order by i) FROM v1";
+execute stmt;
+i row_number() over (partition by i order by i)
+1 1
+2 1
+deallocate prepare stmt;
+drop table t1;
+drop view v1;
+#
+# MDEV-17676: Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init
+#
+CREATE TABLE t1 (b1 text NOT NULL);
+INSERT INTO t1 VALUES ('2'),('1');
+EXPLAIN
+SELECT DISTINCT MIN(b1) OVER () FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary
+SELECT DISTINCT MIN(b1) OVER () FROM t1;
+MIN(b1) OVER ()
+1
+drop table t1;
+#
+# MDEV-15424: Unreasonal SQL Error (1356) on select from view
+#
+create table t1 (id int, n1 int);
+insert into t1 values (1,1), (2,1), (3,2), (4,4);
+create view v1 as SELECT ifnull(max(n1) over (partition by n1),'aaa') FROM t1;
+explain select * from v1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4
+2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using temporary
+select * from v1;
+ifnull(max(n1) over (partition by n1),'aaa')
+1
+1
+2
+4
+drop table t1;
+drop view v1;
+#
+# End of 10.2 tests
#
#
# MDEV-16489 when lead() returns null on a datetime field, the result is treated as the literal string '[NULL]'
@@ -3382,6 +3509,9 @@ d x
00:00:02 NULL
DROP TABLE t1;
#
+# End of 10.3 tests
+#
+#
# MDEV-16722: Assertion `type() != NULL_ITEM' failed
#
create table t1 (a int);
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index cd340a17a0d..19e83ea8c41 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2121,7 +2121,128 @@ ORDER BY test, name;
drop table t1;
--echo #
---echo # Start of 10.3 tests
+--echo # MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free
+--echo # or Invalid write in JOIN::make_aggr_tables_info
+--echo #
+
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) order by 1+2;
+
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+
+SELECT * FROM (
+ SELECT
+ ROW_NUMBER() OVER(), i, sum(i)
+ FROM t1
+ WHERE 1=0
+ limit 0
+) AS sq;
+
+SELECT * FROM (
+ SELECT
+ ROW_NUMBER() OVER(), i, sum(i)
+ FROM t1
+ WHERE 1=0
+ GROUP BY i
+) AS sq;
+drop table t1;
+
+create table t1 (a int);
+explain
+select distinct 1, row_number() over (order by 1) from t1 where a=0 group by a with rollup;
+select distinct 1, row_number() over (order by 1) from t1 where a=0 group by a with rollup;
+drop table t1;
+
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) WITH ROLLUP
+HAVING @A := 'qwerty';
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) WITH ROLLUP
+HAVING @A := 'qwerty';
+
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100)
+HAVING @A := 'qwerty';
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100)
+HAVING @A := 'qwerty';
+
+create table t1 (a int);
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM t1
+GROUP BY LEFT('2018-08-24', 100) having 1=1 limit 0;
+drop table t1;
+
+--echo #
+--echo # MDEV-13170: Database service (MySQL) stops after update with trigger
+--echo #
+
+CREATE TABLE t1 ( t1_id int, point_id int, ml_id int, UNIQUE KEY t1_ml_u (ml_id,point_id)) ;
+INSERT INTO t1 VALUES (1,1,8884),(2,1,8885);
+
+CREATE TABLE t2 ( db_time datetime, au_nr int, col_id int, new_val int);
+CREATE TABLE t3 (id1 int, id2 int, d1 int);
+
+delimiter //;
+
+CREATE TRIGGER t1_aurtrg AFTER UPDATE ON t1 FOR EACH ROW begin
+CREATE OR REPLACE TEMPORARY TABLE trg_u AS
+WITH l AS
+ (SELECT a.*,
+ Max(t2.col_id) over (PARTITION BY a.d1),
+ Max(t2.new_val) over (PARTITION BY a.d1)
+ FROM
+ (SELECT d1 , id1, id2 FROM t3) a
+ JOIN t2 ON (a.d1=t2.db_time AND a.id1=t2.au_nr))
+SELECT 1;
+
+ END;//
+
+ delimiter ;//
+--error 1062
+update t1 set ml_id=8884 where point_id=1;
+--error 1062
+update t1 set ml_id=8884 where point_id=1;
+drop table t1, t2,t3;
+
+CREATE TABLE t1 (i INT, a char);
+INSERT INTO t1 VALUES (1, 'a'),(2, 'b');
+create view v1 as select * from t1;
+PREPARE stmt FROM "SELECT i, row_number() over (partition by i order by i) FROM v1";
+execute stmt;
+deallocate prepare stmt;
+drop table t1;
+drop view v1;
+
+--echo #
+--echo # MDEV-17676: Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init
+--echo #
+
+CREATE TABLE t1 (b1 text NOT NULL);
+INSERT INTO t1 VALUES ('2'),('1');
+EXPLAIN
+SELECT DISTINCT MIN(b1) OVER () FROM t1;
+SELECT DISTINCT MIN(b1) OVER () FROM t1;
+drop table t1;
+
+--echo #
+--echo # MDEV-15424: Unreasonal SQL Error (1356) on select from view
+--echo #
+
+create table t1 (id int, n1 int);
+insert into t1 values (1,1), (2,1), (3,2), (4,4);
+
+create view v1 as SELECT ifnull(max(n1) over (partition by n1),'aaa') FROM t1;
+explain select * from v1;
+select * from v1;
+drop table t1;
+drop view v1;
+
+--echo #
+--echo # End of 10.2 tests
--echo #
--echo #
@@ -2139,6 +2260,10 @@ SELECT *, LEAD(d) OVER (ORDER BY d) AS x FROM t1;
DROP TABLE t1;
--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
--echo # MDEV-16722: Assertion `type() != NULL_ITEM' failed
--echo #
diff --git a/mysql-test/main/win_big-mdev-11697.result b/mysql-test/main/win_big-mdev-11697.result
index e5dc271839c..ec9d2243c88 100644
--- a/mysql-test/main/win_big-mdev-11697.result
+++ b/mysql-test/main/win_big-mdev-11697.result
@@ -12,6 +12,7 @@ select * from data_generator
commit;
analyze table test_table;
Table Op Msg_type Msg_text
+test.test_table analyze status Engine-independent statistics collected
test.test_table analyze status OK
explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10;
id select_type table type possible_keys key key_len ref rows Extra
@@ -44,6 +45,7 @@ select * from data_generator
commit;
analyze table test_table;
Table Op Msg_type Msg_text
+test.test_table analyze status Engine-independent statistics collected
test.test_table analyze status OK
explain select * from (select id, lead(id) over(order by id) next_id from test_table order by id) a limit 10;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 361724e5c57..56e265d9eef 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -102,6 +102,7 @@ use mtr_unique;
use mtr_results;
use IO::Socket::INET;
use IO::Select;
+use Time::HiRes qw(gettimeofday);
require "mtr_process.pl";
require "mtr_io.pl";
@@ -2292,6 +2293,10 @@ sub environment_setup {
$ENV{'EXE_MYSQL'}= $exe_mysql;
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
+ if(IS_WINDOWS)
+ {
+ $ENV{'MYSQL_INSTALL_DB_EXE'}= mtr_exe_exists("$bindir/sql$opt_vs_config/mysql_install_db");
+ }
my $client_config_exe=
mtr_exe_maybe_exists(
@@ -2891,15 +2896,44 @@ sub mysql_server_start($) {
# Save this test case information, so next can examine it
$mysqld->{'started_tinfo'}= $tinfo;
}
+
+ # If wsrep is on, we need to wait until the first
+ # server starts and bootstraps the cluster before
+ # starting other servers. The bootsrap server in the
+ # configuration should always be the first which has
+ # wsrep_on=ON
+ if (wsrep_on($mysqld) && wsrep_is_bootstrap_server($mysqld))
+ {
+ mtr_verbose("Waiting for wsrep bootstrap server to start");
+ if ($mysqld->{WAIT}->($mysqld))
+ {
+ return 1;
+ }
+ }
}
sub mysql_server_wait {
- my ($mysqld) = @_;
+ my ($mysqld, $tinfo) = @_;
- return not sleep_until_file_created($mysqld->value('pid-file'),
- $opt_start_timeout,
- $mysqld->{'proc'},
- $warn_seconds);
+ if (!sleep_until_file_created($mysqld->value('pid-file'),
+ $opt_start_timeout,
+ $mysqld->{'proc'},
+ $warn_seconds))
+ {
+ $tinfo->{comment}= "Failed to start ".$mysqld->name() . "\n";
+ return 1;
+ }
+
+ if (wsrep_on($mysqld))
+ {
+ mtr_verbose("Waiting for wsrep server " . $mysqld->name() . " to be ready");
+ if (!wait_wsrep_ready($tinfo, $mysqld))
+ {
+ return 1;
+ }
+ }
+
+ return 0;
}
sub create_config_file_for_extern {
@@ -3258,7 +3292,7 @@ sub mysql_install_db {
# Remove anonymous users
mtr_tofile($bootstrap_sql_file,
- "DELETE FROM mysql.user where user= '';\n");
+ "DELETE FROM mysql.global_priv where user= '';\n");
# Create mtr database
mtr_tofile($bootstrap_sql_file,
@@ -3281,6 +3315,7 @@ sub mysql_install_db {
# Create directories mysql and test
mkpath("$install_datadir/mysql");
+ my $realtime= gettimeofday();
if ( My::SafeProcess->run
(
name => "bootstrap",
@@ -3298,6 +3333,10 @@ sub mysql_install_db {
"Could not install system database from $bootstrap_sql_file\n" .
"The $path_bootstrap_log file contains:\n$data\n");
}
+ else
+ {
+ mtr_verbose("Spent " . sprintf("%.3f", (gettimeofday() - $realtime)) . " seconds in bootstrap");
+ }
}
@@ -5304,6 +5343,7 @@ sub server_need_restart {
{
delete $server->{'restart_opts'};
my $use_dynamic_option_switch= 0;
+ delete $server->{'restart_opts'};
if (!$use_dynamic_option_switch)
{
mtr_verbose_restart($server, "running with different options '" .
@@ -5398,6 +5438,118 @@ sub stop_servers($$) {
}
}
+#
+# run_query_output
+#
+# Run a query against a server using mysql client. The output of
+# the query will be written into outfile.
+#
+sub run_query_output {
+ my ($mysqld, $query, $outfile)= @_;
+ my $args;
+
+ mtr_init_args(\$args);
+ mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
+ mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
+ mtr_add_arg($args, "--silent");
+ mtr_add_arg($args, "--execute=%s", $query);
+
+ my $res= My::SafeProcess->run
+ (
+ name => "run_query_output -> ".$mysqld->name(),
+ path => $exe_mysql,
+ args => \$args,
+ output => $outfile,
+ error => $outfile
+ );
+
+ return $res
+}
+
+
+#
+# wsrep_wait_ready
+#
+# Wait until the server has been joined to the cluster and is
+# ready for operation.
+#
+# RETURN
+# 1 Server is ready
+# 0 Server didn't transition to ready state within start timeout
+#
+sub wait_wsrep_ready($$) {
+ my ($tinfo, $mysqld)= @_;
+
+ my $sleeptime= 100; # Milliseconds
+ my $loops= ($opt_start_timeout * 1000) / $sleeptime;
+
+ my $name= $mysqld->name();
+ my $outfile= "$opt_vardir/tmp/$name.wsrep_ready";
+ my $query= "SET SESSION wsrep_sync_wait = 0;
+ SELECT VARIABLE_NAME, VARIABLE_VALUE
+ FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+ WHERE VARIABLE_NAME = 'wsrep_ready'";
+
+ for (my $loop= 1; $loop <= $loops; $loop++)
+ {
+ # Careful... if MTR runs with option 'verbose' then the
+ # file contains also SafeProcess verbose output
+ if (run_query_output($mysqld, $query, $outfile) == 0 &&
+ mtr_grab_file($outfile) =~ /WSREP_READY\s+ON/)
+ {
+ unlink($outfile);
+ return 1;
+ }
+ mtr_milli_sleep($sleeptime);
+ }
+
+ $tinfo->{logfile}= "WSREP did not transition to state READY";
+ return 0;
+}
+
+#
+# wsrep_is_bootstrap_server
+#
+# Check if the server is the first one to be started in the
+# cluster.
+#
+# RETURN
+# 1 The server is a bootstrap server
+# 0 The server is not a bootstrap server
+#
+sub wsrep_is_bootstrap_server($) {
+ my $mysqld= shift;
+
+ my $cluster_address= $mysqld->if_exist('wsrep-cluster-address') ||
+ $mysqld->if_exist('wsrep_cluster_address');
+ if (defined $cluster_address)
+ {
+ return $cluster_address eq "gcomm://" || $cluster_address eq "'gcomm://'";
+ }
+ return 0;
+}
+
+#
+# wsrep_on
+#
+# Check if wsrep has been enabled for a server.
+#
+# RETURN
+# 1 Wsrep has been enabled
+# 0 Wsrep is not enabled
+#
+sub wsrep_on($) {
+ my $mysqld= shift;
+ #check if wsrep_on= is set in configuration
+ if ($mysqld->if_exist('wsrep-on')) {
+ my $on= "".$mysqld->value('wsrep-on');
+ if ($on eq "1" || $on eq "ON") {
+ return 1;
+ }
+ }
+ return 0;
+}
+
#
# start_servers
@@ -5417,8 +5569,7 @@ sub start_servers($) {
for (all_servers()) {
next unless $_->{WAIT} and started($_);
- if ($_->{WAIT}->($_)) {
- $tinfo->{comment}= "Failed to start ".$_->name() . "\n";
+ if ($_->{WAIT}->($_, $tinfo)) {
return 1;
}
}
diff --git a/mysql-test/std_data/ca-cert-verify.pem b/mysql-test/std_data/ca-cert-verify.pem
deleted file mode 100644
index 21d6264a0ad..00000000000
--- a/mysql-test/std_data/ca-cert-verify.pem
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDWzCCAkOgAwIBAgIJAO/QdKLEDQdXMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNV
-BAYTAklOMREwDwYDVQQIDAhLYXJuYXRrYTESMBAGA1UEBwwJQmFuZ2Fsb3JlMQ4w
-DAYDVQQKDAVNeVNRTDAeFw0xNjAxMDUxMDA1MDhaFw0yNTExMTMxMDA1MDhaMEQx
-CzAJBgNVBAYTAklOMREwDwYDVQQIDAhLYXJuYXRrYTESMBAGA1UEBwwJQmFuZ2Fs
-b3JlMQ4wDAYDVQQKDAVNeVNRTDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAKdOCuS2CzfBTJ2x8SAzY0J7cYJfNJvMDF1cvANnhkIhtnkWt/HZ5DJ9NxeX
-q5h7FJLAi4gddqdk/tvQJw0V6gZepJr/mKVnMPivF5+oHPc9ZJQMX6B3FBNwWylm
-ACd5GKx8I/H/MXyuhQTcoV//Ab+2pI8RHeYbBsm3lHH+tX7bRU6mUFjneqMpiCkb
-JHt6BWZiWR10O6pMuGQ9+dDdsLhEV1fj3CctEPwW6rs4IZzD8xl5n+8cy7qu6eYH
-Wt/snwsTzkrufeMRqTtqelxON9eoQwYOR1oH3vNEVlcbuoJAvaWOqBROUBdf12SP
-TYSdP9nlRh7lTKQOywN4kYt6LqUCAwEAAaNQME4wHQYDVR0OBBYEFJ4c9tKaUU0P
-EjBq5G207jjXI7RAMB8GA1UdIwQYMBaAFJ4c9tKaUU0PEjBq5G207jjXI7RAMAwG
-A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABRnUyj21oFi0SGJg/K5+8Lc
-4n6OwVU/NgLOysIB0baIP/Rqeaze59xG/v9FPQgBlWcJK3RabOywx5bxAxdcus+1
-yp5j4h37Qq1/qkgqmevvdSAPa0OBQbLb+58/naV+ywUpCYZ6flLdCMH3fXuDSlSq
-qrCznextjojtWbnzrBmCmJmXWGd2gSaJDvb90ZZp/Elt3vN1sgjW0M/JEkb4MJ1r
-6nfD/FHr2lUwBHm2yk7Blovx7x4d/Ip3pglk63cNO/Rn0SBTdoVDS2LB9du3Phq2
-TZiL3NrRMGUNwmdaavyrJxaPq5D+Sfa4LYP3MMYD4KhLogNzIl299n5joyizlJw=
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem
index cc5d9100e30..23dda2318e1 100644
--- a/mysql-test/std_data/cacert.pem
+++ b/mysql-test/std_data/cacert.pem
@@ -2,78 +2,78 @@ Certificate:
Data:
Version: 3 (0x2)
Serial Number:
- e5:b1:e3:71:e9:6f:a9:e1
+ d0:4d:23:85:ee:59:b3:fa
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:21 2017 GMT
- Not After : Apr 20 20:52:21 2037 GMT
+ Not Before: Jan 27 10:11:10 2019 GMT
+ Not After : Jan 22 10:11:10 2039 GMT
Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:a0:ad:d5:b1:ec:45:6f:d6:33:fc:5a:03:29:14:
- f1:8e:78:d5:27:53:79:e0:92:7c:10:3b:79:a0:d7:
- b6:9d:a8:5c:4d:fa:68:11:b3:03:9e:ee:5e:20:79:
- 23:d8:9c:49:34:9c:1d:c4:6e:53:1f:9a:92:1f:08:
- c1:15:e2:ad:cf:59:cd:1e:55:84:79:f9:09:ca:36:
- 8a:50:83:c6:38:48:c6:d3:fa:f6:f2:2a:4f:bd:5d:
- 60:9d:eb:21:c4:8c:f2:dd:2d:49:10:63:46:47:de:
- 2d:59:a0:4a:e0:58:e6:c0:ae:d8:d4:5e:9a:f8:f5:
- 68:1d:ea:80:8a:d6:01:b0:d5:5f:30:4d:88:5a:c5:
- 1f:81:92:c1:40:54:c8:bb:a6:a1:43:de:81:3c:4b:
- 79:95:82:bb:52:da:a3:a4:a0:69:ff:7e:00:8c:86:
- 85:ec:af:03:68:a8:83:48:a0:e4:1d:31:a9:5c:47:
- 99:9d:3a:3f:b5:3e:12:7c:4d:47:15:72:f1:11:5c:
- 4a:ef:08:1c:7b:8f:e6:03:06:07:4f:94:21:b0:5e:
- 27:fa:93:8c:b4:cc:56:34:3b:6d:c4:4a:14:57:b2:
- 21:1a:3e:2f:c5:9e:47:1a:59:05:22:0e:56:b1:a7:
- e8:80:9b:82:c3:54:57:12:05:94:79:a2:03:d9:64:
- 3c:63
+ 00:e8:0e:a7:84:d3:75:30:06:30:b2:10:b9:d1:88:
+ 36:2b:5e:f8:c8:44:57:cb:67:72:ab:96:95:33:d5:
+ 88:d1:8f:23:50:98:ba:6d:20:00:80:bd:35:d5:c1:
+ bf:98:49:c4:0a:15:4a:34:a6:21:9b:2e:8c:15:09:
+ f0:63:81:02:c2:7c:e2:53:e0:f7:a1:1a:40:5e:8f:
+ 41:4a:4c:56:d4:20:f1:d5:a7:c1:53:2e:ff:7e:37:
+ 17:cc:7e:74:bd:e2:22:33:ce:8c:77:62:a4:c5:3f:
+ 44:35:7b:7e:b9:f5:7d:8c:7a:27:58:fd:2c:42:86:
+ 2e:e7:6b:01:99:7b:fe:7d:a7:a1:4f:3e:39:39:54:
+ 1f:61:de:74:66:d1:77:4f:43:1b:66:70:29:85:de:
+ fc:8f:8e:1b:7b:a2:66:48:26:7f:9b:a6:fd:4a:e4:
+ dc:eb:ed:bd:f8:e3:f1:57:98:13:6f:f1:a3:2a:e3:
+ 73:bd:8d:7c:6f:4b:59:35:bc:b5:42:3e:99:a7:13:
+ 8d:be:2e:5c:9a:c6:5b:ab:ae:bf:00:e9:c8:ee:05:
+ 22:8e:d5:67:1a:47:9a:6d:9c:f9:42:3e:15:34:f8:
+ 31:ec:b4:7e:d3:92:95:b0:b8:f9:66:f3:bd:1d:31:
+ 2c:b1:90:62:a1:f8:4e:a6:5d:26:22:f0:e1:fe:16:
+ 2b:69
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
- 1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption
- 0d:4b:21:52:fa:49:34:56:14:db:83:ae:1c:3d:a7:4d:3e:ea:
- 55:7e:1a:37:7a:65:89:ee:19:05:94:9d:3a:ad:59:c4:38:16:
- b2:bd:02:ee:5a:a6:7e:e2:b1:21:a3:ad:af:8c:ae:c3:30:71:
- ad:d7:d2:24:0f:c4:d9:47:80:c5:95:05:1d:7c:8a:49:0a:7d:
- 8b:61:ca:b5:68:3d:3e:4e:f1:c7:45:62:c8:cc:a9:2f:f3:12:
- f1:3f:92:34:7f:07:ab:d3:ac:ab:af:2d:c9:69:63:8a:b2:e5:
- 35:ea:7d:b8:17:38:72:82:5f:96:3d:dc:8d:e5:11:bb:ae:f3:
- 02:2d:20:77:5c:64:59:18:a6:e7:fa:c7:89:e8:30:12:14:04:
- 40:5b:e9:b1:8f:86:81:b9:0d:6c:b6:fc:98:f9:b7:52:ab:8f:
- 7e:53:c8:a0:05:e4:cd:0d:6b:d2:74:9f:17:7a:a1:c3:76:5e:
- f3:29:1c:c6:be:56:ab:02:f7:5d:e1:c9:21:27:6d:66:7a:41:
- 29:49:a3:f8:f5:2a:e7:03:2a:7c:52:4b:f5:46:58:45:be:a4:
- 4c:a0:65:37:1d:d8:ac:f8:1f:81:ca:9c:79:f0:ff:22:8c:1d:
- ce:2b:d0:1e:ce:99:f2:db:fa:66:84:e6:86:6f:19:3b:10:f1:
- 92:ac:57:b2
+ df:fd:74:29:5b:5e:9a:8b:09:02:40:59:73:cb:71:47:3f:97:
+ 3d:a9:fd:c4:8c:01:29:c9:86:b8:71:55:ff:72:0e:50:dc:c8:
+ b5:e6:91:41:52:47:21:30:cc:4d:e7:3b:4b:db:55:ea:7d:46:
+ eb:53:e0:b7:1b:80:7c:b1:0c:d3:d1:bc:a0:73:ae:96:1f:fd:
+ 05:52:7e:54:d5:03:52:69:7b:34:5f:27:d7:98:da:98:76:73:
+ e6:bb:50:59:2a:94:90:67:03:1c:a4:76:2f:ee:ef:59:60:09:
+ 48:33:03:2b:52:ed:83:42:f8:71:19:7f:d8:be:40:ed:20:01:
+ 90:3c:7e:1c:8b:d2:9f:f3:2f:09:1f:50:c8:10:e1:8a:d9:a5:
+ 49:9c:0b:74:17:b9:2b:68:f6:1e:73:c2:73:10:38:b3:35:e2:
+ 87:91:1b:a1:d1:9b:81:9d:1b:32:cc:03:6e:4c:82:95:81:11:
+ 42:56:e2:16:2b:22:65:db:40:2c:ca:dc:03:f4:d5:07:cf:f5:
+ 13:b2:cf:51:5b:24:cd:c7:d1:9b:42:8e:f9:df:5d:1e:5a:09:
+ a3:4f:a9:0b:f4:21:c5:bb:ff:02:93:67:e8:2d:ee:ab:d9:59:
+ 76:03:2c:a1:bd:fb:dc:af:b6:82:94:71:85:53:a8:18:0d:3a:
+ 9e:42:eb:59
-----BEGIN CERTIFICATE-----
-MIIDfzCCAmegAwIBAgIJAOWx43Hpb6nhMA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV
+MIIDfzCCAmegAwIBAgIJANBNI4XuWbP6MA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV
BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD
-VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xNzA0MjUyMDUyMjFa
-Fw0zNzA0MjAyMDUyMjFaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx
+VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTAxMjcxMDExMTBa
+Fw0zOTAxMjIxMDExMTBaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx
ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH
-TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKCt1bHsRW/W
-M/xaAykU8Y541SdTeeCSfBA7eaDXtp2oXE36aBGzA57uXiB5I9icSTScHcRuUx+a
-kh8IwRXirc9ZzR5VhHn5Cco2ilCDxjhIxtP69vIqT71dYJ3rIcSM8t0tSRBjRkfe
-LVmgSuBY5sCu2NRemvj1aB3qgIrWAbDVXzBNiFrFH4GSwUBUyLumoUPegTxLeZWC
-u1Lao6Sgaf9+AIyGheyvA2iog0ig5B0xqVxHmZ06P7U+EnxNRxVy8RFcSu8IHHuP
-5gMGB0+UIbBeJ/qTjLTMVjQ7bcRKFFeyIRo+L8WeRxpZBSIOVrGn6ICbgsNUVxIF
-lHmiA9lkPGMCAwEAAaNQME4wHQYDVR0OBBYEFBzHK6obsbsumvQPsYZgVzjCQQUS
-MB8GA1UdIwQYMBaAFBzHK6obsbsumvQPsYZgVzjCQQUSMAwGA1UdEwQFMAMBAf8w
-DQYJKoZIhvcNAQELBQADggEBAA1LIVL6STRWFNuDrhw9p00+6lV+Gjd6ZYnuGQWU
-nTqtWcQ4FrK9Au5apn7isSGjra+MrsMwca3X0iQPxNlHgMWVBR18ikkKfYthyrVo
-PT5O8cdFYsjMqS/zEvE/kjR/B6vTrKuvLclpY4qy5TXqfbgXOHKCX5Y93I3lEbuu
-8wItIHdcZFkYpuf6x4noMBIUBEBb6bGPhoG5DWy2/Jj5t1Krj35TyKAF5M0Na9J0
-nxd6ocN2XvMpHMa+VqsC913hySEnbWZ6QSlJo/j1KucDKnxSS/VGWEW+pEygZTcd
-2Kz4H4HKnHnw/yKMHc4r0B7OmfLb+maE5oZvGTsQ8ZKsV7I=
+TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgOp4TTdTAG
+MLIQudGINite+MhEV8tncquWlTPViNGPI1CYum0gAIC9NdXBv5hJxAoVSjSmIZsu
+jBUJ8GOBAsJ84lPg96EaQF6PQUpMVtQg8dWnwVMu/343F8x+dL3iIjPOjHdipMU/
+RDV7frn1fYx6J1j9LEKGLudrAZl7/n2noU8+OTlUH2HedGbRd09DG2ZwKYXe/I+O
+G3uiZkgmf5um/Urk3Ovtvfjj8VeYE2/xoyrjc72NfG9LWTW8tUI+macTjb4uXJrG
+W6uuvwDpyO4FIo7VZxpHmm2c+UI+FTT4Mey0ftOSlbC4+WbzvR0xLLGQYqH4TqZd
+JiLw4f4WK2kCAwEAAaNQME4wHQYDVR0OBBYEFMpxmYnwcqt1ZrtlagMEcqV7laaT
+MB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMAwGA1UdEwQFMAMBAf8w
+DQYJKoZIhvcNAQELBQADggEBAN/9dClbXpqLCQJAWXPLcUc/lz2p/cSMASnJhrhx
+Vf9yDlDcyLXmkUFSRyEwzE3nO0vbVep9RutT4LcbgHyxDNPRvKBzrpYf/QVSflTV
+A1JpezRfJ9eY2ph2c+a7UFkqlJBnAxykdi/u71lgCUgzAytS7YNC+HEZf9i+QO0g
+AZA8fhyL0p/zLwkfUMgQ4YrZpUmcC3QXuSto9h5zwnMQOLM14oeRG6HRm4GdGzLM
+A25MgpWBEUJW4hYrImXbQCzK3AP01QfP9ROyz1FbJM3H0ZtCjvnfXR5aCaNPqQv0
+IcW7/wKTZ+gt7qvZWXYDLKG9+9yvtoKUcYVTqBgNOp5C61k=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/cakey.pem b/mysql-test/std_data/cakey.pem
index 88e251f00e2..0e2f7dce244 100644
--- a/mysql-test/std_data/cakey.pem
+++ b/mysql-test/std_data/cakey.pem
@@ -1,28 +1,28 @@
-----BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCgrdWx7EVv1jP8
-WgMpFPGOeNUnU3ngknwQO3mg17adqFxN+mgRswOe7l4geSPYnEk0nB3EblMfmpIf
-CMEV4q3PWc0eVYR5+QnKNopQg8Y4SMbT+vbyKk+9XWCd6yHEjPLdLUkQY0ZH3i1Z
-oErgWObArtjUXpr49Wgd6oCK1gGw1V8wTYhaxR+BksFAVMi7pqFD3oE8S3mVgrtS
-2qOkoGn/fgCMhoXsrwNoqINIoOQdMalcR5mdOj+1PhJ8TUcVcvERXErvCBx7j+YD
-BgdPlCGwXif6k4y0zFY0O23EShRXsiEaPi/FnkcaWQUiDlaxp+iAm4LDVFcSBZR5
-ogPZZDxjAgMBAAECggEAWmy6AGFpSmEP7IpzkOEaeAWEX5dY1YtaioAOGPiM6vje
-yXuMqblG5mBbVIcYJ0T85cCd9/fmi7ifVxvEHh7tle2Bw/p4jXQbkFNVT655FR/P
-1Wg9JVeufHFaeETlQgnYe6SKo9BaswNUHkZZHRyq7/D2Ub3UFRt2tq9MG9YIKY1m
-rP9s7E+EDuH9UhYmaWdQfNm8muIXWK8WjicI5+PX0CQ1NtUy6vS7qBzcBzvT0chC
-Jtja29S6Nvg12A96nHsRmQyUaQjRlqosSwiagpc5mZmNeCEUoY+3deIdYIUMSQnf
-judZOKVPq0GOW5Y1U068LGODWaifPkinGBj+04VH0QKBgQDOp/jVCOUdEeqFJ/8m
-wEsfsRIrXvtGJHgbDXcVJ69FwlX+yaKGEuC+4f21uyxPn6GoFw+NKAyTmGKH7VAX
-OFQLrMQ/DMlNbZrCAAFcXMqrnLaVwqMeIIoVNfKAa8u15K40qc+B0it61Nlay5wq
-wvXoSZrdqXSgsI29pav20+8pTQKBgQDHC3l1+gMZ1rCar+5KdVBN1Wq4Xh7cwZw6
-FxEvyrDCJePEU2L7FpH1pFuB4WpXdBu3CPo70ZgwfqBXn4qLOOI3gTtDHActyiUm
-+WRG62O+5Ye7aLB4xy0MfnKNA2g/yHj1ozwM8kA5JRptAzDnzWfVE0k47/pVAVzt
-E2bZuSykbwKBgQCL6SkMgjMr1T9j20phn/q8gBN/DZUtTe+K0Tj4N5/wqLuz/its
-fkdutG4ipZBAcCDwPnym4qBxJNBAmqiIr/gm11ceILgBFd2azoodUC1etoDfL6Fj
-+j/CUH3X+CM5CJPwz67Pg80wIf7t+7/FK611ELAqtllhmWa9KPcd6yqWWQKBgHh5
-Xnvk5kmWY3BNOgrBNOjXWu/asA1n9lpGqfVmVlQ8wL6MxiU5xQCMCYL0X/ws37WK
-boMUWmxHyF8gxqd7t5hm1OrKpSG274PGgUZXpRjfLqdlNyLzUzXztvvY6xloCqaK
-tYcUfYDZD0SaINi8v7L9KF2ZCsi2uXsZOjBf30BrAoGAXPPotkw/CkcPQBS13cha
-ZWeeH5NDKBADWXfLfcRUs108c9xw4BYr5yGilSPscN2ZP0/iWONKp/c6/STS54t5
-lkOKKUbkAFbQu8UKa1J7zrnHZv+Mr4I/iBBy6VkN8Spp2vBI3Ng6jhPIJg3Gum9p
-943wWtAnIhe/UqCRT3a/GZg=
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDoDqeE03UwBjCy
+ELnRiDYrXvjIRFfLZ3KrlpUz1YjRjyNQmLptIACAvTXVwb+YScQKFUo0piGbLowV
+CfBjgQLCfOJT4PehGkBej0FKTFbUIPHVp8FTLv9+NxfMfnS94iIzzox3YqTFP0Q1
+e3659X2MeidY/SxChi7nawGZe/59p6FPPjk5VB9h3nRm0XdPQxtmcCmF3vyPjht7
+omZIJn+bpv1K5Nzr7b344/FXmBNv8aMq43O9jXxvS1k1vLVCPpmnE42+Llyaxlur
+rr8A6cjuBSKO1WcaR5ptnPlCPhU0+DHstH7TkpWwuPlm870dMSyxkGKh+E6mXSYi
+8OH+FitpAgMBAAECggEBAMSw7yKxjSnIhWvYq3fDiY6XcC1naDb7FwIDn7GQs+hT
+9+3vlky6jFKSjdgB4iD1nVmilAQuMFv1Rzzp8LyWdD1fVwMbsyj1NEwyBngwXoRs
+7C5Zg467Tkmv7tcg9FiiHLVmxD7I+LpLlsfyRgbe4qy4OTO/W82DKKx0UaXDqIDd
+gIiBM5Vj9s1Lzoi7r2lXtuuEeRCH0mf9sAygqAkmj50i0vI05kQtIzJluU8KufPy
+DbQryaz5CWvXr4wdN3KbrVw5yRk9wz8JsIW1CRQshmVb5hZ+sS97eO11WKumen0I
+wXP8Z3s6NhTaeJvW/AsPZ2xm/vM/rLo1634tUZzzQ4UCgYEA+zIJ/TQ7Rfot30lu
+oz3d8moXW6B5iDUYQ6VuFY/0qImlFkR91BPp/XtZ0FyiVHEvF8hUQQc6jzCQylot
+QHOuW/hRWxFrVZndVhhgtAd4tFd39yOa8pkFifj8Wkdq6q0KuA+/qtCnVDwEEe+n
+U4xZXJmZ8schLRy9A5Js9NNckhcCgYEA7H7oCVBhNQRfcylBs5Y41qmIvokpU76B
+u6Pk7OwhVoe9aO41VXXjPwLJaPw7U2270CEuKB0YhVY1cpqFZdkuUsfwYh6ju6xY
+AIzeZuGw7LAXM+DabHnc6NKKAG6b9uBEh3f+N93NnLM8yPJheCbRGcC67gbEIB+Q
+7Z3TX8QtHn8CgYEAqSv9EDriBHHF/Q/uZCAhXsZWbs33q2Ter4g1SG5H/k2dEg8U
+kwTKXH17cllAtg/4AFNZcuYUaSTzDmSG/1YpQiVNXUCxAdh6+SW30ucJQqN51sZy
+7xlhYpd+FKrudZgOlQF+OuMFHjTBJPc6wIjQEg4cYSX80O3+2e3+VTAXswcCgYEA
+hfur58LzH383uF2yTFUaJHtt7kx07m3qv+ytgJCSnpxOcckqzBz6vrMMen8T+UMc
++WAi7zT0tG3P3/qtArOVK+78QAqNxoBwZvdn9K9+dcmZi5mjBXvQ7NKCvpXrpGUQ
+ThNsIih2GYXuNQYktFaBdm6bOMj6ihx4FjapDwNscG8CgYAnGxSNAgAsoMzfhSbp
+fYQYqGlufvTHknavHW1tQagxFdew9tsYYA9XQJtwB4pnYZ6vEGOnp74g4Y6i2VPx
+1T4T5ctDX0oydWe1lNZR8iszU9Fes9YnWviS2KWE0s3NDii/3UDUDqc4ZmgRUOIs
+gcAXPXgP9Kgz6kRH/9VkzAFfkQ==
-----END PRIVATE KEY-----
diff --git a/mysql-test/std_data/client-cert.crl b/mysql-test/std_data/client-cert.crl
new file mode 100644
index 00000000000..1f737bf790b
--- /dev/null
+++ b/mysql-test/std_data/client-cert.crl
@@ -0,0 +1,12 @@
+-----BEGIN X509 CRL-----
+MIIBxTCBrgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNlcnQxCzAJ
+BgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lua2kx
+EDAOBgNVBAoMB01hcmlhREIXDTE5MDEyNzEwMTExNVoXDTM5MDEyMjEwMTExNVow
+FDASAgEFFw0xOTAxMjcxMDExMTVaoA4wDDAKBgNVHRQEAwIBAjANBgkqhkiG9w0B
+AQsFAAOCAQEAI0yg8tW6n8m/3g4FO5fjrtwEB1HYnJVLbKT2fOSKs7WN/t6M4ZWo
+hSolEpNozd0yP+20srCMzsg7PuiYV/jMJn0bCw+Q6G7IP2GBlBURRErJ6UNZ+Upe
+Gc+o5tWvb7ROwMj76UBzK5tDsmDapk5102k0sfaIbD51OmA+RxnxbKsGNvAVp9EH
+yN+irF6vfVmbP1WPzGZa6x2s70kiC3peQlnZFOUnhycwVdiRprcUd+ZfMLJ3Ov2b
+oa9P+ntTW/0ijg0QYH6gSQVOl9ZiVhnRR/eO6SrkrevgtAM3pXl4aDdvFyoIXXkh
+mCkYfW7LkH/+OYWyZ1W99cnISM2F+yC1yQ==
+-----END X509 CRL-----
diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem
index 9f6f0cfde7c..dbd94f57702 100644
--- a/mysql-test/std_data/client-cert.pem
+++ b/mysql-test/std_data/client-cert.pem
@@ -1,26 +1,35 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 3 (0x3)
+ Serial Number: 5 (0x5)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:33 2017 GMT
- Not After : Apr 20 20:52:33 2037 GMT
+ Not Before: Jan 27 10:11:15 2019 GMT
+ Not After : Jan 22 10:11:15 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
+ Public-Key: (2048 bit)
Modulus:
- 00:a1:10:ea:cc:8e:2c:73:6b:33:1a:5e:26:19:b6:
- 4b:4c:bc:04:b8:c2:e2:33:eb:67:a2:7a:27:af:3f:
- f7:ef:49:5f:c1:d2:b9:d9:71:fe:17:a0:93:da:dc:
- f1:47:de:fa:1f:c3:c1:d1:a5:2a:06:cb:b3:e8:9a:
- c1:bd:78:77:68:45:c1:55:cd:b1:c1:d3:df:8c:12:
- 4f:c2:3a:0d:b7:58:dc:ca:13:08:b9:fb:12:24:90:
- aa:b7:4e:04:eb:43:0d:45:be:1c:17:d6:a8:b1:af:
- 10:3c:39:d6:08:45:ed:a9:7e:3a:69:ae:70:22:86:
- 7e:71:1f:f1:0e:d0:0d:32:c3
+ 00:a9:10:77:b5:42:8f:e8:ad:69:2a:03:e9:56:f5:
+ 2d:d5:ba:92:06:cc:7f:c8:d2:0f:c5:47:fd:3e:db:
+ e1:5b:2b:40:ca:f8:05:9c:12:55:ef:0c:4a:92:3d:
+ 01:ac:0a:21:72:c4:b4:d9:59:82:75:1d:0c:63:fe:
+ 5a:20:7f:c5:53:b2:b9:05:88:60:c7:d9:fd:0f:ce:
+ 8f:10:a3:23:74:8f:21:70:56:73:c2:07:f0:79:20:
+ 52:1d:e0:30:9d:ed:0d:5a:f2:68:1b:0c:9e:2d:62:
+ d6:5c:e3:72:2d:92:79:aa:d0:f0:3a:ed:d6:52:30:
+ 3a:e7:91:5e:98:4e:2f:a0:07:d7:73:78:42:02:7d:
+ c4:2c:d3:63:03:b7:72:a5:33:da:f7:e9:3f:93:c9:
+ 37:19:9f:33:62:4f:1a:03:c3:a6:4b:f4:f5:51:e4:
+ ef:af:d6:a7:9a:55:5f:bc:d3:a9:77:90:59:8c:29:
+ b5:2d:3d:ef:ba:cd:21:54:24:79:6e:91:be:08:b6:
+ b1:9c:78:be:6d:2f:56:72:10:69:91:ee:b3:bd:eb:
+ 77:b3:c1:bf:c7:28:c6:ad:70:37:68:da:42:8a:7f:
+ dc:3b:40:78:d5:f2:a5:c1:43:c3:61:8e:bb:d0:b8:
+ 2d:05:41:7e:f2:b2:49:86:8b:ad:d7:fb:e0:9b:48:
+ 7d:af
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,42 +37,45 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 0C:20:76:A1:80:9C:2F:30:3D:F7:AB:8D:31:19:AD:E2:F7:E2:8D:12
+ CE:F4:DF:1F:F9:52:2E:37:2D:3D:8A:B6:DE:41:8C:13:F6:14:4E:57
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
Signature Algorithm: sha256WithRSAEncryption
- 39:c0:90:13:19:85:47:9d:c6:ab:8c:c6:c9:0f:33:11:19:f7:
- 01:2c:1b:08:f6:81:98:11:ab:48:05:d9:b2:29:56:32:9c:ba:
- e5:40:df:85:5e:6d:fd:6e:36:9a:14:eb:90:50:57:de:2f:ed:
- 2d:89:a6:8a:40:1c:41:84:9b:da:e1:6d:e6:7c:46:b2:e0:90:
- 93:02:1c:52:2e:af:b4:d4:a1:d8:9d:19:cf:0a:67:bf:c3:3e:
- 2e:02:f4:3e:bc:2e:59:57:30:85:8a:32:ab:22:88:72:37:6e:
- ee:ed:f8:53:72:c9:28:87:50:47:81:1b:80:4c:f8:80:ce:2f:
- 47:ca:78:ce:38:51:70:ec:df:ee:fc:ea:5a:40:1e:4d:1c:fd:
- 4e:f6:74:d0:22:a4:7e:57:df:16:1a:a0:8d:be:fe:ee:f2:07:
- 2e:39:a1:97:40:19:f9:3b:b8:e7:c4:98:6e:1d:1a:27:d3:19:
- 4c:5c:c9:c3:31:98:c1:3c:27:0e:6a:de:cf:88:72:cf:e4:65:
- c9:0d:33:32:f1:ea:f7:dd:5b:9d:42:6d:ee:c7:a8:b7:85:d2:
- 41:e0:84:38:ce:86:81:ba:6e:7d:d5:ad:7a:00:58:d7:c5:83:
- 9e:5c:1d:38:32:72:49:f5:42:4b:e7:c6:5c:12:6d:e1:5d:51:
- 2c:f5:52:f0
+ 65:61:98:4c:62:3c:25:3b:12:2b:4d:78:9a:81:20:e2:4d:1e:
+ 1e:c3:78:ca:1b:5b:84:13:7b:11:da:f3:ad:d0:19:f0:02:0c:
+ 99:44:d8:52:89:e5:ee:61:9d:8e:ac:30:7a:dc:fc:7e:73:e3:
+ 28:39:25:00:78:f2:00:66:63:96:3a:10:af:2b:35:b5:3e:09:
+ 87:99:97:dd:29:0b:23:eb:95:fe:a8:f4:f5:4f:db:dd:ac:96:
+ 94:7b:b1:ef:47:15:54:6f:d8:1b:43:39:00:34:9f:ad:49:fb:
+ 21:26:94:74:20:61:ce:c5:b3:3d:5f:51:46:58:56:dc:2c:8c:
+ c3:74:97:83:63:3d:ad:0b:f6:81:63:4d:cb:30:af:45:ce:28:
+ fe:e0:68:c4:8f:1a:61:80:7e:56:8d:fc:31:5a:9f:33:37:1f:
+ ae:4e:0d:6c:25:e3:0e:13:af:01:1b:82:41:95:a1:83:47:61:
+ 40:dd:d4:36:fb:73:7a:98:61:d1:e2:5f:1e:a1:a1:a8:ea:e3:
+ 30:c8:74:c2:d2:82:6d:30:e5:e8:8f:b0:2d:1a:93:8e:ab:6b:
+ a6:17:36:a3:a2:0c:86:9c:b2:4e:1f:d7:6f:ef:04:f9:05:20:
+ b7:4f:e5:e3:9b:58:38:06:aa:d3:64:15:9a:bf:8a:97:fd:39:
+ b7:5f:e2:9e
-----BEGIN CERTIFICATE-----
-MIIDHjCCAgagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIDojCCAoqgAwIBAgIBBTANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
-MjA1MjMzWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTE1WhcNMzkwMTIy
+MTAxMTE1WjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZjbGllbnQw
-gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKEQ6syOLHNrMxpeJhm2S0y8BLjC
-4jPrZ6J6J68/9+9JX8HSudlx/hegk9rc8Ufe+h/DwdGlKgbLs+iawb14d2hFwVXN
-scHT34wST8I6DbdY3MoTCLn7EiSQqrdOBOtDDUW+HBfWqLGvEDw51ghF7al+Ommu
-cCKGfnEf8Q7QDTLDAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8W
-HU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQMIHahgJwv
-MD33q40xGa3i9+KNEjAfBgNVHSMEGDAWgBQcxyuqG7G7Lpr0D7GGYFc4wkEFEjAN
-BgkqhkiG9w0BAQsFAAOCAQEAOcCQExmFR53Gq4zGyQ8zERn3ASwbCPaBmBGrSAXZ
-silWMpy65UDfhV5t/W42mhTrkFBX3i/tLYmmikAcQYSb2uFt5nxGsuCQkwIcUi6v
-tNSh2J0Zzwpnv8M+LgL0PrwuWVcwhYoyqyKIcjdu7u34U3LJKIdQR4EbgEz4gM4v
-R8p4zjhRcOzf7vzqWkAeTRz9TvZ00CKkflffFhqgjb7+7vIHLjmhl0AZ+Tu458SY
-bh0aJ9MZTFzJwzGYwTwnDmrez4hyz+RlyQ0zMvHq991bnUJt7seot4XSQeCEOM6G
-gbpufdWtegBY18WDnlwdODJySfVCS+fGXBJt4V1RLPVS8A==
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpEHe1Qo/orWkqA+lW9S3V
+upIGzH/I0g/FR/0+2+FbK0DK+AWcElXvDEqSPQGsCiFyxLTZWYJ1HQxj/logf8VT
+srkFiGDH2f0Pzo8QoyN0jyFwVnPCB/B5IFId4DCd7Q1a8mgbDJ4tYtZc43Itknmq
+0PA67dZSMDrnkV6YTi+gB9dzeEICfcQs02MDt3KlM9r36T+TyTcZnzNiTxoDw6ZL
+9PVR5O+v1qeaVV+806l3kFmMKbUtPe+6zSFUJHlukb4ItrGceL5tL1ZyEGmR7rO9
+63ezwb/HKMatcDdo2kKKf9w7QHjV8qXBQ8NhjrvQuC0FQX7yskmGi63X++CbSH2v
+AgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2Vu
+ZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTO9N8f+VIuNy09irbeQYwT9hRO
+VzAfBgNVHSMEGDAWgBTKcZmJ8HKrdWa7ZWoDBHKle5WmkzANBgkqhkiG9w0BAQsF
+AAOCAQEAZWGYTGI8JTsSK014moEg4k0eHsN4yhtbhBN7EdrzrdAZ8AIMmUTYUonl
+7mGdjqwwetz8fnPjKDklAHjyAGZjljoQrys1tT4Jh5mX3SkLI+uV/qj09U/b3ayW
+lHux70cVVG/YG0M5ADSfrUn7ISaUdCBhzsWzPV9RRlhW3CyMw3SXg2M9rQv2gWNN
+yzCvRc4o/uBoxI8aYYB+Vo38MVqfMzcfrk4NbCXjDhOvARuCQZWhg0dhQN3UNvtz
+ephh0eJfHqGhqOrjMMh0wtKCbTDl6I+wLRqTjqtrphc2o6IMhpyyTh/Xb+8E+QUg
+t0/l45tYOAaq02QVmr+Kl/05t1/ing==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem
index b6b5507cd15..726cb5f5132 100644
--- a/mysql-test/std_data/client-key.pem
+++ b/mysql-test/std_data/client-key.pem
@@ -1,15 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQChEOrMjixzazMaXiYZtktMvAS4wuIz62eieievP/fvSV/B0rnZ
-cf4XoJPa3PFH3vofw8HRpSoGy7PomsG9eHdoRcFVzbHB09+MEk/COg23WNzKEwi5
-+xIkkKq3TgTrQw1FvhwX1qixrxA8OdYIRe2pfjpprnAihn5xH/EO0A0ywwIDAQAB
-AoGAaJMqT+vTcpDcmjcct78DPuwoiKmH4rvqCrUTRRbcbJGQSbD/F+6KUl7hAM5J
-Hifo8GzST8LT+ZuS0OiB9/naVGJjcLzpV+us+keMctB/cjmsPAAsRdeA8Xk0jTWv
-v+5a5ZWSSbRXycuUtywtoESY1RLEyB0k3Dcxvk6SD3LnNMkCQQDTyDJfP+eirhgC
-mKiNvHJjLtlRT11IMLMVTELEntsyKqzVgficZCWGkFRoF9iEO1OyCJaug7RZsuxs
-Z3lk/gq1AkEAwrHwzVPU+dTqsZ8tYHlq+d0xy+6eTtYy7e/5qH3AUz10us6BG/LY
-XVTwRFAOKQOciKZ/zPQa4oYeAc0oozSalwJBAIuMbyS0Rz262bdcQDSk5/rS8//P
-+/eFn3t5NMW6p1T3KcvGSLtEgjWZBQVSMSlwrkWxwxhbUIuKip8jz6nse8ECQDgm
-g5FkLRdEfc9uXfLl8aFQVu0+y29nPVb8D9+1LMOVBNZfekLqPdZlCcpZ4EuZ3ApZ
-IqCkgiB0l7DjT2YKZM8CQQCp8z1JvoNRwhIuojh7JajY5QBkXtvHootXr+vDUHNf
-SgR5BRmqZb0F5/BK4/7JbumiHI11QUULxhOnNtlS7DDt
+MIIEpQIBAAKCAQEAqRB3tUKP6K1pKgPpVvUt1bqSBsx/yNIPxUf9PtvhWytAyvgF
+nBJV7wxKkj0BrAohcsS02VmCdR0MY/5aIH/FU7K5BYhgx9n9D86PEKMjdI8hcFZz
+wgfweSBSHeAwne0NWvJoGwyeLWLWXONyLZJ5qtDwOu3WUjA655FemE4voAfXc3hC
+An3ELNNjA7dypTPa9+k/k8k3GZ8zYk8aA8OmS/T1UeTvr9anmlVfvNOpd5BZjCm1
+LT3vus0hVCR5bpG+CLaxnHi+bS9WchBpke6zvet3s8G/xyjGrXA3aNpCin/cO0B4
+1fKlwUPDYY670LgtBUF+8rJJhout1/vgm0h9rwIDAQABAoIBAQCAMnODZ+C13+DR
+sjua67mAysN2ElWHUvoQb2Ex7At7VVYBUob2bNTqulhFgasl6FyqqUw1T/Fjms5N
+eI6g/CIGMIyqDFrO0JZbCRdk1z/IX8xMYdHPPLP1NTPvYZOb/SfWYd/dOvkqkzrX
+HsTyl5JYm6y+EqEkm1vfQlUHiqoEXxG7hkYSIU6uXmRgeHHfw0Nuy/DizQFVZTAi
+yPoYQlMm13S1oIhr1cQRAHS41aWGl4dmprbS0Drqqr8kl2xrFEgZ/YLcwYKjAMzi
+UbkgOBU11DuLd0E+J/9iUhK5YTsMxo1TO89p7yNLHvT4NBhV3cuicq9aaWYeSijf
+VhDo+k4hAoGBAN1jlrElHmJcxI6JpA7BfX2BI5XTiQrq07jNkNMD1IlUe3zAnnq0
+DbwtXWYcolapYA9SbsXgHoEDhBjFJsz8fjqX/RKpBy0XZQuWImP0sYBficyWkKSQ
+yO0I9RNq6zERKSCP/wJMBGuRAVjlgrY6mBNVr2NmyqvVLzNNNUeCTcC/AoGBAMN+
+vrALUkMrJ8Oh5ay4IW+5toOu6/4TUyOK7zN23jGaObbPy/tLcgvpZ1xQsvuhvesG
+ubIr98st7J9+V/+mGMrvf5s4TlHUtB26E56wZrque98tBe8IG7Wh5dYut9PLw31K
+npT9fAYy8nsY2c7g5cs/vfJ+ixFj5ytsiYgjjI8RAoGBAMz32xh/CTaANOrSvDV9
+JrX/zfZ1NrgI2aSLjb4QGcJbmUjS/OcVtHG4fnR/pj0d63XEGBLTgOppWu+j+Fxo
+mGWfOgsAu0ggFMk5YvWwInZ7/ZSRAbGa6quqU1x67O0suisPpkV2I9GDGwA23WHh
+tdKQziT1kkasxVp17RIbrej5AoGAHMki5uUj3cQS/Nlv6jjKo5ri5wzwrt7FlSw2
+AIv2N7OP3/1E+eGoD1z03UD8udSdFGhPG48h04cVmn6OEpSwfeE6Fu75iU8anm3x
+yaIL3l0m3DvS7dlxyxLltt32L3eHd4FvTFzu0DLcRYfpOm8fJwhhvb0oWQ0u0tQO
+hD9HySECgYEAnLQnpkmFfr+1Gfg19N28Pvgh9NJMxvt4zVP+MZ8xR8gI+peqjZLp
+KDGtIlQ7bPnjMopeWojf7mOnlsvR4mChXJ6Uw1XGZjgMQnQtOrrHSuzdoWDJDteu
+8ftYoxWkqclzIrytpsOxon/Epq9i/D019V3+p+IhJ7NKiwqh0Ui66co=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/crl-ca-cert.pem b/mysql-test/std_data/crl-ca-cert.pem
deleted file mode 100644
index abe7bc469fc..00000000000
--- a/mysql-test/std_data/crl-ca-cert.pem
+++ /dev/null
@@ -1,63 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- a5:85:ec:60:b1:68:44:22
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=BG, ST=Plovdiv, O=Oracle, OU=MySQL, CN=MySQL CRL test CA certificate
- Validity
- Not Before: Jun 17 07:27:51 2011 GMT
- Not After : Jun 15 07:27:51 2016 GMT
- Subject: C=BG, ST=Plovdiv, O=Oracle, OU=MySQL, CN=MySQL CRL test CA certificate
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:9b:08:0b:96:19:57:fb:21:79:f4:16:c9:b8:2c:
- 13:2e:e1:fe:5f:6b:18:7d:d4:c4:d7:cd:66:a6:62:
- 0e:b7:28:b1:39:76:62:6e:5a:4a:80:f6:0e:8e:84:
- 3e:cf:2f:91:0d:36:6d:8b:b5:f9:78:96:f0:5f:82:
- a2:b2:d8:fc:b3:46:b5:30:24:b3:a8:77:60:6c:05:
- c9:8f:82:fd:ad:9f:26:23:29:56:5b:02:6f:f2:00:
- 31:86:60:b7:8c:56:b3:95:a8:8d:a9:bb:6b:91:fd:
- 5d:f5:6a:21:45:85:63:78:0e:0f:0e:03:6d:53:73:
- 0d:6c:aa:5b:f9:fc:fa:fd:f7
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- C4:1D:2C:68:3F:5F:29:51:EC:C5:54:61:CE:16:13:D2:72:5D:63:E8
- X509v3 Authority Key Identifier:
- keyid:C4:1D:2C:68:3F:5F:29:51:EC:C5:54:61:CE:16:13:D2:72:5D:63:E8
- DirName:/C=BG/ST=Plovdiv/O=Oracle/OU=MySQL/CN=MySQL CRL test CA certificate
- serial:A5:85:EC:60:B1:68:44:22
-
- X509v3 Basic Constraints:
- CA:TRUE
- Signature Algorithm: sha1WithRSAEncryption
- 73:dd:2e:76:71:25:c2:fe:7a:c5:46:ca:f2:c7:a0:43:f0:c7:
- 3c:24:8d:a6:bd:8d:f2:7c:db:03:1b:2b:8a:c8:23:ae:ef:71:
- 25:33:5b:10:61:e7:7d:89:30:a8:67:25:2e:e0:06:30:77:da:
- b8:87:e5:91:cd:c7:8f:c9:7b:3d:9e:86:80:44:02:6b:d1:06:
- 85:5d:28:78:cc:a7:a8:35:ac:f7:77:6d:e2:c7:a3:37:bc:9f:
- d3:bf:4a:ca:09:dc:d0:78:0c:59:c7:db:4b:67:f1:09:6d:a9:
- 7a:50:2f:1d:2c:a6:b8:81:0e:e6:4b:ee:d9:be:ae:a5:6a:d7:
- 56:c4
------BEGIN CERTIFICATE-----
-MIIDHDCCAoWgAwIBAgIJAKWF7GCxaEQiMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNV
-BAYTAkJHMRAwDgYDVQQIEwdQbG92ZGl2MQ8wDQYDVQQKEwZPcmFjbGUxDjAMBgNV
-BAsTBU15U1FMMSYwJAYDVQQDEx1NeVNRTCBDUkwgdGVzdCBDQSBjZXJ0aWZpY2F0
-ZTAeFw0xMTA2MTcwNzI3NTFaFw0xNjA2MTUwNzI3NTFaMGgxCzAJBgNVBAYTAkJH
-MRAwDgYDVQQIEwdQbG92ZGl2MQ8wDQYDVQQKEwZPcmFjbGUxDjAMBgNVBAsTBU15
-U1FMMSYwJAYDVQQDEx1NeVNRTCBDUkwgdGVzdCBDQSBjZXJ0aWZpY2F0ZTCBnzAN
-BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAmwgLlhlX+yF59BbJuCwTLuH+X2sYfdTE
-181mpmIOtyixOXZiblpKgPYOjoQ+zy+RDTZti7X5eJbwX4Kistj8s0a1MCSzqHdg
-bAXJj4L9rZ8mIylWWwJv8gAxhmC3jFazlaiNqbtrkf1d9WohRYVjeA4PDgNtU3MN
-bKpb+fz6/fcCAwEAAaOBzTCByjAdBgNVHQ4EFgQUxB0saD9fKVHsxVRhzhYT0nJd
-Y+gwgZoGA1UdIwSBkjCBj4AUxB0saD9fKVHsxVRhzhYT0nJdY+ihbKRqMGgxCzAJ
-BgNVBAYTAkJHMRAwDgYDVQQIEwdQbG92ZGl2MQ8wDQYDVQQKEwZPcmFjbGUxDjAM
-BgNVBAsTBU15U1FMMSYwJAYDVQQDEx1NeVNRTCBDUkwgdGVzdCBDQSBjZXJ0aWZp
-Y2F0ZYIJAKWF7GCxaEQiMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA
-c90udnElwv56xUbK8segQ/DHPCSNpr2N8nzbAxsrisgjru9xJTNbEGHnfYkwqGcl
-LuAGMHfauIflkc3Hj8l7PZ6GgEQCa9EGhV0oeMynqDWs93dt4sejN7yf079Kygnc
-0HgMWcfbS2fxCW2pelAvHSymuIEO5kvu2b6upWrXVsQ=
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/crl-client-cert.pem b/mysql-test/std_data/crl-client-cert.pem
deleted file mode 100644
index 260e8bf4647..00000000000
--- a/mysql-test/std_data/crl-client-cert.pem
+++ /dev/null
@@ -1,62 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- a5:85:ec:60:b1:68:44:24
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=BG, ST=Plovdiv, O=Oracle, OU=MySQL, CN=MySQL CRL test CA certificate
- Validity
- Not Before: Jun 17 07:32:32 2011 GMT
- Not After : Jun 16 07:32:32 2014 GMT
- Subject: C=BG, ST=Plovdiv, L=Plovdiv, O=Oracle, OU=MySQL, CN=MySQL CRL test client certificate
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:bd:18:bf:c5:37:7e:f7:8a:1d:22:c0:4f:5a:70:
- 51:ea:df:56:4f:29:e9:c7:a5:8a:ab:5a:48:b5:f9:
- bf:cd:2a:73:f8:fa:13:20:fd:33:17:11:93:51:f0:
- 4f:fa:a5:6a:bc:37:94:92:de:7d:c1:09:c6:43:c0:
- f7:cd:dd:ac:06:bf:fe:0c:9f:fc:ec:5b:83:a1:1e:
- 34:d8:af:50:17:4d:84:51:20:44:76:81:d1:12:76:
- 06:fb:05:29:59:47:0f:9d:97:f1:41:2f:92:0d:e4:
- b6:c1:fb:cf:75:95:a9:0f:cf:b3:4f:69:a3:d1:14:
- e9:6b:cf:be:53:bd:4e:3f:5d
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Basic Constraints:
- CA:FALSE
- Netscape Comment:
- OpenSSL Generated Certificate
- X509v3 Subject Key Identifier:
- 39:37:9C:0B:9F:E4:8E:48:48:71:23:2B:CA:F0:C1:F9:0B:F2:0A:D0
- X509v3 Authority Key Identifier:
- keyid:C4:1D:2C:68:3F:5F:29:51:EC:C5:54:61:CE:16:13:D2:72:5D:63:E8
-
- Signature Algorithm: sha1WithRSAEncryption
- 18:03:42:13:af:86:c3:eb:9c:40:4a:d8:9e:e7:25:e1:43:7b:
- 2f:55:1b:e6:ec:bf:9b:56:b3:c7:cb:78:cd:d2:00:46:39:96:
- d8:f8:cd:9d:0e:e7:97:51:93:f8:5b:ed:4f:5a:16:6b:56:fb:
- c0:d1:58:3c:7f:e9:64:aa:11:03:ff:3b:5e:9d:6d:c8:53:a8:
- 4a:30:f7:a6:ae:7c:e0:ed:16:c4:a0:07:9c:75:1a:23:58:13:
- 70:9e:aa:cc:b8:1d:70:26:85:ad:e1:f3:34:83:1b:e0:72:44:
- c4:28:d5:c5:6a:43:83:47:fe:8b:ab:ac:07:55:ff:2c:d9:0f:
- 5f:c7
------BEGIN CERTIFICATE-----
-MIIC3zCCAkigAwIBAgIJAKWF7GCxaEQkMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNV
-BAYTAkJHMRAwDgYDVQQIEwdQbG92ZGl2MQ8wDQYDVQQKEwZPcmFjbGUxDjAMBgNV
-BAsTBU15U1FMMSYwJAYDVQQDEx1NeVNRTCBDUkwgdGVzdCBDQSBjZXJ0aWZpY2F0
-ZTAeFw0xMTA2MTcwNzMyMzJaFw0xNDA2MTYwNzMyMzJaMH4xCzAJBgNVBAYTAkJH
-MRAwDgYDVQQIEwdQbG92ZGl2MRAwDgYDVQQHEwdQbG92ZGl2MQ8wDQYDVQQKEwZP
-cmFjbGUxDjAMBgNVBAsTBU15U1FMMSowKAYDVQQDEyFNeVNRTCBDUkwgdGVzdCBj
-bGllbnQgY2VydGlmaWNhdGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAL0Y
-v8U3fveKHSLAT1pwUerfVk8p6celiqtaSLX5v80qc/j6EyD9MxcRk1HwT/qlarw3
-lJLefcEJxkPA983drAa//gyf/Oxbg6EeNNivUBdNhFEgRHaB0RJ2BvsFKVlHD52X
-8UEvkg3ktsH7z3WVqQ/Ps09po9EU6WvPvlO9Tj9dAgMBAAGjezB5MAkGA1UdEwQC
-MAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRl
-MB0GA1UdDgQWBBQ5N5wLn+SOSEhxIyvK8MH5C/IK0DAfBgNVHSMEGDAWgBTEHSxo
-P18pUezFVGHOFhPScl1j6DANBgkqhkiG9w0BAQUFAAOBgQAYA0ITr4bD65xAStie
-5yXhQ3svVRvm7L+bVrPHy3jN0gBGOZbY+M2dDueXUZP4W+1PWhZrVvvA0Vg8f+lk
-qhED/ztenW3IU6hKMPemrnzg7RbEoAecdRojWBNwnqrMuB1wJoWt4fM0gxvgckTE
-KNXFakODR/6Lq6wHVf8s2Q9fxw==
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/crl-client-key.pem b/mysql-test/std_data/crl-client-key.pem
deleted file mode 100644
index dea4a9cea56..00000000000
--- a/mysql-test/std_data/crl-client-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQC9GL/FN373ih0iwE9acFHq31ZPKenHpYqrWki1+b/NKnP4+hMg
-/TMXEZNR8E/6pWq8N5SS3n3BCcZDwPfN3awGv/4Mn/zsW4OhHjTYr1AXTYRRIER2
-gdESdgb7BSlZRw+dl/FBL5IN5LbB+891lakPz7NPaaPRFOlrz75TvU4/XQIDAQAB
-AoGAYMe37rIWk47mlpCijIEMDA++Vsn20q2RKV4N9MUcO19M99LV036DlXzzT26V
-II1k8Wvo6Lpi1lewV6D9symPDwuxO3L/lSwInVSbAaCkRYq7BlpL+ShxsUpWT788
-ealwFTj3TeM1MCHpFwvO0xGBqFVk+ZadCNZjvwdQi44JCykCQQDqJgOTPPniq5Lk
-J6d+KWiCPVAEnEWk5lR0jQ2NZhSm4fFmCd0v6bNYhztk7dizSOiIrXnPLXx9Z8v0
-rwKr5WrHAkEAzr5ps9d/t4V60vAJCK+Sq1b+Qj42yEnH2eIjKAUFO63jkPtpOv9h
-nzYJTqajvEkHbYJ92elpzGx47FuSOjzAuwJAYpZC5xnDdSccoCf6I+q3cC70pBxQ
-TpAUe0ZwsFqM039KrtX0ZZoWw22dGm/yz/ogvnucUBks03iCrbGKhGoCPQJAdlhj
-U5I5Rsl+vH6w/Srbz37Vvv+0BkTNxPiA3Wi6TSZGDPkNjLshm6yn+UDEm4RGXzaC
-ahoF+QHi2pG0i+e4/wJBAOmbrYbjE2LAzIBy0NvRHslPABTK4zn1L9lzU5XIjV9r
-y8JiMfGNC5r7To/ERlFUlMbaPA5Zm9XNrZhDROMZLTc=
------END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/crl-client-revoked.crl b/mysql-test/std_data/crl-client-revoked.crl
deleted file mode 100644
index 80c4b1254d4..00000000000
--- a/mysql-test/std_data/crl-client-revoked.crl
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN X509 CRL-----
-MIIBbDCB1gIBATANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJCRzEQMA4GA1UE
-CBMHUGxvdmRpdjEPMA0GA1UEChMGT3JhY2xlMQ4wDAYDVQQLEwVNeVNRTDEmMCQG
-A1UEAxMdTXlTUUwgQ1JMIHRlc3QgQ0EgY2VydGlmaWNhdGUXDTExMDgxOTEwMDQ1
-MFoXDTE3MDIwODEwMDQ1MFowKjAoAgkApYXsYLFoRCQXDTExMDYxNzA3Mzc1OVow
-DDAKBgNVHRUEAwoBBaAOMAwwCgYDVR0UBAMCAQMwDQYJKoZIhvcNAQEFBQADgYEA
-BXAwYBjHUHG6MQ22/+1hvOaRtSYfj/E5bhKbBB8JlKSRFO+xIOF2i2H1AigunWpC
-R10NicSS7qjsr6yDyBaywZmi0TCNGksR7b3m1m97RnhrxkVRlr/i7L+o04ZwWo/b
-z9zoTX6RTj8rHgQtEdIOi/EArCvDv+wqYmkI+XMScGI=
------END X509 CRL-----
diff --git a/mysql-test/std_data/crl-server-cert.pem b/mysql-test/std_data/crl-server-cert.pem
deleted file mode 100644
index 312bce0e0b6..00000000000
--- a/mysql-test/std_data/crl-server-cert.pem
+++ /dev/null
@@ -1,62 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number:
- a5:85:ec:60:b1:68:44:23
- Signature Algorithm: sha1WithRSAEncryption
- Issuer: C=BG, ST=Plovdiv, O=Oracle, OU=MySQL, CN=MySQL CRL test CA certificate
- Validity
- Not Before: Jun 17 07:29:11 2011 GMT
- Not After : Jun 16 07:29:11 2014 GMT
- Subject: C=BG, ST=Plovdiv, L=Plovdiv, O=Oracle, OU=MySQL, CN=MySQL CRL test server certificate
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:c4:c6:01:29:db:e6:62:40:07:bd:43:ce:37:8e:
- 90:0e:3c:86:cc:6a:0c:40:8e:8e:30:27:f2:84:d3:
- 59:e8:7d:e7:97:1e:0d:36:08:0b:cc:28:bb:86:b0:
- 0a:64:8c:55:33:f6:ce:19:00:08:b9:93:ca:84:7e:
- 9a:4e:81:91:e2:56:32:2a:de:b5:1f:82:b9:8f:33:
- f4:87:f8:10:84:69:69:9a:79:58:08:9a:29:dc:09:
- 79:27:90:ec:af:c8:2d:5f:2e:c1:e1:4a:f1:52:21:
- 37:58:d4:f9:ef:49:ce:a9:9d:eb:dc:f4:34:30:40:
- d0:d7:38:54:94:2e:d1:ac:25
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Basic Constraints:
- CA:FALSE
- Netscape Comment:
- OpenSSL Generated Certificate
- X509v3 Subject Key Identifier:
- 4A:18:8F:0C:A3:CF:D7:4A:38:83:07:FC:26:E3:EB:96:32:73:FA:8C
- X509v3 Authority Key Identifier:
- keyid:C4:1D:2C:68:3F:5F:29:51:EC:C5:54:61:CE:16:13:D2:72:5D:63:E8
-
- Signature Algorithm: sha1WithRSAEncryption
- 61:74:cc:62:70:9e:1f:3e:96:ac:cd:54:4f:34:60:1c:27:51:
- f4:d5:f8:2e:d7:18:11:86:4e:b5:52:8c:a1:ef:28:c9:43:d7:
- 23:2a:22:15:4a:a3:e7:ff:76:fa:25:be:ed:30:05:ea:12:aa:
- 3f:c8:ab:a7:22:02:ea:cf:50:d4:43:31:5f:51:de:4c:e1:fa:
- 31:ba:2e:4e:d8:a4:3d:80:ad:17:83:67:0f:1b:6f:0b:74:43:
- ce:36:cb:2f:17:9e:6e:ae:c6:eb:ec:93:70:69:82:42:04:b3:
- a7:31:1f:65:70:ff:06:ce:9c:22:8a:dc:7d:92:bc:04:24:ca:
- 20:66
------BEGIN CERTIFICATE-----
-MIIC3zCCAkigAwIBAgIJAKWF7GCxaEQjMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNV
-BAYTAkJHMRAwDgYDVQQIEwdQbG92ZGl2MQ8wDQYDVQQKEwZPcmFjbGUxDjAMBgNV
-BAsTBU15U1FMMSYwJAYDVQQDEx1NeVNRTCBDUkwgdGVzdCBDQSBjZXJ0aWZpY2F0
-ZTAeFw0xMTA2MTcwNzI5MTFaFw0xNDA2MTYwNzI5MTFaMH4xCzAJBgNVBAYTAkJH
-MRAwDgYDVQQIEwdQbG92ZGl2MRAwDgYDVQQHEwdQbG92ZGl2MQ8wDQYDVQQKEwZP
-cmFjbGUxDjAMBgNVBAsTBU15U1FMMSowKAYDVQQDEyFNeVNRTCBDUkwgdGVzdCBz
-ZXJ2ZXIgY2VydGlmaWNhdGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMTG
-ASnb5mJAB71DzjeOkA48hsxqDECOjjAn8oTTWeh955ceDTYIC8wou4awCmSMVTP2
-zhkACLmTyoR+mk6BkeJWMiretR+CuY8z9If4EIRpaZp5WAiaKdwJeSeQ7K/ILV8u
-weFK8VIhN1jU+e9Jzqmd69z0NDBA0Nc4VJQu0awlAgMBAAGjezB5MAkGA1UdEwQC
-MAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRl
-MB0GA1UdDgQWBBRKGI8Mo8/XSjiDB/wm4+uWMnP6jDAfBgNVHSMEGDAWgBTEHSxo
-P18pUezFVGHOFhPScl1j6DANBgkqhkiG9w0BAQUFAAOBgQBhdMxicJ4fPpaszVRP
-NGAcJ1H01fgu1xgRhk61Uoyh7yjJQ9cjKiIVSqPn/3b6Jb7tMAXqEqo/yKunIgLq
-z1DUQzFfUd5M4foxui5O2KQ9gK0Xg2cPG28LdEPONssvF55ursbr7JNwaYJCBLOn
-MR9lcP8Gzpwiitx9krwEJMogZg==
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/crl-server-key.pem b/mysql-test/std_data/crl-server-key.pem
deleted file mode 100644
index fa8a61695c1..00000000000
--- a/mysql-test/std_data/crl-server-key.pem
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDExgEp2+ZiQAe9Q843jpAOPIbMagxAjo4wJ/KE01nofeeXHg02
-CAvMKLuGsApkjFUz9s4ZAAi5k8qEfppOgZHiVjIq3rUfgrmPM/SH+BCEaWmaeVgI
-mincCXknkOyvyC1fLsHhSvFSITdY1PnvSc6pnevc9DQwQNDXOFSULtGsJQIDAQAB
-AoGAfecnZW4jWegYS5xv/RJF0CYgJfkQv9m21s8omJ5W37B3lzSORW0eh1Hkswg+
-jhlQhwA63Lot2vfaU65h8ytqeGSxUSj0X8bVCsG+7aoQOxeowZs+CLgWPHmXbXw8
-BI9mFbfkIQ/1x5yMSTv0BNRGUtg+t5FGPsmWxSUtfTme4CECQQDxQGEoesrJ25uE
-MUcrTSeVpNmzqA8e41+8YIzbyi8nmwzp5gbsgIIF6/P5iMo1T7nIal/8N+FQMft4
-Ebzb0ZFNAkEA0M2JmH/ctyDQ7RbQx5lVwiHYn9a3inusvsV47kfH24kdRZYSymI8
-of7O8SGkHFJNeYsJmM3UrsNDlbSd+sCaOQJBAKoM+i8hVp2weU9VuNex28wkVfvH
-41ifZtUOrVsjidd9+D1KkejUsFHiPqfOntGzL74wFRZggSYZBStePWQotSUCQH29
-aMDnLtkw79/2v1+TnSs9CqCmwvyoIYz4iiykGVzBI1mGWGZ75ht/wMtBAPz1Kyao
-be0Q9qUPfaGnlQMt/TECQGrMh32zFPFR98yNS6JDVAVib+d5SaJsV5HXXqKCYxQR
-u1sv7YeF4/Y+TPKpBSasDNZHQ3zex0M9YOgI+9eEBHk=
------END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/crldir/ed1f42db.r0 b/mysql-test/std_data/crldir/ed1f42db.r0
new file mode 100644
index 00000000000..1f737bf790b
--- /dev/null
+++ b/mysql-test/std_data/crldir/ed1f42db.r0
@@ -0,0 +1,12 @@
+-----BEGIN X509 CRL-----
+MIIBxTCBrgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNlcnQxCzAJ
+BgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lua2kx
+EDAOBgNVBAoMB01hcmlhREIXDTE5MDEyNzEwMTExNVoXDTM5MDEyMjEwMTExNVow
+FDASAgEFFw0xOTAxMjcxMDExMTVaoA4wDDAKBgNVHRQEAwIBAjANBgkqhkiG9w0B
+AQsFAAOCAQEAI0yg8tW6n8m/3g4FO5fjrtwEB1HYnJVLbKT2fOSKs7WN/t6M4ZWo
+hSolEpNozd0yP+20srCMzsg7PuiYV/jMJn0bCw+Q6G7IP2GBlBURRErJ6UNZ+Upe
+Gc+o5tWvb7ROwMj76UBzK5tDsmDapk5102k0sfaIbD51OmA+RxnxbKsGNvAVp9EH
+yN+irF6vfVmbP1WPzGZa6x2s70kiC3peQlnZFOUnhycwVdiRprcUd+ZfMLJ3Ov2b
+oa9P+ntTW/0ijg0QYH6gSQVOl9ZiVhnRR/eO6SrkrevgtAM3pXl4aDdvFyoIXXkh
+mCkYfW7LkH/+OYWyZ1W99cnISM2F+yC1yQ==
+-----END X509 CRL-----
diff --git a/mysql-test/std_data/crldir/fc725416.r0 b/mysql-test/std_data/crldir/fc725416.r0
deleted file mode 100644
index 80c4b1254d4..00000000000
--- a/mysql-test/std_data/crldir/fc725416.r0
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN X509 CRL-----
-MIIBbDCB1gIBATANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJCRzEQMA4GA1UE
-CBMHUGxvdmRpdjEPMA0GA1UEChMGT3JhY2xlMQ4wDAYDVQQLEwVNeVNRTDEmMCQG
-A1UEAxMdTXlTUUwgQ1JMIHRlc3QgQ0EgY2VydGlmaWNhdGUXDTExMDgxOTEwMDQ1
-MFoXDTE3MDIwODEwMDQ1MFowKjAoAgkApYXsYLFoRCQXDTExMDYxNzA3Mzc1OVow
-DDAKBgNVHRUEAwoBBaAOMAwwCgYDVR0UBAMCAQMwDQYJKoZIhvcNAQEFBQADgYEA
-BXAwYBjHUHG6MQ22/+1hvOaRtSYfj/E5bhKbBB8JlKSRFO+xIOF2i2H1AigunWpC
-R10NicSS7qjsr6yDyBaywZmi0TCNGksR7b3m1m97RnhrxkVRlr/i7L+o04ZwWo/b
-z9zoTX6RTj8rHgQtEdIOi/EArCvDv+wqYmkI+XMScGI=
------END X509 CRL-----
diff --git a/mysql-test/std_data/galera-cert.pem b/mysql-test/std_data/galera-cert.pem
deleted file mode 100644
index 2996b330cc0..00000000000
--- a/mysql-test/std_data/galera-cert.pem
+++ /dev/null
@@ -1,26 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
-BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
-Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
-CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
-ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
-MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
-B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
-kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
-mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
-Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
-wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
-HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
-jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
-bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
-wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
-oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
-yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
------END CERTIFICATE-----
------BEGIN DH PARAMETERS-----
-MIGHAoGBAJWyvKjE+s7OP4Lj1jXKGlJGWT4Vd5YaxPljihTsRe1aXkWAgsuwISXk
-/TQ8Rx5Zmze7rtwtU0PoYxvuam9FMXYqhw2dVe4qRdeSX78DSiL/YBkQzaxlfWVy
-RE9+9dzHbCtRVDlN7K1kA+mGWH4/r7NAu4Qm/003V0NTtMwQSqebAgEC
------END DH PARAMETERS-----
-
diff --git a/mysql-test/std_data/galera-key.pem b/mysql-test/std_data/galera-key.pem
deleted file mode 100644
index c88c613cacf..00000000000
--- a/mysql-test/std_data/galera-key.pem
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDDzU6xLZDD5rZE
-NsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2QaMyTkvyjzf7bSFsDt
-9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BWB3lcoKXXJgMnWw0W
-Grt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5kdcIbDRVw81J4eAZ
-6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrMmhOeL8kuQV0fI8v2
-xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWXQo98swTu7mb89qVY
-mR71d3L3AgMBAAECggEBAIMT0UdZSp1quL/nrYqNGa9kuSuDz4uCM3+3jNcGZVU4
-vCYHxpmINLi0UK8W5ROJA3zC4AZKjDgOlW93NXK5iKyyiUTIN3hiJi4jiVDuGbh2
-DZtH7mmAKAU1zCx2y2osLLmurfbe8qOJF7ShhrZfgWsHFujFhhUdU92dsTkhZ7EU
-2NF8ScxCo4PbOJoHC3j0ApfwCMxUMAKZF5+08EeKYqK7OAXI79HeIvEbHn3cUDGm
-bvg6ykwlz2UUO4sg+xdCmn1Bt36HF/4e973Y5fkE/vd9mryHIlu9t7GJgWyUiPr8
-BGEoAWDSpPOMd/b9ivtxh9Gd+LW/uitMuBIfrRPgz9kCgYEA+JqeeD2xqF2IzZyq
-i1UqgKe3su2U2zhkgbu1h/1M/reNIZGylF0wFs3P+kNIB2NavmHjXcgSjdJzqRL9
-XEWfFJRmeARo9RTEQEVd8zp1Eo8ISeiksGgvbL4rrNIRR5V5MZytfISRiGCWN6jx
-ulJ6EieQk5EcvknGlWpJY/bBsQ0CgYEAyaCLqrR38gVl2Z0t6YlhW/HWAwGt+lf4
-apN1AS4uykx7wRW2B0y9QUDfsrYeVlbbeRPP4UzPmJez+J2cweoIIeFFyo3KP2L7
-79E3EVYywjXhPg52F7OjFA4Bp970XclIC5Al7kDufSgwZmWdceSx4Jjc5ixyQEC8
-Ad0ThgP6yxMCgYAvC4OFmZcvF1Q2JLmZWGqMojB/KbqLqaZLbqwxqduSMEYC3kF/
-FgttpVEAOQ8+ZqzbbkbKjnwEXpkIm9FaTsqF6HdjquH5zw48Y2QeDSfudSbKZb4U
-rAKdf3dgYvhmJYEjxFSIRcYMmsqSieQEsGrtWJNheYqI8AkmaVCuHBoXWQKBgQCj
-daelNffD2wJuQNI28axfiRjSiSsNuQHpDTCfS1ydnxH5QGu5UUphO4HfdWv03SfC
-6f/vDIGEmQBLvyOVxfDf3qzhAMCFUO8kxj1ZrcMq1dmMoNa2cmj0WkKXYNZFrmfd
-D/jgRf3Ss6FBcoIJErnudp8nb8MUOibxb9RjIpjQxwKBgEliKaGN+/QkPTNJ4vXz
-609CIilxpE+YVTzlv3YeZP5HqsJTJPS2ARIUr/Pjpbl3LHfYNeeGDCwgkJIK0JJH
-iA1M51q6t3zG2y9gKmC15FF0jShoZkRgqBxqrSHAnrCo5t2C48ElxJ3FEU8T75sz
-dlGTbkmR0Wm43Kh++dWICJ3g
------END PRIVATE KEY-----
diff --git a/mysql-test/std_data/galera-upgrade-ca-cert.pem b/mysql-test/std_data/galera-upgrade-ca-cert.pem
deleted file mode 100644
index 13d27e84bb3..00000000000
--- a/mysql-test/std_data/galera-upgrade-ca-cert.pem
+++ /dev/null
@@ -1,40 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
-BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
-Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
-CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
-ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
-MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
-B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
-kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
-mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
-Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
-wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
-HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
-jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
-bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
-wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
-oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
-yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
------END CERTIFICATE-----
------BEGIN CERTIFICATE-----
-MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
-BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
-Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
-CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
-dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
-fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
-nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
-ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
-8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
-biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
-mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
-BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
-PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
-8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
-KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
-zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
-25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera-upgrade-server-cert.pem b/mysql-test/std_data/galera-upgrade-server-cert.pem
deleted file mode 100644
index 3af8b1ae7dd..00000000000
--- a/mysql-test/std_data/galera-upgrade-server-cert.pem
+++ /dev/null
@@ -1,20 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
-BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
-Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
-CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
-dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
-fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
-nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
-ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
-8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
-biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
-mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
-BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
-PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
-8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
-KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
-zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
-25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera-upgrade-server-key.pem b/mysql-test/std_data/galera-upgrade-server-key.pem
deleted file mode 100644
index d243c9e0381..00000000000
--- a/mysql-test/std_data/galera-upgrade-server-key.pem
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDUOVzO0jNKeAZ5
-NQWJuP0Znhk7vwBKmBjJJm/8NEhWf/eFsXjVlEP/q4mVvmt/VHt+kWy6ttc0MPF5
-qntv8bPZdJDL3oNubRJuwVJm21X9HZa2VPVZ/mf2LHpEuqEpJuCc/IvZ+wNrG1mH
-a7LAYkReHBcW13Hd14ij+1iK8N+XlNyy/Q2dljxWDRugFE/4USdF4k51Jrksuf5A
-k3Zdr7C61ssd7SEjqG4pRdTZhR4F+DKTWdaiXnbjVlQMKAOyhpbyvZh4k0eY0id3
-fARFuoWAUexHg3X4C1zKt+f+5BKP3OtM878+nnUqmNZ/+CPGNc9uK7kN7nSpnj5T
-iejbQQg7AgMBAAECggEBAJ4m7VG3db+uOGzFJY5fzEX1+qn6ibYNKJNmUJfrQmkr
-zgLUoc7QQehbJhnwoN1v0OQebZ+rOC7NtnZLpNdkkPmhk3JKLTnykIT3DnhWRftt
-vG2+XGUnYMQkmy1ywz0Omt6CmZnlJMQByrNPgBM8Z+SWHGLKRTHkOBCz82T/YjDr
-wqug1Yv6W0wMNM/cikgoBldVG7hABCJuShjffIbUgVysK3dEPNywNAC78neoGECm
-evPZOaIkWEr86SpAlwA6Yh+zTQZ03CXATcGonJdWJ015DvlKRv6QyRR0Q/Y1ONwb
-f115kll15MJBEspFdSyhlMcVJlwO8WMaZ2qIzlQZmdECgYEA//P469QzX00L/urK
-7IRvtSVu5CP/A/Wui90U4KoP7XgXIeExnEtzLVs1K7vjuzdpTyq+68XuC40gPcJW
-RvoX229m6gRV8nC53UiV71jM8IvkyEqFYT/gfZC9KQCMSRJLtVnDMpZ3gMxAY6/5
-p20o616Au8DKFFetQV0aD4Hj1/MCgYEA1ENV1WkgvN6yItB77E9kN/vbKLRh0hrg
-9xj0SmMXGYyDM9NpjbgbgJIZo3ukkBtp3kEY8P9JQZRcd1EcnnSrwTB7ChdInWkR
-m/LpIZBEMqNQbeu4QSzZYYS6z4tcGGx43aHqzzNBZdnQnqhYL1CvlLwhkgX6oQCo
-woXqyfMNKJkCgYEA63gD1NGPwWkcVBSlQxpDup8JeZE0Fux6++kUP+u0Y39LqLuH
-7IXtHBkAvY9JXv8HPvHQWw/og2/97VNQFFQYhqPiRgBfIX9bPpx8c4l6YQISI8GL
-G4CsglgZ7hK2/LJ8PAascWnD3xYJVqyaPNFMB90VCaW/Qx+2IKAKTaHtfskCgYBu
-1f5C4pMqrCpeTXj4Cvis1wE4PwB5QnnH7SrakOVl/N4huLn8O2948lEa8Zwbd4UP
-ffR1Gwh4iuzBjQQhpZBt30/QFBphv5RnVy7uzLMfsfF0hEqBFdcoubMGXqGnSzTN
-nhfLO9thQJxTzFnH0xzr0FTDOAYH/h0g/eZ8r0JmuQKBgQDjhXM+hJ3Pkwua+Fnl
-nZfY5MeSzkJki/9iwVo8rSDwmZS9Nsc83oZnddM7c2x63t+zYOAcMxsVCiByMDzo
-5IB781HWRBGcU8TnW1b0bAnZimjKp/qsZ/Szr38rvImqG8TjzbcSD7w0SpyRQ/Ot
-A7SZFkWYfem8/q/VImjU/CNbOQ==
------END PRIVATE KEY-----
diff --git a/mysql-test/std_data/mdev17909#P#p20181029.MYD b/mysql-test/std_data/mdev17909#P#p20181029.MYD
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/std_data/mdev17909#P#p20181029.MYD
diff --git a/mysql-test/std_data/mdev17909#P#p20181029.MYI b/mysql-test/std_data/mdev17909#P#p20181029.MYI
new file mode 100644
index 00000000000..dcdd088b4dc
--- /dev/null
+++ b/mysql-test/std_data/mdev17909#P#p20181029.MYI
Binary files differ
diff --git a/mysql-test/std_data/mdev17909#P#p20181128.MYD b/mysql-test/std_data/mdev17909#P#p20181128.MYD
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/std_data/mdev17909#P#p20181128.MYD
diff --git a/mysql-test/std_data/mdev17909#P#p20181128.MYI b/mysql-test/std_data/mdev17909#P#p20181128.MYI
new file mode 100644
index 00000000000..dcdd088b4dc
--- /dev/null
+++ b/mysql-test/std_data/mdev17909#P#p20181128.MYI
Binary files differ
diff --git a/mysql-test/std_data/mdev17909.frm b/mysql-test/std_data/mdev17909.frm
new file mode 100644
index 00000000000..575ecd2c70f
--- /dev/null
+++ b/mysql-test/std_data/mdev17909.frm
Binary files differ
diff --git a/mysql-test/std_data/mdev17909.par b/mysql-test/std_data/mdev17909.par
new file mode 100644
index 00000000000..d9141dd0dee
--- /dev/null
+++ b/mysql-test/std_data/mdev17909.par
Binary files differ
diff --git a/mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001 b/mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001
new file mode 100644
index 00000000000..5010e164e43
--- /dev/null
+++ b/mysql-test/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001
Binary files differ
diff --git a/mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001 b/mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001
new file mode 100644
index 00000000000..4d582fdf5bb
--- /dev/null
+++ b/mysql-test/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001
Binary files differ
diff --git a/mysql-test/std_data/server-cert-verify-fail.pem b/mysql-test/std_data/server-cert-verify-fail.pem
deleted file mode 100644
index 4203425a344..00000000000
--- a/mysql-test/std_data/server-cert-verify-fail.pem
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDJzCCAg8CAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV
-BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM
-MB4XDTE2MDEwNTEwMDgyN1oXDTI1MTExMzEwMDgyN1owbzELMAkGA1UEBhMCSU4x
-EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE
-CgwGOk15U1FMMRcwFQYDVQQLDA4vQ049bG9jYWxob3N0LzENMAsGA1UEAwwEZmFp
-bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3wnWuJodzZYq9TAJRm
-HU7995FA3TEWdUinYTgGP79aTVQ4M9aeINlB6whWXOI8seh9Ja7C6kMzqOgYbgCl
-WlDPAVJWktFYeWXOLxbpzh1KWkS6jBkWT02t7H7JcYbil7xjlJUxLz4UOOUDUDIP
-6yqdA9VE3osESttjzj57Zm2xPqzbIHVJfORn7EexH4pryS7439p6i4XtfL31NJ8V
-07M3j3a8GqbcEqXYvcUCrLnywDQ1igP817b6ta52nbgYWiqdn0mJs535UJ/p/rSl
-D4Ae/6G3BSEY7whir6xY6vsd4KJ6w+wRCHnY0ky6OdDJVJLH1iqh7si7P3RBGkxw
-Y7MCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAggbw1jj2b7H5KDdeGJGIoOGkQAcs
-GNSJussCfdk7qnzYXKmjyNppC86jjaOrXona5f+SNCuujdu86Tv8V69EH57k4lUc
-DW7J4AD3vUb/tBzB0tsI/76Z4gm1XoCsnCGGpWd8GQAg/QNn/ZfJB2Vb/9ObN6rH
-0HV7ouB6OGZSsb71+grKiN6mDyB1lZynCGvqBxOCKFISfcRbCNFHo/pONlHaNGPE
-vjDH1bPZbEHj8owYgkdcQe0a8EbJYeQfm6fH8V8bmUcG7N60DrCnq4l1qwwVkh1S
-7RpIDgrWkU+esIIdYZIIbtDxQP1Sm7kUh++7b+bcHnyw3KtDVSCw7MIedA==
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-cert-verify-pass.pem b/mysql-test/std_data/server-cert-verify-pass.pem
deleted file mode 100644
index f8780f1f94e..00000000000
--- a/mysql-test/std_data/server-cert-verify-pass.pem
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDEzCCAfsCAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV
-BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM
-MB4XDTE2MDEwNTEwMDU1OVoXDTI1MTExMzEwMDU1OVowWzELMAkGA1UEBhMCSU4x
-EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE
-CgwGOk15U1FMMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUA
-A4IBDwAwggEKAoIBAQDAmkbUwDe+nrqL8A8uwlIZk74HHCDjUAWrskKF9leEIQsB
-5exFZ8JEo1u6mdR4laQWsxizGdTPqIEidkDyyEMh4+joHgyQEPD/G3rFVW8yEFHb
-42O04O96BEPFXNPDRuX3MxI+lGbYDjxTS/WhVub4/3SqLjC28FJmEUXIHA0/A+c5
-hlYXK0u+aPAqXxHIjBgB4BxxHXZKqecmvR3LhXoVmhJmndsVfKajB27nDKc8/OTI
-H2SXb6h3nRPDXRfwB/C5i+004tEsVeIgkYshcCgLSyDdeVieUP2pm3EAmDSjmtLF
-6CgY/EBSfH+JCKFUk75bA4k8CCGzBfIeOcsKHwgFAgMBAAEwDQYJKoZIhvcNAQEL
-BQADggEBAInDuHtDkeT6dkWmRJCP56c4xiQqib2QuYUuMSrAhf07xlLHc6iHnD2X
-hCWCrja6uwF90DnPjeouKMAUe5txq/uKA8/Y/NfXN6nPiAeHLI0qnTv7Mr9TQ8zU
-DNDwRz6onlI2cS4GhrwAnlpiaxu7AjMUWHtfBFGFrgn3PawjDQpsBZNcxw1QsLc0
-E0hFrWLOd0vDETEhoRge88N7a0jqK0Rd9cvRWnvjI+IsjQMLZzKufivIHPzI9K+9
-Wtp8iRHcaBr5DpsBjgsO7dqVRbsNyaWsdHdLt+CQSGXpv7P6fq3K6nJFTBeIgSfS
-gflrHVKYZRkKDDDpX4yHNdnIqrvy4RU=
------END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-cert.crl b/mysql-test/std_data/server-cert.crl
new file mode 100644
index 00000000000..c841c893c57
--- /dev/null
+++ b/mysql-test/std_data/server-cert.crl
@@ -0,0 +1,12 @@
+-----BEGIN X509 CRL-----
+MIIBxTCBrgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNlcnQxCzAJ
+BgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lua2kx
+EDAOBgNVBAoMB01hcmlhREIXDTE5MDEyNzEwMTExNVoXDTM5MDEyMjEwMTExNVow
+FDASAgEBFw0xOTAxMjcxMDExMTVaoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG9w0B
+AQsFAAOCAQEAERRidERQcCHOE3ltJeftBHhZL4xi/NuOH0KlYK6I00Resrwz4UUm
+cvBzNBb7LqLw24tRvhAGXrSxDEKVsUc+54VBRfPrHbUR15/9eseCA7lIKRS0ub8q
+0fvtwinxyr4Y9hcP9ew9bUZxf99yegc6rNC7/8xZCnIOdvQQ5BpelPGmZ71tnBeg
+6UkW6IG0/BG1MlxRJenAlILtxwu+Q6lgRvVrAtSQJJxTCzCof6oM7vTDvlTHH1LL
+F11xIXP9rjNGw0qBJmxLT4J8tB++eV5u7MpSlbwQNga44zyyvBqdRuSyhFufXPBi
+hqUmVskfdZs9HYrqIWz9ipkFiMNXEzGNxA==
+-----END X509 CRL-----
diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem
index b874f129ce3..068d7200c3e 100644
--- a/mysql-test/std_data/server-cert.pem
+++ b/mysql-test/std_data/server-cert.pem
@@ -5,22 +5,31 @@ Certificate:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:21 2017 GMT
- Not After : Apr 20 20:52:21 2037 GMT
+ Not Before: Jan 27 10:11:10 2019 GMT
+ Not After : Jan 22 10:11:10 2039 GMT
Subject: C=FI, ST=state or province within country, in other certificates in this file it is the same as L, L=location, usually an address but often ambiguously used, O=organization name, typically a company name, OU=organizational unit name, a division name within an organization, CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
+ Public-Key: (2048 bit)
Modulus:
- 00:c9:fe:83:3f:0b:38:89:1d:43:15:93:5c:26:b9:
- 80:65:41:bd:2f:63:66:5e:db:fa:33:20:d9:c7:e1:
- 35:f3:14:3c:c8:b4:f7:09:d8:f5:b5:44:8f:6b:7e:
- a0:a4:3b:45:5f:e6:f4:0f:08:67:f8:5a:4c:49:e4:
- e5:39:31:69:8c:cf:25:78:93:a6:7f:58:e9:90:9c:
- 61:cb:2e:14:b1:57:b2:15:9c:ea:8d:6f:96:20:fe:
- 29:ed:2c:71:b8:4f:1f:e0:05:6c:04:b1:7e:e0:bc:
- 42:8e:bf:95:5e:a9:5e:c9:c9:a4:64:c2:1f:59:94:
- 14:c2:06:44:79:bc:d2:65:2d
+ 00:eb:7c:4f:59:f0:40:37:ed:38:b2:e8:30:69:4e:
+ 95:c9:00:59:d1:60:3b:8a:aa:28:a1:20:40:ee:bf:
+ 1c:f3:b0:a6:40:8e:57:a4:79:81:c9:70:9f:8c:3d:
+ f4:5c:b0:f9:58:55:d9:62:b2:4b:69:e1:1a:73:bf:
+ 03:0e:8b:ca:d3:0d:f2:12:ea:68:1e:b8:f5:ba:29:
+ 02:b0:15:7f:76:52:9a:7d:ee:6d:7e:2c:f5:5a:d0:
+ 8c:a7:c9:53:d8:8c:ce:e3:be:c7:bb:4a:ae:7c:f9:
+ f1:6d:07:ac:3b:55:cd:83:3d:e4:ef:96:8e:a9:c9:
+ 1c:cb:84:99:cf:37:f5:53:57:e7:94:78:97:12:04:
+ 1f:dc:31:f8:f0:bf:7c:9b:ef:8a:25:02:1f:1b:ab:
+ cd:f9:bd:a9:de:df:e1:3d:b2:fb:92:44:93:59:ab:
+ f7:c2:a6:e1:05:19:49:fb:f8:02:5d:3e:d0:50:26:
+ 5b:e3:26:ac:fb:cf:ab:f1:52:0a:12:36:16:3d:b5:
+ 9e:12:f3:c3:69:e2:9b:89:70:b2:31:56:9a:9b:91:
+ a4:c6:39:01:56:e4:b5:8b:35:70:4e:eb:45:1b:70:
+ 7d:1a:52:2f:a5:37:32:80:ae:50:d0:da:4a:85:6a:
+ 3c:66:e7:41:85:c8:3a:dd:25:d8:4c:32:85:cb:12:
+ bc:81
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,47 +37,50 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- CB:22:3B:E6:DA:B8:3D:7E:39:61:18:38:50:C8:4D:B4:C8:9A:3E:2B
+ 0B:18:61:66:8F:12:44:81:60:0D:80:D6:0A:6A:9E:DE:D7:69:56:B0
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
Signature Algorithm: sha256WithRSAEncryption
- 8e:b7:3d:cc:2b:e5:27:49:49:5a:d4:3c:83:9b:2f:7d:11:de:
- 6b:0f:b4:51:02:e4:37:d0:c4:b5:7b:4b:e3:42:93:75:32:d1:
- eb:41:a2:27:fe:4d:91:ae:2b:a0:8b:3b:7f:e9:1b:47:85:73:
- 9f:b7:05:74:34:eb:62:12:d8:f2:24:6a:b4:24:58:7a:6a:55:
- 3e:ba:54:f9:51:de:54:0e:19:06:f6:01:23:32:0a:6c:81:e2:
- 57:8a:9e:71:c5:ba:ca:c3:0f:18:d4:ef:54:4b:e1:ee:7c:3a:
- f3:4d:c3:a3:44:21:9f:c8:ef:85:01:ab:fe:a9:7b:36:05:10:
- 25:5e:61:b8:1d:7c:40:8a:5d:5b:c1:bb:7c:79:45:6e:84:63:
- b5:3f:51:e9:9c:57:01:de:2d:1e:85:cb:83:f0:16:6d:78:bb:
- 12:01:a5:e5:a2:a7:80:fa:54:8f:9a:5c:de:1c:52:a2:bd:00:
- 49:e4:04:65:30:f9:b9:fc:4f:94:e2:d8:39:89:b6:a5:a5:2d:
- db:25:a3:0d:5b:f9:e1:2a:13:19:5e:d7:1a:33:89:5b:ac:bd:
- 29:26:da:1a:90:7e:08:19:dd:59:4b:50:fd:46:c3:0b:91:33:
- 8b:c6:70:d1:22:18:37:a3:8b:d3:8f:f8:68:cf:38:8e:e1:ef:
- ac:17:88:ca
+ ac:6b:15:7d:68:74:9d:ce:e2:ed:80:9c:f6:36:b5:54:8b:60:
+ 38:d3:cd:43:5c:97:44:1b:c8:6d:73:e2:1d:6a:68:07:bf:c4:
+ 0c:bf:ae:b9:f1:12:28:1b:07:6d:86:2e:8d:4d:1c:56:3e:e7:
+ d7:62:a1:a2:de:9b:7b:1a:8a:b4:7f:76:f1:cf:d3:b5:b0:95:
+ 91:ce:7e:49:45:0f:11:a6:96:6b:7b:42:07:cc:8d:28:13:d2:
+ 30:19:5a:c3:31:16:f6:0a:9a:d7:cd:8e:6f:be:8c:aa:91:40:
+ 68:fa:4d:ff:9f:10:d6:3d:27:27:54:f7:64:fa:7a:89:d9:67:
+ 4b:63:2b:da:cc:95:f1:30:10:e8:5e:cd:ce:43:c9:72:ad:32:
+ b6:06:cc:a9:02:dd:4d:9c:00:97:fc:99:80:84:bf:e3:54:5a:
+ e8:2c:a5:b3:30:8e:30:cb:3c:5f:74:18:43:a3:42:36:53:78:
+ 62:4f:08:56:11:80:c2:12:1a:da:70:18:10:7f:3d:15:b4:73:
+ 29:26:69:7d:3b:ec:f8:18:01:f7:ac:c2:8f:f2:37:8d:8d:fc:
+ 78:87:bc:d4:cb:1d:c1:14:c7:9c:3b:dc:a9:fd:e8:86:2a:32:
+ 51:fe:8d:89:cd:6a:9d:7a:6f:0c:52:4b:b2:4d:d3:dc:02:39:
+ 8d:2d:25:6e
-----BEGIN CERTIFICATE-----
-MIIEETCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIElTCCA32gAwIBAgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjIxWhcNMzcwNDIw
-MjA1MjIxWjCCAUcxCzAJBgNVBAYTAkZJMWEwXwYDVQQIDFhzdGF0ZSBvciBwcm92
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTEwWhcNMzkwMTIy
+MTAxMTEwWjCCAUcxCzAJBgNVBAYTAkZJMWEwXwYDVQQIDFhzdGF0ZSBvciBwcm92
aW5jZSB3aXRoaW4gY291bnRyeSwgaW4gb3RoZXIgY2VydGlmaWNhdGVzIGluIHRo
aXMgZmlsZSBpdCBpcyB0aGUgc2FtZSBhcyBMMUAwPgYDVQQHDDdsb2NhdGlvbiwg
dXN1YWxseSBhbiBhZGRyZXNzIGJ1dCBvZnRlbiBhbWJpZ3VvdXNseSB1c2VkMTQw
MgYDVQQKDCtvcmdhbml6YXRpb24gbmFtZSwgdHlwaWNhbGx5IGEgY29tcGFueSBu
YW1lMUkwRwYDVQQLDEBvcmdhbml6YXRpb25hbCB1bml0IG5hbWUsIGEgZGl2aXNp
b24gbmFtZSB3aXRoaW4gYW4gb3JnYW5pemF0aW9uMRIwEAYDVQQDDAlsb2NhbGhv
-c3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMn+gz8LOIkdQxWTXCa5gGVB
-vS9jZl7b+jMg2cfhNfMUPMi09wnY9bVEj2t+oKQ7RV/m9A8IZ/haTEnk5TkxaYzP
-JXiTpn9Y6ZCcYcsuFLFXshWc6o1vliD+Ke0scbhPH+AFbASxfuC8Qo6/lV6pXsnJ
-pGTCH1mUFMIGRHm80mUtAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
-BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTLIjvm
-2rg9fjlhGDhQyE20yJo+KzAfBgNVHSMEGDAWgBQcxyuqG7G7Lpr0D7GGYFc4wkEF
-EjANBgkqhkiG9w0BAQsFAAOCAQEAjrc9zCvlJ0lJWtQ8g5svfRHeaw+0UQLkN9DE
-tXtL40KTdTLR60GiJ/5Nka4roIs7f+kbR4Vzn7cFdDTrYhLY8iRqtCRYempVPrpU
-+VHeVA4ZBvYBIzIKbIHiV4qeccW6ysMPGNTvVEvh7nw6803Do0Qhn8jvhQGr/ql7
-NgUQJV5huB18QIpdW8G7fHlFboRjtT9R6ZxXAd4tHoXLg/AWbXi7EgGl5aKngPpU
-j5pc3hxSor0ASeQEZTD5ufxPlOLYOYm2paUt2yWjDVv54SoTGV7XGjOJW6y9KSba
-GpB+CBndWUtQ/UbDC5Ezi8Zw0SIYN6OL04/4aM84juHvrBeIyg==
+c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDrfE9Z8EA37Tiy6DBp
+TpXJAFnRYDuKqiihIEDuvxzzsKZAjlekeYHJcJ+MPfRcsPlYVdlisktp4RpzvwMO
+i8rTDfIS6mgeuPW6KQKwFX92Upp97m1+LPVa0IynyVPYjM7jvse7Sq58+fFtB6w7
+Vc2DPeTvlo6pyRzLhJnPN/VTV+eUeJcSBB/cMfjwv3yb74olAh8bq835vane3+E9
+svuSRJNZq/fCpuEFGUn7+AJdPtBQJlvjJqz7z6vxUgoSNhY9tZ4S88Np4puJcLIx
+VpqbkaTGOQFW5LWLNXBO60UbcH0aUi+lNzKArlDQ2kqFajxm50GFyDrdJdhMMoXL
+EryBAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wg
+R2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQLGGFmjxJEgWANgNYKap7e
+12lWsDAfBgNVHSMEGDAWgBTKcZmJ8HKrdWa7ZWoDBHKle5WmkzANBgkqhkiG9w0B
+AQsFAAOCAQEArGsVfWh0nc7i7YCc9ja1VItgONPNQ1yXRBvIbXPiHWpoB7/EDL+u
+ufESKBsHbYYujU0cVj7n12Khot6bexqKtH928c/TtbCVkc5+SUUPEaaWa3tCB8yN
+KBPSMBlawzEW9gqa182Ob76MqpFAaPpN/58Q1j0nJ1T3ZPp6idlnS2Mr2syV8TAQ
+6F7NzkPJcq0ytgbMqQLdTZwAl/yZgIS/41Ra6CylszCOMMs8X3QYQ6NCNlN4Yk8I
+VhGAwhIa2nAYEH89FbRzKSZpfTvs+BgB96zCj/I3jY38eIe81MsdwRTHnDvcqf3o
+hioyUf6Nic1qnXpvDFJLsk3T3AI5jS0lbg==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-key-verify-fail.pem b/mysql-test/std_data/server-key-verify-fail.pem
deleted file mode 100644
index af1ae1e3ae1..00000000000
--- a/mysql-test/std_data/server-key-verify-fail.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAvfCda4mh3Nlir1MAlGYdTv33kUDdMRZ1SKdhOAY/v1pNVDgz
-1p4g2UHrCFZc4jyx6H0lrsLqQzOo6BhuAKVaUM8BUlaS0Vh5Zc4vFunOHUpaRLqM
-GRZPTa3sfslxhuKXvGOUlTEvPhQ45QNQMg/rKp0D1UTeiwRK22POPntmbbE+rNsg
-dUl85GfsR7EfimvJLvjf2nqLhe18vfU0nxXTszePdrwaptwSpdi9xQKsufLANDWK
-A/zXtvq1rnaduBhaKp2fSYmznflQn+n+tKUPgB7/obcFIRjvCGKvrFjq+x3gonrD
-7BEIedjSTLo50MlUksfWKqHuyLs/dEEaTHBjswIDAQABAoIBAQCSUyNzDPydXvsf
-hhoUOParPAvU4tuETYDdD9Vdi7Lgf3jDQOjulbNIq/ec3KuBvrBwIrk9APvn+YxO
-AUP9S2Vgi5jBDeDdVgNv4n90b3pSJk2UVQJI8V72wN5Ibnf/KeErSKvWo6V5daq/
-AuZtKsZIdd3WFtA62HuyuBjTGc23Alj1C0EKnN0Rx1uBwDvx/OVQ266Us/x8jJqW
-ZxIOfcvfNzBQEa5hAzbQCReVaC+rBLRAcMM2yGP7aDa+8cRkwuVlSqpX8CXBdLoU
-PqmU49etcW72Rb1AFt9WgEu1Oh9UYbHFSB+FEbO8IGcGBsuYHf9zkxQyjpy/iKyT
-H5dTu7YBAoGBAOWqEGepZVrfB+P6X18n3vbJhgYmF0sa0mCmwkFYgk36yNqsZ8at
-lQjm5mbn4wjEKHIcQ/T1taq73W471M+PxMnn0WTwoG5jsyarZGgy6/95YXiyZtQe
-qgA4P3aKkCteRP22DjG7uxmm9Hoqx8Z31vfRTLAHN1IEHPHHkg/J3gPTAoGBANO4
-aqKeY4vcDvVkvxVbADrw++tZGwA+RuxfO4HKKru59VdA2PsAxhXwb3Dfejwj7hYW
-yE9edHjGpMr1+dpf8YJYs7qjajHe1HxBOYqQGHycIdw+Gv56R4HpaS9eW3x8l/Pi
-b4xnAodv2qIriACOe7br+rll4wKX46Wt64zdvpShAoGAT0r3HQM0Vjp4u/J+qRjX
-9za+yjKuiiS5i9snaG5JlujGHhG2Rrc5pHgsBk17alRnbnZp1BJdZZQ1MFEB+aO2
-mssp1YLqsRJFEU3NfdhO+MaMq6JUtFnd8fN5ndDbU83ZXgtUPUGGqKWm9OL+VHyd
-wLQHmSL0q6F16Ngxirf0qjcCgYEAtSmiJVA+gdhk/FmeoBlkEwtNpM50Kjsf2PaM
-Jrzk4Al5A5Y7lFvPI8q+sOio4XklKsWH1VJPe2EOdZUQnGlocE6SS+u03MN9Mm1l
-XUl7inTXDGwgEQx0z5b4KE4nHlhGdauWI5+pLFbrz8RL9Z32AkneGnIyU2/AnW46
-lijQAMECgYEAmgp/88ndIw49RCtMhYhtXQ87AsEAP6kzXQyKppDkn0os+xI5igIL
-i/UDxB33hx3yjrUZwoGDV9MwlMhZNX5Tf5bwjPmmh1NR6KdEpPt5AkklX4s6uil2
-Bxl1P5l1jl/PbEYtv5LDZKIPANWRzViMSIWqjUWlbdqE7/vjx+Oo+cc=
------END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server-key-verify-pass.pem b/mysql-test/std_data/server-key-verify-pass.pem
deleted file mode 100644
index 7ecc44f6d48..00000000000
--- a/mysql-test/std_data/server-key-verify-pass.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAwJpG1MA3vp66i/APLsJSGZO+Bxwg41AFq7JChfZXhCELAeXs
-RWfCRKNbupnUeJWkFrMYsxnUz6iBInZA8shDIePo6B4MkBDw/xt6xVVvMhBR2+Nj
-tODvegRDxVzTw0bl9zMSPpRm2A48U0v1oVbm+P90qi4wtvBSZhFFyBwNPwPnOYZW
-FytLvmjwKl8RyIwYAeAccR12SqnnJr0dy4V6FZoSZp3bFXymowdu5wynPPzkyB9k
-l2+od50Tw10X8AfwuYvtNOLRLFXiIJGLIXAoC0sg3XlYnlD9qZtxAJg0o5rSxego
-GPxAUnx/iQihVJO+WwOJPAghswXyHjnLCh8IBQIDAQABAoIBAHPQUSc9LkgBSks7
-XuXPE28t1+aOk3gcdkx4NGg5aQaal/PcPea+LaL4WAAs4AZidPjxWLjZn43+1SfT
-09opcbS/Rx3Mc+FtTn0YGQrwBJ0mExMV+K6bU2Ubi2TyHKQfzciHfUEEG5Nve/ba
-hikuCFVRxuVOQRzABcw6NqvNsmlg892lfw6/+RDwMBcz7ocwzmiOUoIxgjyFo9G4
-aJvRmHLij5892H6qveik+A/Xr+8leGQHiQET2wW/F9MFP5ypIT7aeE6remeZH7fG
-f4/Zfei/TE4xK2ElNR/91byzeKIVY4vjtTndAiBuqpfYuICb40MC02LNW5Oe6VN2
-3mQ6EgECgYEA7O4ndBnbs/00gyTGyNg6I+3wRTibhNH4R8RZFJiLfKRKOlUiLhUo
-+bQeO4bCQ6YY++TYDvMEXTlA3jow9R9Mj2AWc6bNmQmJd/065QyFHftywT66I+V4
-rz1ohSJyHXcv4DxqNk3o3Vb4N8GFjZKcodSgTv2Lk+9ipDYFcQiZop0CgYEA0BrF
-SIyLTnjoVht/7RbIGEqhMQUiz5mx7qQ1TPB+YTG77G2xXJNg5d6S7WT4LN+cqbxN
-YdndIbW4NdV7bH7FlG9q7jfkuZ+AY2BPU047tcDeyO0HYYEhVY+EyZqHci/26mvt
-JrawdqS5HQS1y/rKfytm7YBGTvqoNZHvOHc6aokCgYEAxcjlbJkte+pyzMuFmiJP
-HrFBczeXM+BoJ9j0GCpjvvAS+vEYsGl/pDvFRSHwx7I/hv/5kTkzOnNSAHGJbwbq
-zYGEHJVxakC43k6pvI2gDnBa0pD/qHmmLnvP5dvkcU6Oy90DOUP+kc9JNJo7V/y8
-/qdWD7q+qwcaTETAdCSexE0CgYA/DN1Y7bwHOnqqHArWOmDFe1b7EyNI4rgWJYpA
-lVy09eyJ5XInKj/hZV3+rujCL723b2XCj89/tx7osJWEeaRDJL6xDh4uXzT25uch
-xkIw/w6Asc/aqtT+p00EB92hqwaUX76qTA+K4r1zHUo3UvSnMu8sZgDnTOpJ0L05
-zmXUgQKBgDT+IFrAzOty4B0mJncTCC/TulpW704bEZwNJfQSdtiBQr/vqoXygBQc
-bHfpncpSfhzHB5lhRUv02TqXgl53D70nM7JD5nx98WYTTBxsbvxPlt4gBRZkfgq5
-tHKclAArc1SbfW5Z8oYyl7h33LQJK116QSyiIIGieH5VXNPwnqUs
------END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem
index feb7fbaf535..125c4efa587 100644
--- a/mysql-test/std_data/server-key.pem
+++ b/mysql-test/std_data/server-key.pem
@@ -1,15 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQDJ/oM/CziJHUMVk1wmuYBlQb0vY2Ze2/ozINnH4TXzFDzItPcJ
-2PW1RI9rfqCkO0Vf5vQPCGf4WkxJ5OU5MWmMzyV4k6Z/WOmQnGHLLhSxV7IVnOqN
-b5Yg/intLHG4Tx/gBWwEsX7gvEKOv5VeqV7JyaRkwh9ZlBTCBkR5vNJlLQIDAQAB
-AoGAZzoeMJW3arr9kYUhTtj1+MlDuXf+1PNuRbrAERnSzErHVXrF1M5/owdKlBC+
-X6+6oGwSxavyFkVvP0QusK/D1DxSs60Mk1p3Ax5nVpNYiBdeBULcYiXCSUbKItYL
-vzyECIc02t+auWf/wp3Wy3g6sU6FoT2QCPSsy0qRC48VBzECQQD79P9w0XjJGk8y
-3zPc4JOr3a1UUu4VLjFdFDR2eZZRE02NcXfLHE0+Idk3TYnNDRLoWDJjdfZ0thZZ
-KuJ58wIDAkEAzTxGYmT/aieDC3G8sHMqLUvjN30TfTocv7mWlpxWo7zbRbQm7jsB
-S5weRKtu3yVmdb6rW+5IZSCazc/j4T5tDwJAUgDRSpTCrSFE+Zevt4nYRi2mBjXf
-i0E3i8XRtWWpSMXxjcGKba7ObRRzMA6qdPR2XOynqbtw9Vd2Ops8jthKpQJBAJJm
-8tZxsXlqIiLhyXYdUPLq9XS5tlNYRvXFT9S0RWGb8NbyQesjEDN9dGIL4JUxurs3
-fkmf2ui4r3UtXSNqQqUCQQDjatAhBdibh5UawO5VpI87OJMzATCkY/mX3R+TnbOm
-MkdydjF022P0M4N24DiM+2nBTDp+F45LwtQLa4vmB2No
+MIIEpQIBAAKCAQEA63xPWfBAN+04sugwaU6VyQBZ0WA7iqoooSBA7r8c87CmQI5X
+pHmByXCfjD30XLD5WFXZYrJLaeEac78DDovK0w3yEupoHrj1uikCsBV/dlKafe5t
+fiz1WtCMp8lT2IzO477Hu0qufPnxbQesO1XNgz3k75aOqckcy4SZzzf1U1fnlHiX
+EgQf3DH48L98m++KJQIfG6vN+b2p3t/hPbL7kkSTWav3wqbhBRlJ+/gCXT7QUCZb
+4yas+8+r8VIKEjYWPbWeEvPDaeKbiXCyMVaam5GkxjkBVuS1izVwTutFG3B9GlIv
+pTcygK5Q0NpKhWo8ZudBhcg63SXYTDKFyxK8gQIDAQABAoIBAADaATt1B/Zr0DGt
+b0diNl50tt5v96cnuF/kyvdSD5u9/svq99wraFG/K4SJUNHo/e3Y2aFmvakTXFIg
+1bT+wmwC9+YjnN7HknPq5AyY904JPG/KJfE33mdGq8uLidcVo0XlkblWqsze5oWb
+an8Ib2bTGXnYVIm+pXEC+L9sF2IGxJP3kWQyFjX1UEp7YDhmtMVm7ONeli3/LPYF
+TqWF6ScoI0AexKVo7Jgfx+oDlUASSup90Om07YyjlbIzgiTYPzDqM9XhDQNDaMLJ
+zi3N4INohRRG0R/DQ4nqP/YWat6/q1FuRznWdOzzNIR5YrbyFRgX7rMPCjeF3cRt
+mK9xKXECgYEA+Qo7ixk0giXZj2ZkJ/OsqT2CnK1jUuJGxtyGCpXbM7hXe8bRq8AA
+BVVzLIFR5wY1LKoLYxoMSAn3B1F7y2iVgj7VlBehLTWC2mrsrPse1yRSl8TGOpJB
+wP40lfH6/L2mXI4TfnDEgfzkFdpgsHVazpz48A5nSKB+xrJX4JkDos0CgYEA8hEa
+GBvwqYum/tMWhYF0YVPXxRUySMYRZX9cW7Mfa/bG2KUyCwIJJipiBe/Zq2AsN917
+wA1TXdnwC3i63iVssPxKKkx1RNpDpNJKzot9oawjhR/OKG/24f6mQJ1W8cX7viT8
+F7IXIX4/drfuDlz4s89NmMRaKuC/mWJfYi77yIUCgYEAkvIUvDi9IOZQfyq9gk1n
+3dyriuNMLgXSGVjZxrkxxEzLYf+ojB0YZg1LjkEoIJcrHRWg7nLaOE+Y8TqFPzqQ
+rW+B+oYO1mwyr8pTqKXsRqnqCh9TkA/ouIXGZYuIu0T0OryiiALmEIU12Cco0jYM
+xMkeohb9nn8FDx0AeUgQOykCgYEArpehL4Rvd4ovf5p2owJ1E4Hqnc6k/xJFF+Td
+k5JFdpR+ZWH5DzF/sdRd8RRG9jGekwifqiyyVX3Mgimo9nMdyyWcxJdy+Z9HrMi0
+hfbcPVCwKeN/yXDAK86E0RPq0uVOpp18agbcYh7x3UnaXOe3xdEekbIFqumBqDro
+uyNSHRUCgYEAy3xDAESUEXhYGN4WRpWn58Pb0NUsbc/l9P42Z7tog7YmPLpJuY1O
+qKW3uwTzxmk65JsiBEsOL7UT7xbq15uaUINC3FRfcMQz7+TW8rUBguVRUjxLTHlx
+SlgU3Oxz1oQ/J7GL+x0MxBtTjRW9/7Adv2j1Du8QtlWgr/wOHarPjh4=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server-new-cert.pem b/mysql-test/std_data/server-new-cert.pem
new file mode 100644
index 00000000000..fb203d7c0a2
--- /dev/null
+++ b/mysql-test/std_data/server-new-cert.pem
@@ -0,0 +1,81 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 2 (0x2)
+ Signature Algorithm: sha256WithRSAEncryption
+ Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
+ Validity
+ Not Before: Jan 27 10:11:10 2019 GMT
+ Not After : Jan 23 10:11:10 2039 GMT
+ Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server-new
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ Public-Key: (2048 bit)
+ Modulus:
+ 00:d8:52:35:3e:4b:0e:fe:cc:17:1f:b8:79:5c:35:
+ d6:a0:e3:c5:11:23:5b:12:7f:c3:a4:4d:0f:35:71:
+ e1:94:87:49:11:e2:f4:b3:80:dc:33:c0:65:f4:1b:
+ 24:21:b1:c4:e5:d6:b8:1e:83:f6:3f:6b:7f:aa:2a:
+ 18:a0:49:6c:87:ee:b4:df:cc:58:19:0f:7f:06:b3:
+ 93:ce:8c:de:46:69:80:e9:ac:9e:79:05:bd:e2:c6:
+ bc:80:3f:44:7e:a8:ca:09:72:e3:e4:b0:a4:54:79:
+ 08:9c:f8:b0:ed:56:3b:21:da:dd:8b:06:12:df:fb:
+ b6:2e:0e:ca:27:c4:de:8b:55:e2:93:d6:ff:09:aa:
+ f0:a9:8e:83:be:92:fb:9d:a8:c4:b6:27:e2:63:03:
+ 3c:0d:6b:4a:05:f9:6f:1c:14:de:f3:c3:ef:60:9f:
+ b4:21:d6:74:6f:a3:a5:6a:c0:b0:4e:7b:37:95:0d:
+ f6:43:06:95:cf:c0:93:13:d0:81:83:5a:aa:bf:81:
+ 98:ca:4f:70:46:79:42:84:12:32:74:e4:7f:4e:84:
+ 13:83:54:15:49:45:1d:d1:40:bf:e1:5f:11:de:94:
+ d0:4a:5e:8b:a2:26:03:61:55:41:45:86:45:00:d8:
+ ea:34:f7:1f:21:64:f7:85:6b:a6:47:3e:f9:81:e4:
+ a6:6b
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
+ X509v3 Subject Key Identifier:
+ 20:CD:11:1F:57:C3:33:FC:17:16:2D:32:48:16:47:B8:0F:42:2D:53
+ X509v3 Authority Key Identifier:
+ keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
+
+ Signature Algorithm: sha256WithRSAEncryption
+ b3:2d:b3:4f:a0:9a:48:ec:a9:06:97:8d:b4:af:93:13:a8:58:
+ 8f:4e:43:f1:4f:7b:13:59:d5:c6:dc:f0:f7:b8:f2:e8:47:28:
+ e0:94:2d:cb:d1:de:58:a8:31:e7:41:f1:c3:9b:6e:21:c4:3e:
+ 2c:56:f7:8b:36:1e:b5:c9:40:aa:15:8b:32:33:29:e6:8e:3c:
+ a2:db:ad:02:c2:cb:46:fa:4d:2b:43:51:97:00:bc:ad:83:b1:
+ e9:69:7b:83:31:a8:ce:18:c9:a2:d3:a2:17:f5:f4:b2:3c:59:
+ 36:2d:6d:ee:21:bd:fa:24:cd:c5:96:26:41:66:6b:8a:ba:ff:
+ 25:60:44:64:43:f5:4d:df:61:4d:a1:7f:16:27:63:a4:9c:61:
+ fc:d1:9e:9f:aa:e0:dd:dd:4f:64:2e:89:03:cd:a7:f4:b8:d0:
+ d7:a5:72:46:fa:33:13:84:0f:a2:e1:fa:9a:a1:e4:6f:f4:30:
+ fb:30:24:df:ac:d0:52:94:8d:92:3b:26:fe:1d:a0:30:da:23:
+ 05:3f:ef:f1:79:a8:b7:f9:73:42:5f:da:9d:f8:a8:28:b8:4f:
+ e3:6e:50:81:46:e1:b4:a1:7e:ec:78:10:8c:be:2e:bc:21:6d:
+ 1a:78:df:3f:f9:a8:8e:67:0e:b6:cb:1e:fd:ed:d3:28:68:59:
+ e3:d4:59:a8
+-----BEGIN CERTIFICATE-----
+MIIDpjCCAo6gAwIBAgIBAjANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTEwWhcNMzkwMTIz
+MTAxMTEwWjBaMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMRMwEQYDVQQDDApzZXJ2ZXIt
+bmV3MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2FI1PksO/swXH7h5
+XDXWoOPFESNbEn/DpE0PNXHhlIdJEeL0s4DcM8Bl9BskIbHE5da4HoP2P2t/qioY
+oElsh+6038xYGQ9/BrOTzozeRmmA6ayeeQW94sa8gD9EfqjKCXLj5LCkVHkInPiw
+7VY7IdrdiwYS3/u2Lg7KJ8Tei1Xik9b/CarwqY6DvpL7najEtifiYwM8DWtKBflv
+HBTe88PvYJ+0IdZ0b6OlasCwTns3lQ32QwaVz8CTE9CBg1qqv4GYyk9wRnlChBIy
+dOR/ToQTg1QVSUUd0UC/4V8R3pTQSl6LoiYDYVVBRYZFANjqNPcfIWT3hWumRz75
+geSmawIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NM
+IEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUIM0RH1fDM/wXFi0ySBZH
+uA9CLVMwHwYDVR0jBBgwFoAUynGZifByq3Vmu2VqAwRypXuVppMwDQYJKoZIhvcN
+AQELBQADggEBALMts0+gmkjsqQaXjbSvkxOoWI9OQ/FPexNZ1cbc8Pe48uhHKOCU
+LcvR3lioMedB8cObbiHEPixW94s2HrXJQKoVizIzKeaOPKLbrQLCy0b6TStDUZcA
+vK2Dselpe4MxqM4YyaLTohf19LI8WTYtbe4hvfokzcWWJkFma4q6/yVgRGRD9U3f
+YU2hfxYnY6ScYfzRnp+q4N3dT2QuiQPNp/S40Nelckb6MxOED6Lh+pqh5G/0MPsw
+JN+s0FKUjZI7Jv4doDDaIwU/7/F5qLf5c0Jf2p34qCi4T+NuUIFG4bShfux4EIy+
+LrwhbRp43z/5qI5nDrbLHv3t0yhoWePUWag=
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-new-key.pem b/mysql-test/std_data/server-new-key.pem
new file mode 100644
index 00000000000..40f6138157d
--- /dev/null
+++ b/mysql-test/std_data/server-new-key.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEA2FI1PksO/swXH7h5XDXWoOPFESNbEn/DpE0PNXHhlIdJEeL0
+s4DcM8Bl9BskIbHE5da4HoP2P2t/qioYoElsh+6038xYGQ9/BrOTzozeRmmA6aye
+eQW94sa8gD9EfqjKCXLj5LCkVHkInPiw7VY7IdrdiwYS3/u2Lg7KJ8Tei1Xik9b/
+CarwqY6DvpL7najEtifiYwM8DWtKBflvHBTe88PvYJ+0IdZ0b6OlasCwTns3lQ32
+QwaVz8CTE9CBg1qqv4GYyk9wRnlChBIydOR/ToQTg1QVSUUd0UC/4V8R3pTQSl6L
+oiYDYVVBRYZFANjqNPcfIWT3hWumRz75geSmawIDAQABAoIBAQDMUdGidejC92g7
++NUAKIYBz0Ear+dccLsMnBBqbZcg4Cs/LrvsNCFI7EggKeaVwL/2Szn68K+NNW8O
+/dXmx5MwTWIgJHVtrjpPzRwlst5baVlu3TGNo8O3x/jRtXBvpeO2ywK/xaxhcTSW
+dzs94P3XO0+X+XOohaqMlEGTEJsWxJoSnZGL/QJAqccUEZMQeAkHOGVIDAlynHPi
+Y1zE+7QpeoNDKPPUS+niNouloRWJqhps11UhNHMHelXLWkiO78HNfQuMU8RUjzVu
+niRQ5cxn3aj2WrFqTtg8UJH0QEEnvpZnk8ptZoMI8lFALDTjCVTIrRS2b5TT2YOz
+UB+G0CGhAoGBAPjNUMBMz7uH+a8rIwS3zGEgHmpQY1vBw1uxH/vDdSgY28BXKEMw
+4ofGjyT1tXi6sdUFzWHybwCPoaaTb46Vo3G9lZoTX6k9Sp5HatGqa7gJwcU1UjUQ
+KLkokmwFi9nupCjOze4cP+uykQME6RBIBDGSeG4kn2ZPhYsXbxI15tz7AoGBAN6U
+VOgAu2/EgB/TD7k4Be3uKVgtSSAAmDe4DdT2WdeUYy/YQ5avpvayd1kjlMeybMia
+PM27VJr8pXnCcfabvwC9vP5KjX7Z45NeTqgUsY4nGASEQpECVVWjOyL3yyPSUDyG
+s4yMsrJ5N4cAFodZ2uvZtdez/Msdrd0Icyqqp0FRAoGBALGyOiVN9uPSRuLz5Sve
+dcs8nFyEE6KaLgQT6mru+4Lq1jB2T1xF0tT0XJIiJz0V4iLp5Pk6pEr7SpHlJTzp
+5PU8WVfU1HLUQrHvAfzDQfIMjedioNcjNmKf9ovOHkdFaNt4cJ3KcWDOhUFpxWeK
+d+xL11WbNHlm/FMOJpcUBlH3AoGBANwto6g1QTWZDp1srjss/kCVvfRqJ9IuhGVp
+/tTSNaGaOlwT9RhU/jc/5+wX1I+PIyl12fwx+cmvbwn5nb6z5sgW6aQrn7kCVats
+OSbwAYx7g7jEFQ1ZX4ztggxfT2ZKH/Ef1vGMJSGD47f6EE8oRfXVUZrlg4Zx/5GN
+UE++rOFhAoGAdjQrHtlHx7woHOwwgnfF6TlSp99TZWLvn+ethpIA8qET+xGAOi8H
+gVWSA/Yq9fjc8W2niJG05EB8FbwSaAA6HH13E3B5+KWYGwgC1osSkF/JDKInTilC
+/fvUW6clvoXQoJPymwtFpSK5NygJfASujZaAetSQFiG2oAdgQW1rjlY=
+-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem
index df27c77e8e0..a2878516020 100644
--- a/mysql-test/std_data/server8k-cert.pem
+++ b/mysql-test/std_data/server8k-cert.pem
@@ -1,86 +1,86 @@
Certificate:
Data:
Version: 3 (0x2)
- Serial Number: 2 (0x2)
+ Serial Number: 3 (0x3)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:33 2017 GMT
- Not After : Apr 20 20:52:33 2037 GMT
+ Not Before: Jan 27 10:11:15 2019 GMT
+ Not After : Jan 22 10:11:15 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server8k
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (8192 bit)
Modulus:
- 00:b3:a7:81:cf:a3:9b:3c:57:2a:8e:de:13:08:a6:
- 15:6a:68:08:ce:a1:a0:ef:fc:32:95:5a:9a:b5:cc:
- 84:bb:a3:15:a0:fc:29:bb:71:0e:f3:40:20:97:35:
- 92:92:89:36:6a:5f:be:a5:24:5a:c8:0e:f7:53:a8:
- e0:74:05:90:38:21:a5:25:72:2b:56:70:74:aa:d6:
- 30:25:e0:95:dd:3d:4a:48:4b:25:a7:a8:c4:eb:e5:
- d6:10:4f:95:42:91:b0:cb:68:2f:bf:96:0f:0a:9b:
- 2b:01:0d:03:ae:3f:b7:7e:f6:1e:c1:14:42:04:7f:
- 09:21:e8:3e:87:c0:b3:d7:dd:4f:7e:95:b6:83:33:
- 8f:cc:f4:bb:11:8e:66:5f:b4:32:22:8b:8e:34:93:
- 82:0f:02:d1:6f:85:b2:a7:7e:36:0c:f3:0d:91:46:
- f9:a5:91:dc:60:4a:0d:eb:e5:37:e3:76:d8:13:bb:
- 55:33:23:4c:b3:90:df:6a:b6:80:3d:f6:bd:9d:bd:
- ef:d3:8d:7a:9a:61:ac:02:3d:10:b5:c2:53:d2:7e:
- ee:1c:90:a5:b0:e8:db:71:8f:d3:53:e4:80:b0:b6:
- cc:b0:f2:eb:46:c3:d9:3c:48:01:1d:3a:5c:d0:f2:
- 17:9c:9a:8e:fc:2a:36:e7:1c:59:41:66:ad:e1:d3:
- 82:d8:95:ee:ae:dc:ab:72:94:cb:0b:8a:df:ef:70:
- f7:f9:e2:77:76:64:67:2d:02:dc:1a:db:02:e9:5e:
- 63:3f:3e:07:e9:65:e4:02:78:62:55:e1:52:18:5a:
- a3:9c:56:dd:cd:d3:f7:f2:55:45:62:20:ce:fd:41:
- 93:b9:c2:20:90:23:a4:41:4f:30:5c:5e:a0:97:6f:
- a4:1f:87:6a:97:87:70:f9:d5:56:b7:6a:cc:f1:28:
- d2:26:34:57:65:9c:2d:41:43:8b:6c:bd:15:6f:ec:
- ce:3e:9f:4d:2f:a6:21:d8:f7:4d:d1:63:4f:f0:9e:
- 04:c3:82:33:58:34:20:4b:81:0d:42:0d:44:62:48:
- 1b:4c:cf:e0:69:e4:c8:f8:9c:98:1f:74:37:3a:3f:
- 23:40:3a:88:80:c2:9c:9b:ba:6a:b9:2c:3a:67:a6:
- b6:5c:83:fd:93:3f:6e:53:19:48:e3:3d:fa:f5:8e:
- 03:40:8f:e6:af:c5:de:aa:f8:70:77:36:2b:6e:3a:
- df:bc:d7:f6:c7:4f:02:7f:a1:ad:2f:3c:e9:08:45:
- 2f:57:1a:f1:5b:9c:27:07:3a:44:43:3e:05:b1:4a:
- 1b:42:a4:90:ab:ce:4b:f7:c1:9b:d7:dd:6f:05:11:
- f9:e8:a3:a1:99:6c:2e:27:3d:b1:54:6f:eb:b2:e8:
- f8:e6:12:6f:8a:69:05:cc:c6:f6:c4:2d:b0:06:b6:
- 21:50:28:50:dc:8c:b2:8c:65:ce:d9:2b:51:b8:62:
- 56:70:b4:46:4d:e4:4c:a1:86:31:3d:e3:07:7f:73:
- e3:09:6e:ee:a7:29:2a:80:23:8a:b6:0c:22:9e:43:
- 1c:a9:8c:47:2c:02:6d:13:ef:88:a7:d7:d1:60:d9:
- 6b:28:80:97:8a:b7:ff:62:6b:28:54:0d:ab:63:3a:
- ac:57:9e:2f:95:2b:f4:a0:3d:a1:60:a0:57:1a:09:
- 23:ee:fc:4d:9b:45:83:f2:0a:1f:b3:77:0e:98:20:
- b3:16:fc:97:03:30:fc:ab:3e:7e:fc:3e:76:64:cb:
- 4b:4d:c9:6c:8f:aa:70:ec:03:c5:81:31:43:11:9a:
- fc:2d:ba:25:94:0b:73:7e:c1:39:01:ca:68:70:1a:
- ef:a4:ba:dc:13:d6:37:17:09:0d:ca:aa:21:94:bb:
- 3e:43:fd:8c:80:e6:58:fd:75:23:5a:ca:1f:0b:2e:
- 35:c2:cd:77:0c:73:b3:2f:9a:e4:03:68:58:c8:3f:
- f3:76:8d:05:53:d2:34:db:09:af:70:ed:67:0b:ff:
- 2f:64:35:2d:71:22:7a:f2:f2:2b:7d:6d:be:80:bd:
- 18:38:37:01:67:a4:5f:48:29:52:78:9f:b5:b8:80:
- 70:ca:10:6a:e1:27:3b:c0:61:4e:96:f8:e8:0f:42:
- b1:fa:bc:05:ef:31:91:38:ab:0f:a7:ef:2c:86:c1:
- ab:85:36:7c:10:9d:c7:0a:6b:e6:2b:11:dd:fa:45:
- e7:d2:c3:3a:c1:cd:60:27:68:26:d7:87:49:5f:e3:
- 7f:26:20:1f:99:a8:f9:00:a6:0d:d5:13:81:6e:fc:
- 27:8a:03:58:6b:0e:3a:c7:20:a1:5c:24:d1:08:a6:
- 5a:1e:e7:81:3d:21:05:2e:4b:5d:18:14:f1:4f:ab:
- 5c:e5:81:da:c1:2c:f6:12:ff:25:09:97:1e:9d:51:
- 6d:1f:63:2e:9c:ed:7d:86:45:b0:35:73:f6:9f:82:
- 65:bc:7f:46:88:e1:a1:60:a1:37:50:26:9c:d7:76:
- f3:dc:94:89:6d:d7:be:a6:17:a1:2b:71:14:37:17:
- 5f:ed:5a:39:99:fc:69:af:bb:63:55:c6:60:7b:64:
- d8:bb:b7:4a:9f:b9:aa:89:4b:30:1f:9c:ef:23:7a:
- af:7e:31:dd:fb:dd:0a:d5:04:0a:8c:57:6f:64:80:
- eb:f3:ee:6c:33:d2:72:c2:24:68:a2:4e:99:88:1c:
- f7:3b:5d:10:cc:4e:ea:a5:cb:00:40:8a:a9:63:2e:
- 18:92:eb:b1:28:05:fe:19:ea:7b:32:fb:63:56:2c:
- 0b:20:01:92:a3
+ 00:b9:f5:78:46:53:e0:3c:07:bf:97:fb:ab:be:97:
+ 71:d5:89:44:bf:db:0e:58:be:96:42:06:9e:dc:08:
+ f7:51:d6:27:7f:65:2d:c7:1e:f7:4c:5b:3f:e5:7a:
+ f8:fd:df:73:42:92:0f:37:5e:28:ae:51:14:13:be:
+ b3:55:d4:db:9a:f6:a9:88:84:02:79:fb:f9:c4:67:
+ f9:96:99:68:80:58:4a:22:c4:a1:90:c0:33:58:c8:
+ 96:d1:a4:7f:7f:9e:84:a6:f3:03:a3:01:93:cb:1d:
+ ab:f1:f5:17:28:03:34:78:6d:47:46:07:ab:f8:ea:
+ ff:02:8a:f8:20:92:a2:ce:29:6a:66:d0:39:87:2f:
+ 62:9f:43:d9:a3:0b:74:89:ab:f7:d9:39:7d:6c:de:
+ 05:4e:58:4d:35:15:d4:18:2d:ea:70:df:60:fc:50:
+ f8:0d:b5:8e:c0:c6:03:74:3b:8d:53:d6:87:a2:9a:
+ b6:0a:5a:80:a5:cc:df:30:a7:95:30:ad:50:62:e1:
+ 01:3a:8e:ee:e1:41:b4:99:ee:ce:8b:ca:55:24:3e:
+ 7c:00:79:08:f4:46:42:e0:63:93:a3:d0:5a:39:fc:
+ 7e:f4:96:21:24:9a:f7:29:0d:22:85:b6:c5:c9:9c:
+ 92:71:68:5b:03:de:fb:bc:75:f8:0f:24:ea:01:92:
+ b7:37:e0:78:a0:64:37:69:90:8a:7c:99:c7:45:f9:
+ 90:a2:50:59:e1:1c:02:ad:b2:2e:c7:3b:26:ec:76:
+ 6d:10:c9:f9:2f:dc:12:87:41:72:08:ec:0a:1c:ae:
+ 9b:6f:de:57:a4:aa:b9:ee:83:a4:14:c4:e5:54:66:
+ 32:5d:21:2a:a3:6d:2d:8d:f5:8e:08:a2:a3:0d:07:
+ 83:4b:0a:27:0b:9c:7f:73:78:f8:d9:9c:1e:d4:33:
+ 2b:a7:35:b4:77:5e:12:d6:a6:a4:d2:d0:af:30:b6:
+ d5:1f:05:9b:1e:e6:ae:c8:a5:8c:b6:b7:dc:c3:0b:
+ 1a:85:5a:d5:bd:be:65:c8:e6:a5:f0:37:38:16:d2:
+ b0:ca:ff:2e:a1:f2:7f:8e:28:c5:9c:d4:de:be:1f:
+ 23:43:51:85:f9:e5:fb:a8:61:61:96:50:34:ad:75:
+ 34:fa:46:e9:2a:66:1a:43:9c:e4:e5:79:26:b7:0b:
+ 5d:d1:1d:81:c6:52:17:d7:95:13:9e:65:64:9b:2d:
+ 0d:2b:7a:04:28:aa:02:df:81:0c:f3:83:3d:76:ad:
+ 40:e6:f8:c0:b2:f3:0a:b2:cc:e8:f2:c8:ac:21:c4:
+ 90:7d:4c:b6:50:d8:b7:0a:15:12:5f:a5:e0:c5:68:
+ 8f:ed:4d:f4:d9:b5:72:df:63:c9:d6:14:fe:d8:fc:
+ db:31:72:1e:15:d5:e8:ac:d9:a7:d2:0a:bc:a7:a6:
+ 51:5f:0d:0f:23:20:2d:34:ba:44:66:f6:81:e3:aa:
+ fe:38:11:61:ec:03:3f:64:6f:93:f5:2d:b0:be:7d:
+ 6f:49:73:c6:23:67:7b:46:da:62:67:10:e4:e6:a1:
+ e4:1b:50:0f:ff:50:51:0a:dc:ee:1b:e3:ed:20:30:
+ 3a:c1:37:17:24:96:fa:fe:2e:d0:75:b3:9b:c1:ae:
+ 15:ac:ba:fe:b4:d5:33:ff:33:86:f3:5e:24:f7:45:
+ 8d:ad:b0:47:6a:ef:9c:0e:f7:07:0e:71:a0:e7:75:
+ 4a:42:59:02:b7:11:86:d6:65:77:06:3a:f5:6f:99:
+ 3b:9b:52:cf:e6:30:59:e3:28:19:8e:c2:5f:e1:f7:
+ 28:74:ff:c2:d1:35:91:96:ed:52:14:4a:3c:91:19:
+ 50:7b:3e:04:65:f8:3e:d9:6c:29:cf:74:d8:0f:df:
+ e4:cd:94:73:81:ef:19:9e:4b:0c:3e:2e:24:fd:a9:
+ c6:73:b5:7c:ed:d1:0e:72:ac:c9:fe:5e:a6:2d:d7:
+ 7f:ca:c5:75:18:cb:3e:27:62:20:cf:10:c1:7f:d3:
+ 6f:a9:d4:78:98:3b:f6:0c:e0:5f:54:b3:0b:0a:36:
+ d7:59:34:c3:70:5c:59:25:cf:54:e0:7f:ec:a3:3b:
+ c4:a1:6f:be:1e:be:e1:36:c6:d3:26:bd:86:ae:0e:
+ 73:26:89:3c:7f:72:a1:2d:00:66:b1:e2:e0:74:72:
+ 86:12:c2:6b:e4:e7:99:70:bb:98:81:c3:44:65:c5:
+ 76:21:62:f1:af:31:aa:73:be:fb:b0:86:a6:5b:e2:
+ 51:78:e6:6a:1b:58:3f:4a:34:e6:99:88:e4:1c:b1:
+ 80:94:f2:31:a0:b0:27:81:b1:18:98:6f:53:2e:74:
+ a0:c3:2d:e7:f6:92:27:80:40:a4:f3:3a:e2:ad:84:
+ 64:82:ed:80:3f:e0:54:e8:3d:ec:75:25:21:2a:2f:
+ 4f:08:61:be:b6:e0:fb:bd:ec:7e:3b:17:d2:a4:bb:
+ b8:f8:3f:9a:2e:12:eb:b2:00:45:51:3a:99:53:6e:
+ b5:06:5e:8b:8f:0a:b5:61:2c:12:10:60:4d:2c:de:
+ 6e:e8:80:f8:99:b2:8b:36:61:33:88:08:60:4f:30:
+ ff:61:d2:cc:02:75:5d:d7:8d:06:e0:bd:e3:e0:35:
+ f7:ba:f8:a6:e4:14:79:e4:62:4d:bf:ea:81:fe:1e:
+ 01:24:69:da:89:1a:c1:11:3c:50:f1:a3:b3:27:df:
+ cc:16:3a:03:97:88:a4:92:63:a6:8e:c9:18:f5:02:
+ 16:a7:b2:a5:3d:f7:12:00:e4:e1:55:96:16:84:6e:
+ 03:70:3d:ce:4b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -88,61 +88,61 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 43:3B:26:15:A5:60:62:3F:07:2A:8C:8C:DA:F8:74:BE:36:B2:33:E4
+ 74:34:B9:9A:5C:1A:27:83:BA:0D:05:F9:5B:5B:A6:F6:BB:1A:8C:E8
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:CA:71:99:89:F0:72:AB:75:66:BB:65:6A:03:04:72:A5:7B:95:A6:93
Signature Algorithm: sha256WithRSAEncryption
- 5c:c7:4e:56:eb:21:1b:f3:5d:c4:56:fa:bf:6d:e1:0d:fa:cc:
- b0:7c:13:58:b9:d4:47:b3:de:b4:ae:f2:45:02:88:65:43:89:
- cf:ea:9c:d0:ea:45:42:35:d2:ec:bc:b4:73:03:db:85:7b:c7:
- f0:68:d7:dc:2b:70:71:63:ed:33:68:9f:29:ff:67:0a:69:3b:
- c4:65:7c:25:00:cf:7f:ee:aa:fe:44:19:70:f2:74:db:da:9f:
- 52:92:1a:03:e6:0a:49:85:2e:2a:02:c1:81:d4:6d:cf:98:d1:
- e9:6a:2f:bb:fa:a6:d5:4b:55:38:c2:aa:8c:f5:d3:f9:e6:74:
- db:00:d6:29:f9:d1:9c:7a:0e:98:c5:e5:8c:16:49:d8:cf:ee:
- a0:cb:c2:2c:31:cf:62:2c:b1:7f:6d:60:b0:ce:d5:07:45:e8:
- 44:17:7c:c4:12:fb:00:57:24:57:e8:17:78:3b:1e:0d:91:aa:
- 67:98:d0:e5:9a:86:4b:88:4a:2f:55:5d:2e:13:ec:f5:4a:7d:
- e7:13:a7:57:03:41:2f:f6:6c:08:8e:58:ef:b0:7a:79:32:e3:
- bb:4b:eb:4d:42:cd:42:96:2d:67:f6:4c:c1:f6:62:fb:c0:3e:
- 09:69:8f:36:7e:fa:c8:cd:ff:72:3e:df:92:f7:8f:44:cf:77:
- fe:6e:74:de
+ e6:e4:75:22:6c:5c:ea:f3:3c:85:1e:3c:62:a4:9b:bc:52:49:
+ 2a:dd:dd:7e:94:c9:1b:c9:7e:4f:f2:82:ce:68:a2:17:29:b7:
+ 73:0b:39:33:ca:86:c4:51:ad:d9:18:e7:c2:42:b8:c3:a9:4c:
+ 8f:54:24:79:f2:27:9e:5b:aa:e5:bc:36:eb:11:b5:91:4b:7b:
+ 79:b9:41:b0:d9:72:53:fb:ad:67:7e:7a:7e:0d:06:9e:45:7e:
+ f6:5f:5b:c4:77:1d:d1:e5:d7:7f:8e:f6:64:2a:7e:14:87:f4:
+ b4:a4:13:50:47:f7:49:b2:ad:36:c0:27:15:eb:c0:91:f0:e0:
+ 77:bc:93:f3:db:01:69:10:c0:9c:e1:5b:03:9b:1d:ac:3d:0c:
+ cc:65:24:93:d6:8d:dc:aa:d7:d5:74:7d:0b:2a:6c:ec:c1:ad:
+ 2d:83:56:aa:28:94:9e:e2:54:98:1c:28:bd:45:63:e5:6a:00:
+ 20:ab:41:83:31:05:8d:38:ea:bb:35:ad:3b:28:46:44:47:3d:
+ f6:88:2e:ac:46:73:8e:13:0d:8d:5c:44:2b:0a:e3:bb:27:e3:
+ ce:5b:f6:3c:fc:e4:86:95:0b:46:87:f7:89:ab:36:7b:3e:78:
+ 1d:be:04:aa:fa:f0:2c:fd:a7:15:ea:1e:35:bf:3c:33:3c:b7:
+ b8:4f:1b:db
-----BEGIN CERTIFICATE-----
-MIIGpDCCBYygAwIBAgIBAjANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIGpDCCBYygAwIBAgIBAzANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
-MjA1MjMzWjBYMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTE1WhcNMzkwMTIy
+MTAxMTE1WjBYMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMREwDwYDVQQDDAhzZXJ2ZXI4
-azCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBALOngc+jmzxXKo7eEwim
-FWpoCM6hoO/8MpVamrXMhLujFaD8KbtxDvNAIJc1kpKJNmpfvqUkWsgO91Oo4HQF
-kDghpSVyK1ZwdKrWMCXgld09SkhLJaeoxOvl1hBPlUKRsMtoL7+WDwqbKwENA64/
-t372HsEUQgR/CSHoPofAs9fdT36VtoMzj8z0uxGOZl+0MiKLjjSTgg8C0W+Fsqd+
-NgzzDZFG+aWR3GBKDevlN+N22BO7VTMjTLOQ32q2gD32vZ2979ONepphrAI9ELXC
-U9J+7hyQpbDo23GP01PkgLC2zLDy60bD2TxIAR06XNDyF5yajvwqNuccWUFmreHT
-gtiV7q7cq3KUywuK3+9w9/nid3ZkZy0C3BrbAuleYz8+B+ll5AJ4YlXhUhhao5xW
-3c3T9/JVRWIgzv1Bk7nCIJAjpEFPMFxeoJdvpB+HapeHcPnVVrdqzPEo0iY0V2Wc
-LUFDi2y9FW/szj6fTS+mIdj3TdFjT/CeBMOCM1g0IEuBDUINRGJIG0zP4GnkyPic
-mB90Nzo/I0A6iIDCnJu6arksOmemtlyD/ZM/blMZSOM9+vWOA0CP5q/F3qr4cHc2
-K24637zX9sdPAn+hrS886QhFL1ca8VucJwc6REM+BbFKG0KkkKvOS/fBm9fdbwUR
-+eijoZlsLic9sVRv67Lo+OYSb4ppBczG9sQtsAa2IVAoUNyMsoxlztkrUbhiVnC0
-Rk3kTKGGMT3jB39z4wlu7qcpKoAjirYMIp5DHKmMRywCbRPviKfX0WDZayiAl4q3
-/2JrKFQNq2M6rFeeL5Ur9KA9oWCgVxoJI+78TZtFg/IKH7N3Dpggsxb8lwMw/Ks+
-fvw+dmTLS03JbI+qcOwDxYExQxGa/C26JZQLc37BOQHKaHAa76S63BPWNxcJDcqq
-IZS7PkP9jIDmWP11I1rKHwsuNcLNdwxzsy+a5ANoWMg/83aNBVPSNNsJr3DtZwv/
-L2Q1LXEievLyK31tvoC9GDg3AWekX0gpUniftbiAcMoQauEnO8BhTpb46A9Csfq8
-Be8xkTirD6fvLIbBq4U2fBCdxwpr5isR3fpF59LDOsHNYCdoJteHSV/jfyYgH5mo
-+QCmDdUTgW78J4oDWGsOOscgoVwk0QimWh7ngT0hBS5LXRgU8U+rXOWB2sEs9hL/
-JQmXHp1RbR9jLpztfYZFsDVz9p+CZbx/RojhoWChN1AmnNd289yUiW3XvqYXoStx
-FDcXX+1aOZn8aa+7Y1XGYHtk2Lu3Sp+5qolLMB+c7yN6r34x3fvdCtUECoxXb2SA
-6/PubDPScsIkaKJOmYgc9ztdEMxO6qXLAECKqWMuGJLrsSgF/hnqezL7Y1YsCyAB
-kqMCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH
-ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFEM7JhWlYGI/ByqMjNr4dL42
-sjPkMB8GA1UdIwQYMBaAFBzHK6obsbsumvQPsYZgVzjCQQUSMA0GCSqGSIb3DQEB
-CwUAA4IBAQBcx05W6yEb813EVvq/beEN+sywfBNYudRHs960rvJFAohlQ4nP6pzQ
-6kVCNdLsvLRzA9uFe8fwaNfcK3BxY+0zaJ8p/2cKaTvEZXwlAM9/7qr+RBlw8nTb
-2p9SkhoD5gpJhS4qAsGB1G3PmNHpai+7+qbVS1U4wqqM9dP55nTbANYp+dGceg6Y
-xeWMFknYz+6gy8IsMc9iLLF/bWCwztUHRehEF3zEEvsAVyRX6Bd4Ox4NkapnmNDl
-moZLiEovVV0uE+z1Sn3nE6dXA0Ev9mwIjljvsHp5MuO7S+tNQs1Cli1n9kzB9mL7
-wD4JaY82fvrIzf9yPt+S949Ez3f+bnTe
+azCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBALn1eEZT4DwHv5f7q76X
+cdWJRL/bDli+lkIGntwI91HWJ39lLcce90xbP+V6+P3fc0KSDzdeKK5RFBO+s1XU
+25r2qYiEAnn7+cRn+ZaZaIBYSiLEoZDAM1jIltGkf3+ehKbzA6MBk8sdq/H1FygD
+NHhtR0YHq/jq/wKK+CCSos4pambQOYcvYp9D2aMLdImr99k5fWzeBU5YTTUV1Bgt
+6nDfYPxQ+A21jsDGA3Q7jVPWh6KatgpagKXM3zCnlTCtUGLhATqO7uFBtJnuzovK
+VSQ+fAB5CPRGQuBjk6PQWjn8fvSWISSa9ykNIoW2xcmcknFoWwPe+7x1+A8k6gGS
+tzfgeKBkN2mQinyZx0X5kKJQWeEcAq2yLsc7Jux2bRDJ+S/cEodBcgjsChyum2/e
+V6Sque6DpBTE5VRmMl0hKqNtLY31jgiiow0Hg0sKJwucf3N4+NmcHtQzK6c1tHde
+EtampNLQrzC21R8Fmx7mrsiljLa33MMLGoVa1b2+ZcjmpfA3OBbSsMr/LqHyf44o
+xZzU3r4fI0NRhfnl+6hhYZZQNK11NPpG6SpmGkOc5OV5JrcLXdEdgcZSF9eVE55l
+ZJstDSt6BCiqAt+BDPODPXatQOb4wLLzCrLM6PLIrCHEkH1MtlDYtwoVEl+l4MVo
+j+1N9Nm1ct9jydYU/tj82zFyHhXV6KzZp9IKvKemUV8NDyMgLTS6RGb2geOq/jgR
+YewDP2Rvk/UtsL59b0lzxiNne0baYmcQ5Oah5BtQD/9QUQrc7hvj7SAwOsE3FySW
++v4u0HWzm8GuFay6/rTVM/8zhvNeJPdFja2wR2rvnA73Bw5xoOd1SkJZArcRhtZl
+dwY69W+ZO5tSz+YwWeMoGY7CX+H3KHT/wtE1kZbtUhRKPJEZUHs+BGX4PtlsKc90
+2A/f5M2Uc4HvGZ5LDD4uJP2pxnO1fO3RDnKsyf5epi3Xf8rFdRjLPidiIM8QwX/T
+b6nUeJg79gzgX1SzCwo211k0w3BcWSXPVOB/7KM7xKFvvh6+4TbG0ya9hq4OcyaJ
+PH9yoS0AZrHi4HRyhhLCa+TnmXC7mIHDRGXFdiFi8a8xqnO++7CGplviUXjmahtY
+P0o05pmI5ByxgJTyMaCwJ4GxGJhvUy50oMMt5/aSJ4BApPM64q2EZILtgD/gVOg9
+7HUlISovTwhhvrbg+73sfjsX0qS7uPg/mi4S67IARVE6mVNutQZei48KtWEsEhBg
+TSzebuiA+JmyizZhM4gIYE8w/2HSzAJ1XdeNBuC94+A197r4puQUeeRiTb/qgf4e
+ASRp2okawRE8UPGjsyffzBY6A5eIpJJjpo7JGPUCFqeypT33EgDk4VWWFoRuA3A9
+zksCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH
+ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFHQ0uZpcGieDug0F+Vtbpva7
+GozoMB8GA1UdIwQYMBaAFMpxmYnwcqt1ZrtlagMEcqV7laaTMA0GCSqGSIb3DQEB
+CwUAA4IBAQDm5HUibFzq8zyFHjxipJu8Ukkq3d1+lMkbyX5P8oLOaKIXKbdzCzkz
+yobEUa3ZGOfCQrjDqUyPVCR58ieeW6rlvDbrEbWRS3t5uUGw2XJT+61nfnp+DQae
+RX72X1vEdx3R5dd/jvZkKn4Uh/S0pBNQR/dJsq02wCcV68CR8OB3vJPz2wFpEMCc
+4VsDmx2sPQzMZSST1o3cqtfVdH0LKmzswa0tg1aqKJSe4lSYHCi9RWPlagAgq0GD
+MQWNOOq7Na07KEZERz32iC6sRnOOEw2NXEQrCuO7J+POW/Y8/OSGlQtGh/eJqzZ7
+PngdvgSq+vAs/acV6h41vzwzPLe4Txvb
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem
index a383b359275..2dba202dfa0 100644
--- a/mysql-test/std_data/server8k-key.pem
+++ b/mysql-test/std_data/server8k-key.pem
@@ -1,99 +1,99 @@
-----BEGIN RSA PRIVATE KEY-----
-MIISKAIBAAKCBAEAs6eBz6ObPFcqjt4TCKYVamgIzqGg7/wylVqatcyEu6MVoPwp
-u3EO80AglzWSkok2al++pSRayA73U6jgdAWQOCGlJXIrVnB0qtYwJeCV3T1KSEsl
-p6jE6+XWEE+VQpGwy2gvv5YPCpsrAQ0Drj+3fvYewRRCBH8JIeg+h8Cz191PfpW2
-gzOPzPS7EY5mX7QyIouONJOCDwLRb4Wyp342DPMNkUb5pZHcYEoN6+U343bYE7tV
-MyNMs5DfaraAPfa9nb3v0416mmGsAj0QtcJT0n7uHJClsOjbcY/TU+SAsLbMsPLr
-RsPZPEgBHTpc0PIXnJqO/Co25xxZQWat4dOC2JXurtyrcpTLC4rf73D3+eJ3dmRn
-LQLcGtsC6V5jPz4H6WXkAnhiVeFSGFqjnFbdzdP38lVFYiDO/UGTucIgkCOkQU8w
-XF6gl2+kH4dql4dw+dVWt2rM8SjSJjRXZZwtQUOLbL0Vb+zOPp9NL6Yh2PdN0WNP
-8J4Ew4IzWDQgS4ENQg1EYkgbTM/gaeTI+JyYH3Q3Oj8jQDqIgMKcm7pquSw6Z6a2
-XIP9kz9uUxlI4z369Y4DQI/mr8XeqvhwdzYrbjrfvNf2x08Cf6GtLzzpCEUvVxrx
-W5wnBzpEQz4FsUobQqSQq85L98Gb191vBRH56KOhmWwuJz2xVG/rsuj45hJvimkF
-zMb2xC2wBrYhUChQ3IyyjGXO2StRuGJWcLRGTeRMoYYxPeMHf3PjCW7upykqgCOK
-tgwinkMcqYxHLAJtE++Ip9fRYNlrKICXirf/YmsoVA2rYzqsV54vlSv0oD2hYKBX
-Ggkj7vxNm0WD8gofs3cOmCCzFvyXAzD8qz5+/D52ZMtLTclsj6pw7APFgTFDEZr8
-LbollAtzfsE5AcpocBrvpLrcE9Y3FwkNyqohlLs+Q/2MgOZY/XUjWsofCy41ws13
-DHOzL5rkA2hYyD/zdo0FU9I02wmvcO1nC/8vZDUtcSJ68vIrfW2+gL0YODcBZ6Rf
-SClSeJ+1uIBwyhBq4Sc7wGFOlvjoD0Kx+rwF7zGROKsPp+8shsGrhTZ8EJ3HCmvm
-KxHd+kXn0sM6wc1gJ2gm14dJX+N/JiAfmaj5AKYN1ROBbvwnigNYaw46xyChXCTR
-CKZaHueBPSEFLktdGBTxT6tc5YHawSz2Ev8lCZcenVFtH2MunO19hkWwNXP2n4Jl
-vH9GiOGhYKE3UCac13bz3JSJbde+phehK3EUNxdf7Vo5mfxpr7tjVcZge2TYu7dK
-n7mqiUswH5zvI3qvfjHd+90K1QQKjFdvZIDr8+5sM9JywiRook6ZiBz3O10QzE7q
-pcsAQIqpYy4YkuuxKAX+Gep7MvtjViwLIAGSowIDAQABAoIEAG18dDwatQx9As62
-wFrQ/NQwOs3S6sXWqO0knoyU639+0Duf8b7uE/Ji7nm4iG8NeEAzwXfbRAgQNuKh
-VMjgaxgKSR8dCRRQzIkgp48t46dFJvQP+A7JZ9lr5J1kIs7DAz+zawYTaW9JSVgG
-mmujIS0ayXtZ4THkSaiEZTdOVUwE7+FxVB15WvXJYAg/BFzm8HblHfEkxGppiUGx
-9ULmRAJ4TZhv7Mzeq7Ny7jEJLJpPXzgHPtE/fgshC0d5mYYpzT1I99OxsTpMtAtZ
-M8nReEwcVvjJnnDGOJZo1J2X8GXBwdVE9eXWjZmTODqbytz77S/fcaxz/amzOSIG
-dYne4SsllKS0jzfxPhz2saq26ik7vxpD7i0cRQ+I0alvgISWRTQUiHSI8UTtYJ6+
-/l7VAa/isoTZOsOmwv7M7D6U9EtjrUKwBAUHFk+0Fg2w9WELhep7/bEiQWvnOMtX
-sruWBm5zv5CxW1MuujKn2t5jHNWhQaeOIrW9V6Hew3PJsLTTHUVX2Ikc8KZLObTP
-XTtGE993cADrYYxPH8l40QCHB2t6bM2maBTRy8PlMFMsYaM7rqnftlOuXyRYLm97
-oO7F8InpD1mDND4bBKbL3UOgl1QW9dbb8KOn8pERDXD9Z3K4ewyORiyuONXxBAz2
-QiaQ4gDJWD6sEySPEHcpDjemi6mKJFtDw935JxS2brso/NHoJSVdcNxisd2irA8P
-U8jyFTrTm7cO0nKFx9vv9r5dsbkqyQnJ9V0q4/DoWvnkPElKuvTeJMw6CvTjfvc1
-xIf8m3MQJTN8pqPpIOSj8DIhQIJBEVxtcajg+vlMuefR8hTCdLzQV2QEdLGjNGph
-OhFuHrHw1b3I4nCyi9MOLzpdUDgZkaw4hPg38u71RJ6bUF6pE89Yj04/svB7SZgA
-sE8+/pZcASZl1Y0T29OM3qFJvukBWwsNij5P5SLmTXDev+DXbzUvmVLCk8nJkJ5m
-n1peGst0ApHnEzxVhU+9d5FWBdIgN7fp7V2AlFt1r0TRWUYndBn9/B6xiyfd5iyK
-LpcbRjLpQ/9b3SYQZL9t65Hc40rP35rY0luQTzVd6E/D041E0NWdpAZai4GrpMKp
-NUBXBbmwnCZEzExLi78We6aF5tG9Vh+uxyYUXlrABR98jONgYIvnWaATaw6oLgam
-B84RhWUa1f+K70wrTorUO8QNvYO2n4jpwJikn4H9pFvvzzoOB7RaA+EF4HjaVmQr
-Jm6S18c7sksYFGIJYsPrXMtgOMQVYiQ3s8LDgsWKoEQYgvgxE24AoXGlXXbALrpo
-4WvRN7qLAm3n2OQYFUK0SGoELOADQFQhbNL91i0k4wzQ56ofQCb8aTmm3q76TnbK
-4gmIUIECggIBAOm3PhMqIKb3ZEZOWYMKByb7v8seuVh6mwXmgITcZIiA2f8rTfyH
-OZanYK72FsuGZEbf1ELwNUX0JobwklA1Uq9NajaJUdfe4wDpghf282APHK1nD3m3
-FX7Rsoof/dW9+bV/IIbQDwy+1ctB20m6dejt3kWyHSXly2y2L3bk1flee8oi+VCO
-ROp4u23KJcglIYlL+cL1z76lX41v8JW3deCTL/JStmK6zuvFhY5fTlOGxsLhAY3X
-VTZ0MNUpezlBaXTixi7ilgbh7rJSpCmeno5my1hdl/5Q5U/u5F5E7ZxKxlhuVWdA
-cf9qbtolSsgJ2w8axPD3dLnQ6wsNnl4yL77TdNr8OlbwIADXHH9VzZbfEgOhP4r9
-Cwz4hIUbylJ9QGZVsEVZhvqR3M6OgqlYOmC72nLPXVYbL/Rr7cTx8t+WJ4wJRP3l
-pi6AgDZXKbMKyMIhM1IscSR2swtAFyl6g6rcAjFyG+p1IKMOQ3YOqdVVUf5UYSpo
-NBTpJ+ho3CyQJK25yT2Maex5Q91M6Rk9vmXaIs+K40t/zu8cnCIH9j3In0BrpSi7
-WUyLgzXW+7ZrW7cugC93VVgjGNbgBiDimZ5duViI+xY+3OlrsUxzSHN+YY+8H2G2
-TfzT+Mgo8lJXH9tseFBLvRKhoPbbCyCwnOJ6k2k8/iqZ2eE7vQodyW/zAoICAQDE
-yK5Mlu0k3oTVasgYRNDYKJ9uyarVLaRcN6UjzNUSta2hABzQe/LG895EucK9yVa0
-4jT7EXILYQpHnQkaYtyHtN/deYWLRObT6RMws7te2MhwzQkaNavgi449dHP38TPS
-qy3Vh6v4nMhRjkhLqNiiJoDWThtkB216t+71GxdF2l9trrcvlC6q0Z65PR4LK3B/
-3m8KmlyGN940Ovb/4kEh2EZmNwbMq+3SaXiS4R7ZvKoboyNmwvCh4t5ne+NXz3Vm
-7srej0cnOM54dTuNVdXm6pajYjELNVJGsK0vo6CAZiAOyasFkwMFMr5w/ehBaZIo
-9ewWjvgDdvQ0+JBMVZJot7e5D4tUgVTaIMpQryzAp/u3r5KC1bkcC1Zie+44CaPr
-V2FspEyYQDPJHC2tRj33lbaCWDdfdhYhv6uzlcM9ExPj+RQA0xlCuxh1pxK43H4t
-PdWvcIeIKtFRWq9gsH1/wDBaIsB5Kykq4xyvMOj3dyV+dyIO1D3GG2+ZoBt8gklk
-ieDIzCMKsXbomgm64/Ewlx9tf1fbTouSWP1+Gh0Wne3sCEtCY72ebYgjtaA0w8Xr
-HGTsEdw/rSer46uULYWXYC6VYZwlyTbPh4NSD7ATrQo6HnaKugtuya9NPfYD9S9w
-PoXPXpNKvwSq9SA/XsodHet9uU+IlKnYI41hVGaukQKCAgEAu7dAFmh5vWFqmsWH
-Q6akQ/1j+KL+v0AKj1yp0Qyreq/zZ+3CP5fk+0oIb76cZG/Wzs4sUG9aeos0/qDv
-A5kwhjipnJACul38+diTcugYZgj9QZFLbrlMfIW03xf+6tQhYlNvLpih3dzRHuYQ
-WVF4LtQO+O+sVaoSD4js6pO2AQqQZrRchwUd+S1rbS0112FrZDkvrBV+/GMbMiC8
-naOy++N8WSdx8i6Uz+3f7ZBC+vd/YTsT4ncXrBr6tdsRa9VL/GPARhwb3/9LltKl
-pAAQ3dNWc+0IjW0wIVmA9u5p4mR0lsZXtgyfA0TbMD9PpwezeJhJojk++ZgBkOkp
-UAMDMkPo0ZJQ0U8ghUxBSU0DSbB1aZDz1pCTdaGN3tOJV2Pee9NLNwhHT64kKYtx
-Cs8gZF29gQVotCY2CB0/5jVmm4qgzOsNDNiM90CiugKcLX/162Z7L/8eCOmFuP2L
-HPeYFX2MDWbXYSMeSZjFOmdgpUZYCux+9m6nljwGn7bJUMmdjCNyrQrAcPydM3v4
-pRtgd7ISz5uAID3RWWAjT3oRn2Ip9rX++44ulTpg8rdviP8FtUWWE4nHdHkMFFnu
-0i7ur7Ibki7DbQSkrp6e0watJIZXmfjBQ9wHG5CteybYKqZrofOnVubeP76t6Ffa
-wjDYcVd+WsJwaosT4sH2fc+a4V0CggIAX703N+ISHGb6f47FLTGF3jTdZJxPNgpP
-teIIwUMtwz2K7RLN8gzr0Cnj0NID0iw7uCN6HVCeiLS8uJzJSgIhQxEX/XvbIify
-mdUC1iYLmhikZGUM8ah9J/Ed0f5vUYkTaoKH+SRZ4cn9l9g+ijjqtPFAq4Myxlbq
-x9LnOm7kwsJ8vTNMwqQ4lDkKHRuEG3EV+dAxfBofu9lAjW7GrzXX9Gxxy9cnwro/
-KajQ1b0bMloc9PdJCPz87/YduIFI2XcAqoSxRNi2iHmV0ntO7vN87yzg/zqNm+Nk
-VSouCEh2lSGapTcusraUuJm4l+agcfq39p+3Lj5+ocjlBUSNh+X2JmaDx1Ctu/50
-Vu+vHtQrVMwlpneQM4Fh3ygQ7jdXbgIasyw/JQlGjqhlyYmhG3VaPrOjKQVcY2Bj
-YiYLloLdi0BV5AtR1RjfaFz4iH0xmakE5mP4K7P27KPQVOFnBAa5+EZ7/856kDkU
-fV4jnYSRQ5y/LCkv88EFEPZWNIr19Hy60mRWbbsLrW8r5/zRkRDHTpmn27EiAHvV
-Ye1T3187Gb7ae4SJgRJftc2ad60s9Z7uEvYsj8Icwwoui+1nk98V6NENuPXVb3jW
-5t8KYAlr5BbDLAWYLORZHZyYYl8r6z8FxnlUxtA/nxUSY06BUvN+J+5fnTpkXJHf
-lF2vslPK5VECggIANpTlrc5Zp9c0jPOiBQT/92LdtMR9mB76WB8fX9xn1Tm7V/cI
-MatRrFzaTvi5HqHxPWJJ5cgMYKQw8kHHk1q9U7jeexZGCICFOUjk3N2Z0aXIWrx+
-hiS1i5DzRaZNI682s436cdaS4GpZIhqjIOR4/JS15Nfu+DVqyHOevWnd0D/tGoJB
-JpiePYl2k7b8sirM3bHnRDtBiMHrHyHxzpdTLImDLHXr7C5DTeQAzzo+YMu45mNm
-utKq3SRlO2wizj0qpONgJ6cHI7pypAPalliA+hPRRJqaHmTr7LpkP3+g73hf26wK
-PoF6CLkdaN945F4Z48/3zEOP3XRIQocMA46ayA+8TsOpx9rm8L1LrF1pgmJi5Ml9
-3yV93ZZ/w4Jy0pqZ28nn3gcX6JP7qtfgioLLeyuuBphpOQXl7Ys3w1d0EEErpATU
-tRG+BS16o+FhM1iXAN8c8HrqOtyJzCpYnuoWiNc+G8BIn6ox3xmihwK4hiR6s/OM
-Mxaa6T4FF/IWIzuCezYPGgybWMXj3nRHsD7eNP170irBLwS3GdD1HWM2BpmLdJa0
-m/7QQkONhCnNFtjIalfPWMX51z/8GOKRKWH5A8PY6CxVHRg1ZfHT4TlfbdRPIG8d
-6JrWt2s4eLv9VRdM+oMifHR4qvLDgg7R8pBr2FSsVXM9U2+j+drIeAhkjHI=
+MIISKAIBAAKCBAEAufV4RlPgPAe/l/urvpdx1YlEv9sOWL6WQgae3Aj3UdYnf2Ut
+xx73TFs/5Xr4/d9zQpIPN14orlEUE76zVdTbmvapiIQCefv5xGf5lplogFhKIsSh
+kMAzWMiW0aR/f56EpvMDowGTyx2r8fUXKAM0eG1HRger+Or/Aor4IJKizilqZtA5
+hy9in0PZowt0iav32Tl9bN4FTlhNNRXUGC3qcN9g/FD4DbWOwMYDdDuNU9aHopq2
+ClqApczfMKeVMK1QYuEBOo7u4UG0me7Oi8pVJD58AHkI9EZC4GOTo9BaOfx+9JYh
+JJr3KQ0ihbbFyZyScWhbA977vHX4DyTqAZK3N+B4oGQ3aZCKfJnHRfmQolBZ4RwC
+rbIuxzsm7HZtEMn5L9wSh0FyCOwKHK6bb95XpKq57oOkFMTlVGYyXSEqo20tjfWO
+CKKjDQeDSwonC5x/c3j42Zwe1DMrpzW0d14S1qak0tCvMLbVHwWbHuauyKWMtrfc
+wwsahVrVvb5lyOal8Dc4FtKwyv8uofJ/jijFnNTevh8jQ1GF+eX7qGFhllA0rXU0
++kbpKmYaQ5zk5Xkmtwtd0R2BxlIX15UTnmVkmy0NK3oEKKoC34EM84M9dq1A5vjA
+svMKsszo8sisIcSQfUy2UNi3ChUSX6XgxWiP7U302bVy32PJ1hT+2PzbMXIeFdXo
+rNmn0gq8p6ZRXw0PIyAtNLpEZvaB46r+OBFh7AM/ZG+T9S2wvn1vSXPGI2d7Rtpi
+ZxDk5qHkG1AP/1BRCtzuG+PtIDA6wTcXJJb6/i7QdbObwa4VrLr+tNUz/zOG814k
+90WNrbBHau+cDvcHDnGg53VKQlkCtxGG1mV3Bjr1b5k7m1LP5jBZ4ygZjsJf4fco
+dP/C0TWRlu1SFEo8kRlQez4EZfg+2Wwpz3TYD9/kzZRzge8ZnksMPi4k/anGc7V8
+7dEOcqzJ/l6mLdd/ysV1GMs+J2IgzxDBf9NvqdR4mDv2DOBfVLMLCjbXWTTDcFxZ
+Jc9U4H/sozvEoW++Hr7hNsbTJr2Grg5zJok8f3KhLQBmseLgdHKGEsJr5OeZcLuY
+gcNEZcV2IWLxrzGqc777sIamW+JReOZqG1g/SjTmmYjkHLGAlPIxoLAngbEYmG9T
+LnSgwy3n9pIngECk8zrirYRkgu2AP+BU6D3sdSUhKi9PCGG+tuD7vex+OxfSpLu4
++D+aLhLrsgBFUTqZU261Bl6Ljwq1YSwSEGBNLN5u6ID4mbKLNmEziAhgTzD/YdLM
+AnVd140G4L3j4DX3uvim5BR55GJNv+qB/h4BJGnaiRrBETxQ8aOzJ9/MFjoDl4ik
+kmOmjskY9QIWp7KlPfcSAOThVZYWhG4DcD3OSwIDAQABAoIEAQCw8nPtL7jKRnE4
+VIEbDY6DK2ggy3e+WDQwRY56P4ne9FGHNqa1t7CHlriZS0eMg0hwyvzxqYY6QOpC
+045gGPiSXy34ueyFWJBVJL7pX7aBkgGRTduTGmCBlfV1LPspW5RMLCeEv2Z7uxM3
+XAkZyNrv0MQmTfyFEk9vgv8SN5X1aJFXncFv8lX8yJpaO/c7XUitCbhglG8mGn31
+Cn1UOLTBjL0DuqQen2lj48e7nUMgyJ0ty9t2xKFvox+pc31R4UkBnasGpqWF8HjC
+lOszN2eG4nIqHQG5NvZCAF6nXQXN8YZ4hDarV03iYR49cCqKapMqmKsqZs7RiMtu
+1ahZsNror474yAO2TpSIdeeZnRzUZnLv8jBWSZubdpzWGuYzOI0FznpO+6Zf+QKy
+Qi+j5kUtakscO2UxYh36DnjUB1BETAox77ukWeWe60wyZkm7EcJxBWZ94sGvF7Xt
+GPxNLVXtrIpgE7TwPLlVGId/gvBD+suHvjKx4WnuBP4n2/mMjnTNvC2CAh+6OdGM
+xmw7wG4xipkc/hIW54b9wKqTkX5DgrRtbX7ou/r4nklVlwBznrGJMaam6lXneYw4
+ViFh8ocl5VuHyEYWz5eGR40kVfhxafC9F2x9myjN9I+hHfQ0+Y6nvAwrp9ucG2rt
+WrEkBxgVLb3UP4U8Lf8L19Sccxa714PNuO9OBcGODmHNPceDuwCDOaJhKChgl3Dj
+KNM4cxtUh8WnKfsDQxzP4ShX6dGxhY6oGCnimOoBmv5PsXLdlSrLMaDh3OW6s+xh
+1okitSGUfcxsMG5JrokDT4dX8jLdMpF+qOl9BDYnDBitzdDWh07txedwIKX4roG1
+9X5RX9Q0chjrplGIcNuZOOJp8zWAoVdwrTnPNX6bdMntbQMbHXMqJWsXBNC+VWh5
+5bHvehut5dl5E/DsdHth7hTvXHwhFLmAtRyGmMjZU63Anmr/UBz6Tg9+s0XHcJQu
+7/CGH5vUXR/2tCT57Prae0x+t7pbhLxbBn1z95u2IiVjahJInlaik3QTjiFZnMaZ
+OuyAe1IBkkNuu5r3MjQ5OSQyPX9sztS24jFh5xVER59YDnCg+pv8zMEmQ6y6wY0/
+O2HwOCiwMcFktAn+qvjRnPwrwmWvcnEpViff9zhmjkLMjYSXYWPXLr541Vvy3Fd4
+izlEoFUM3jStYPKukDCGifG6j6TRlMlrSNiTr07bjDiiRUfRP8nNvS8SYqDx0ukc
+bOpTYmJLQn4PE0BB+nsH9qvC8jA3Etx0NH6Bn0haWYdOFaTGeiWAHHRCairNreFZ
+PU0rVrX6NgzUiT++HguBuDB+eoNOn9/TI+IMVHXT2Z7n/kiOh9OGGJL1Ej1ohULa
+cUcfYjwBAoICAQDo4d48xxnjhEalY0Y0z3b2uP4sUBhgyCBs3Zf2/wEIiheJDmae
+ewUU81IBT2w2dwnCGvynxTGJ4hkXPLr5DLjB1HCrG96t/Oc0lmEO4c+SCrJnaf2M
+9e8Wx+zfL0rqdIv6OFGVSw2vUE+eLcN+UXXbx5DvEpz2PP750YILPpJEMXykZUAE
+cxObKmskYWj5rbGf5SyWE8umGnn52TS37a9T5pG5og3zoMeydthSiS4/jC1u9niq
+YXOJ345uhXU3HCjKbCbeMXdYONV14um8fizY6Hw8UD3853uDjxisDh6uT9s9L9PN
+zEaSCw7DLNvtYWfb74iprZSvu4F7iQpN/lclNTnwLHV2XGmsmjbJBSzWK2Hgv0C3
+xzpjj7yt5IAM0w768PXE+9yisR/91Q571pf8afAlqsdjwE5GILw4VnRxiM2iYjwK
+9O0MCQHWhHeB6eFetKeP45QNXMM2BBAkUQbRdY4MXvg6k9pVPXzL0ZFtjzwImD8C
+zk3ucF/+hcPctVc2B9boFYQmstG4QGMRhpX2cwXckGnQalK65xcKRYld+lswds45
+0cRtzyBCHm5xt4rGeTn985XbB2WtMSbSSCKfsf3yFy4vLkLjwHlYDkBkBKvJBD30
+duT9g7fInF5V9aSNOYqflS5a+9XR9rUFIk4NPTWKUiozOCbHJlD3iPe2AQKCAgEA
+zGsobIOxluTC2P1d2tCs1SribdC7jFFT+vpzJOftwZFt0taXvifMATcKTvl1UEBz
+DYdyvcDRWbfmWjf0xhjSrhHCHKsgl7MOeOcPiog0LJhOLcBVV9Rsz+6FEMhDQtcl
+z/4FyHWTel3pBKkdXBVcqQZdxNV9Oxn2KusKPMKvoRwwF8RF4Bzvh4RnCOOLbUDY
+0kWKJ/1Hg4XbAO0Ll+efNse7LGA+KM4hRzAQLHWYbUEqzgXaGXZwNRb8qSkm5ker
+NzYee76sM9vfXsNQk2fa6R1H2womCq926DHzFf+DXNAWJ8xf4fKWSv0rtYRH9t+c
+01b9/a2/ViaKySzymlH1scgKprNSMSylF228A3XbiJkz8vRki+itxPpMNrEIlbdI
+J0M/Qk7Lu/Gz0aKkI1oPB3qs6mE0vaYl2a1kl+G5UOaOnacQjrXDlDDQY+Awi6yC
+S/nPrkgs+Y+tx5k4UQnm8VIPUhQGha7BJ4QulIFrz/+KuqeVGy06lxvFiiNghEGO
+NHLyTlUIJiybuPDLopQh+U3IVwDPIoiLMAfxaUecsjq5S3vaYP+ThMoJYZdCPd2P
+McgkVubxf/DmnBievNjlWJNt2obuFBCG9ScsRRTh0wddt324IICFTg15B3Z8x0Kw
+QkGvOp0QX360wMpAVxyrZQvaC64qf2/Akc1ajjGDfEsCggIAVhM90BsLD5PRhMmn
+pldUMib4Eyrbh9IQYgyZYXqpSB26SzceaM8xdqfklIVlis/+tFbDMcNp5vvBqFwT
+A4BXPZUmu6fGa2qBjmdSomyGCwWXITAEvjgcUcA9ZdSWDQhcwHRWeybNfRHjC6UA
+j8zOEhi2EhdAGqc62t08Aqny5++ekSi3O63I/l30UfMLGNXBREcxbpsMd21rzhQh
+LyZT2l/rVsB2BalUhjr1A7SeenB2ToAc42S3jqspeuIrC96FmSPWTePcp6gCBduD
+5t5/9wAfAy/paXOprFuUk+t4HZd4gioOUA+DufEKWMtY0mlhOOJVEdoNjdJxLlbd
+jyxFy4Pb0VCtbb0Edf5d53jZNKO+PpKR+htSEoCLDX7acWMFM20ieddZmmx7VZeN
+DeqoLGx/jXyMy+rFQ5hP2UbjLR+SWcWTSb1zbDJcEozNmx/148pD8KP+Ed5KbMmd
+qb6lFYAsq5fiicwiM8VRPghMh0EcwFR9Xa0hEtNIN8v7M7V28Yp+PTPOr3sCluZ9
+d3nWLcwfy4E5CwZxY5GMa4h+GFUzpTsUSDynLKsU0jtrOO7NBUTDUYDZz6XxR81V
++v0chwgDw5obwOaJZKK8dvZ1iEJNuDOwLo5PXwBzSlu5Zm4vjt9IxGkgRBK22i8k
+gyxFyxDnnCN4Y4wKkSsxW/ytCgECggIAP7+zTZQMT/hrY2wwVsr4+0lyb7jGpE3A
+mOZ9/iZuGQ2XaEcP73dNwZs+lb5p/Wr79l4lRFPbddVJ+xy0MwsOuMZE+NfNREHM
+45t7V0J+suGUj+QJOWi/vmCuErvBbhjWa/TWLNut8F1VC+UJiOwIh5W6rGW/tiy0
+flHqUWSNjPrTbLYC7I9Zi7OYxkbf9mRgucKCAVKVeMjHsZQ7J1ZOarEDCCXDfMo7
+yo2MnbDWpkvKY5GjoIk1GPlgNgjlXq8/D+rKuuCNp2aMVGsot6+Nr2E4RXD2yCJM
+PMFHA7c5ajpijmrIBBi5Eg2+Ec98+dpmd+oLL499ugovAeoIhmPE8XpnB/GoUjmQ
+CqxoE9QvcHwGnV/l81POzT0Zg3zWJoqP796i3bThCG2qHFhSQ8wUH8r8HePOpM4p
+w6a1VkBIoJgmJbgyC69XnOFUO7Fwsj5MLBFt2PYdQH60PSjlTTB/WwayTHB+UDZd
+ektYk2uBCc6xnuAgOedy/CjnA9tggB5JkMXAFvmhnvYOYjCF8N+tcKf3MFrKPgTD
+E2mGucRhc5uoqYeoZNOPV7wCDPM070InI+k8m/VNnw6rfEaZSl+BtovTmHC30n4M
++GsM/UYz3rHPYifMwiYSbHL7KX6kDygW+7KsSOUuc/l5uR3ZztDcCpkVmMrp6fAZ
+595YvTtnu90CggIAV5tGE9Bnh/W9NoBPTuL79cPuNeZRVo/4zSh10LWiSoh+39UB
+uVbWt8Y5XeqF6iDx/gyO5qauieF1ZZ27CPrqq/E/SU7FW2H1zKWlyvGWA6jW9mZy
+HTbiZgGoNhYougQIt7NN0U3DXqf7+Y+m1vAacKOkoc86U5dK5XtMjhxhxoqWUOSv
+TZR6VkHWhiMDNAJSmdkUojf8FwtCFDYXVoxQxVeF0jMN4S3DEjdkpIhnpetz4b9Y
+q62SIw7Moz8CABL9VMI/L2masrYaQMm0GW9o3hHkwV8t9+O9IgcbBj6np2yw9uIS
+6q9xzOHviBtbHCBieJwvKjIvbWy84MiGYdutpOVom4Wo0AvehLxgc10xpCc8tpDX
+rq9WjyLRAkHQf+mUXzquBoVJr/pQOF0tlqMLhicOELHt6Y3kGVAqLqlQSiiOTfpE
+mkRDDDbj8pTl9YneAC6asosEtukL8IJv7Pwiz7u/OSD9dZM8SzyhFMJ8hLRg6VZD
+upFxO/n4GZK/F57nivdRz3XhH5A3sx4Dh6moLAF7NwBaWL1vTcV5f+MNCos1psC0
+2mQ3YORQ+OJRMb+uUOCre6TVeii0KjEiLxVuptw7NTXsUAPKYvVMzp2yZoqSkkaD
+T9lytWVuEUmoZX4BAHsI0dpq1G5nT+9cZRWf/qY7wlUKz+CPg6SLFdaDmG8=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/serversan-cert.pem b/mysql-test/std_data/serversan-cert.pem
index e47779f420d..d40127365ca 100644
--- a/mysql-test/std_data/serversan-cert.pem
+++ b/mysql-test/std_data/serversan-cert.pem
@@ -5,56 +5,68 @@ Certificate:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:33 2017 GMT
- Not After : Apr 20 20:52:33 2037 GMT
+ Not Before: Jan 27 10:11:15 2019 GMT
+ Not After : Jan 22 10:11:15 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
- Public-Key: (1024 bit)
+ Public-Key: (2048 bit)
Modulus:
- 00:a7:74:d4:2b:80:cb:96:08:2a:b9:c2:87:18:0d:
- 69:2b:da:cf:ef:21:cb:05:d4:80:2c:f3:85:bc:78:
- b2:42:d9:9f:f1:dc:47:68:c5:af:5a:c9:01:f0:dd:
- 91:cb:3a:b9:38:b2:36:6b:a3:66:ef:cd:44:0f:8f:
- 39:57:60:ad:3b:44:33:51:c2:7f:cb:5c:8d:55:b8:
- 1e:e8:80:e0:ed:9d:8d:10:7a:42:68:73:06:63:83:
- ce:db:05:5b:e1:7b:f9:0e:87:20:38:b8:11:6a:b7:
- 59:3d:4a:ca:cb:60:e6:e1:73:d9:a2:24:4a:70:93:
- 5e:cf:d5:04:d5:ad:ac:96:a5
+ 00:be:e7:9b:da:e1:bf:fe:e6:a4:6d:c2:20:8a:1f:
+ ea:8e:1a:a6:3f:57:93:75:d8:3b:80:55:bd:f3:fe:
+ c3:1e:50:0f:e9:66:0e:bf:98:98:5f:06:95:fc:4a:
+ 9a:b2:fc:7f:b1:e0:d9:ef:df:6c:28:d0:12:98:bf:
+ 78:b6:f4:1a:94:83:a0:3e:bc:d3:b3:02:4f:4a:96:
+ d9:30:b5:7c:5a:82:dd:ff:96:72:1c:f5:ad:80:bd:
+ ec:f7:fa:9c:40:e2:37:f5:86:b7:c6:b0:bb:6a:69:
+ 77:77:e1:2a:b1:03:bb:1e:bb:e8:b3:7a:2c:bf:a6:
+ c5:6b:4d:99:fb:f3:84:ec:ac:a9:2a:f3:f5:09:4e:
+ 5b:75:18:9c:68:f7:c9:2b:59:0b:41:33:60:23:fa:
+ d4:f8:64:e2:51:59:37:29:f2:bb:68:f5:6a:47:69:
+ 58:ed:a8:bb:11:9d:6b:d1:77:75:01:da:57:5d:3e:
+ 8e:bf:f7:b1:7b:69:df:53:22:5f:7d:c5:ac:b0:80:
+ 0c:20:ea:9d:f7:c4:52:d8:31:03:07:b8:84:a9:74:
+ e3:2e:4a:68:bf:a1:84:c6:38:32:c1:11:ef:f9:4b:
+ e6:79:f4:7b:7f:52:f3:36:4b:a6:d8:a5:ad:d2:02:
+ 40:89:42:ed:ba:d6:ea:74:d0:6e:c1:bc:02:33:9f:
+ 0b:ab
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:localhost
Signature Algorithm: sha256WithRSAEncryption
- 4b:78:d9:09:4c:25:cc:fb:17:8f:31:13:ac:d7:36:2d:5f:d4:
- ce:94:84:d2:a7:fa:e2:1e:ae:b6:72:1f:01:56:0f:89:80:c0:
- 01:ba:ad:d7:cb:24:c5:25:ec:f8:35:ac:52:1b:4f:af:7c:26:
- 8d:d4:d4:91:05:21:b7:ba:3f:6b:1b:8d:1d:a5:6b:7e:7d:be:
- 2f:6a:09:83:c2:c3:6c:2f:8a:31:fa:7b:36:3f:6d:e1:62:ca:
- a0:3c:43:b8:53:5a:4a:b3:4d:7a:cb:9c:6e:db:a4:ce:a1:95:
- 5e:26:d8:22:39:8c:34:0e:92:bd:87:a2:b1:7a:68:25:57:17:
- b2:d8:43:3b:98:e4:80:6b:7d:3e:ab:32:82:6d:b8:80:45:83:
- d6:55:f8:cd:31:74:17:8c:42:75:09:71:66:b9:e0:94:16:ca:
- 1d:db:1e:89:12:a1:9f:00:cb:83:99:5d:5d:28:7a:df:2a:87:
- b5:8d:f1:9c:b9:89:2a:0d:6c:af:61:00:41:cb:03:df:99:4a:
- fe:93:81:88:ff:47:4e:2a:b5:2b:bf:85:0f:9a:21:7b:20:58:
- 7a:1c:67:b5:8b:da:db:03:69:25:db:76:0e:f9:23:57:8d:8a:
- 47:dc:15:16:7c:2d:66:8f:6a:10:f3:b2:ea:2e:31:c6:d4:2c:
- 90:15:56:f4
+ 73:fa:07:e9:05:65:28:2e:72:91:29:f8:6b:a6:11:2e:e3:e2:
+ 14:6c:4d:7e:69:16:01:47:55:df:88:8d:be:82:37:bd:95:4e:
+ cc:9c:71:98:fa:3b:0d:ad:13:53:e7:04:e7:6f:38:97:ce:12:
+ c1:f1:c2:48:bc:3f:a9:61:b5:22:48:e1:8c:64:1f:58:14:e9:
+ dd:5d:9f:e3:e7:78:5f:7d:43:6a:89:21:38:9d:65:e8:71:c1:
+ 62:d9:62:c7:e6:b3:bd:cb:de:f1:7c:46:10:53:28:8c:47:02:
+ 22:91:ad:78:c0:21:10:28:a8:2c:23:a3:f2:c0:2c:c9:71:0d:
+ b4:a0:ca:37:ac:36:b3:1c:75:6a:74:85:a5:ba:c2:19:de:e4:
+ 3e:c2:3c:a4:cc:dc:8e:a7:08:36:f4:e9:81:32:ac:49:f4:34:
+ 89:84:e7:61:54:29:7b:c0:54:53:b9:73:37:58:21:32:56:01:
+ 7f:97:d3:a1:06:5b:06:14:19:6a:42:5d:45:5a:ba:8e:14:d7:
+ df:49:46:f2:83:7a:f0:d6:25:52:37:39:ae:37:ea:67:5f:7f:
+ 7b:6d:f1:42:c9:0f:44:4d:f7:39:2d:39:78:12:93:42:1b:4a:
+ 6d:f8:76:48:78:41:e9:a1:0b:78:fd:ad:29:f1:28:62:b8:9f:
+ f7:22:39:3b
-----BEGIN CERTIFICATE-----
-MIICuzCCAaOgAwIBAgIBBDANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+MIIDPzCCAiegAwIBAgIBBDANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
-MjA1MjMzWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTE1WhcNMzkwMTIy
+MTAxMTE1WjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZzZXJ2ZXIw
-gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKd01CuAy5YIKrnChxgNaSvaz+8h
-ywXUgCzzhbx4skLZn/HcR2jFr1rJAfDdkcs6uTiyNmujZu/NRA+POVdgrTtEM1HC
-f8tcjVW4HuiA4O2djRB6QmhzBmODztsFW+F7+Q6HIDi4EWq3WT1Kystg5uFz2aIk
-SnCTXs/VBNWtrJalAgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkq
-hkiG9w0BAQsFAAOCAQEAS3jZCUwlzPsXjzETrNc2LV/UzpSE0qf64h6utnIfAVYP
-iYDAAbqt18skxSXs+DWsUhtPr3wmjdTUkQUht7o/axuNHaVrfn2+L2oJg8LDbC+K
-Mfp7Nj9t4WLKoDxDuFNaSrNNesucbtukzqGVXibYIjmMNA6SvYeisXpoJVcXsthD
-O5jkgGt9Pqsygm24gEWD1lX4zTF0F4xCdQlxZrnglBbKHdseiRKhnwDLg5ldXSh6
-3yqHtY3xnLmJKg1sr2EAQcsD35lK/pOBiP9HTiq1K7+FD5oheyBYehxntYva2wNp
-Jdt2DvkjV42KR9wVFnwtZo9qEPOy6i4xxtQskBVW9A==
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+55va4b/+5qRtwiCKH+qO
+GqY/V5N12DuAVb3z/sMeUA/pZg6/mJhfBpX8Spqy/H+x4Nnv32wo0BKYv3i29BqU
+g6A+vNOzAk9KltkwtXxagt3/lnIc9a2Avez3+pxA4jf1hrfGsLtqaXd34SqxA7se
+u+izeiy/psVrTZn784TsrKkq8/UJTlt1GJxo98krWQtBM2Aj+tT4ZOJRWTcp8rto
+9WpHaVjtqLsRnWvRd3UB2lddPo6/97F7ad9TIl99xaywgAwg6p33xFLYMQMHuISp
+dOMuSmi/oYTGODLBEe/5S+Z59Ht/UvM2S6bYpa3SAkCJQu261up00G7BvAIznwur
+AgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkqhkiG9w0BAQsFAAOC
+AQEAc/oH6QVlKC5ykSn4a6YRLuPiFGxNfmkWAUdV34iNvoI3vZVOzJxxmPo7Da0T
+U+cE5284l84SwfHCSLw/qWG1IkjhjGQfWBTp3V2f4+d4X31DaokhOJ1l6HHBYtli
+x+azvcve8XxGEFMojEcCIpGteMAhECioLCOj8sAsyXENtKDKN6w2sxx1anSFpbrC
+Gd7kPsI8pMzcjqcINvTpgTKsSfQ0iYTnYVQpe8BUU7lzN1ghMlYBf5fToQZbBhQZ
+akJdRVq6jhTX30lG8oN68NYlUjc5rjfqZ19/e23xQskPRE33OS05eBKTQhtKbfh2
+SHhB6aELeP2tKfEoYrif9yI5Ow==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/serversan-key.pem b/mysql-test/std_data/serversan-key.pem
index 393c0bc9c1a..84c34d63b0f 100644
--- a/mysql-test/std_data/serversan-key.pem
+++ b/mysql-test/std_data/serversan-key.pem
@@ -1,16 +1,28 @@
-----BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKd01CuAy5YIKrnC
-hxgNaSvaz+8hywXUgCzzhbx4skLZn/HcR2jFr1rJAfDdkcs6uTiyNmujZu/NRA+P
-OVdgrTtEM1HCf8tcjVW4HuiA4O2djRB6QmhzBmODztsFW+F7+Q6HIDi4EWq3WT1K
-ystg5uFz2aIkSnCTXs/VBNWtrJalAgMBAAECgYBReSgZmmpzLroK8zhjXXMEIUv1
-3w02YvOR61HwJxEkMVn+hNxBf50XoKDPHh5nMMUZbqvHpxLYLZilsVuGxcTCPVzw
-YxTooPcJY8x61oUclI2Ls5czu/OfzoJhA9ESaFn6e4xReUFmNi8ygTMuPReZZ90T
-ZvDikonKtCCk99MSaQJBANrmlPtfY57KJ18f1TqLvqy73I1vQjffSOrK3deYbvvB
-jUJ79G9Wzj8Hje2y+XkkK+OIPcND1DnoTCTuqVazn+cCQQDD1jy8zrVg/JEPhQkS
-BM7nvm4PIb0cgTPrOhsHDIF4hbaAZnA0N4ZEJ2q7YitXfOeR98x+aH/WJOrzzhmE
-VXOTAkBQ4lK6b4zH57qUk5aeg3R5LxFX0XyOWJsA5uUB/PlFXUdtAZBYc6LR92Ci
-LDeyY4M0F+t6c12/5+3615UKzGSRAkA+SGV6utcOqGTOJcZTt7nCFFtWbqmBZkoH
-1qv/2udWWFhJj8rBoKMQC+UzAS69nVjcoI2l6kA17/nVXkfZQYAHAkEAmOHCZCVQ
-9CCYTJICvoZR2euUYdnatLN8d2/ARWjzcRDTdS82P2oscATwAsvJxsphDmbOmVWP
-Hfy1t8OOCHKYAQ==
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC+55va4b/+5qRt
+wiCKH+qOGqY/V5N12DuAVb3z/sMeUA/pZg6/mJhfBpX8Spqy/H+x4Nnv32wo0BKY
+v3i29BqUg6A+vNOzAk9KltkwtXxagt3/lnIc9a2Avez3+pxA4jf1hrfGsLtqaXd3
+4SqxA7seu+izeiy/psVrTZn784TsrKkq8/UJTlt1GJxo98krWQtBM2Aj+tT4ZOJR
+WTcp8rto9WpHaVjtqLsRnWvRd3UB2lddPo6/97F7ad9TIl99xaywgAwg6p33xFLY
+MQMHuISpdOMuSmi/oYTGODLBEe/5S+Z59Ht/UvM2S6bYpa3SAkCJQu261up00G7B
+vAIznwurAgMBAAECggEATXOwMuyWNbejjHhPNVrfkcnUGyzPweb5tQaUa5K33OuE
+mR/z6d3iK+ODJHmsK+Pvdt6P7RcLTb+lW92K/0coJYsFj46SoTTVsKBk+7MWAa7I
+nLKQF5nBS9NCehVuIZDmPTHsC6uWTgT+GF/9LxYha8W3EmIGF7d0ryUrzSGuk0qA
+yVj4V2JbEbox5jjRUvRvCfbQnZYhT1Aa1/kN4fxYp00sQTkCQ1QZiC+SbN245nrv
+UHumVBy0dPL+vmYxKc+L9qwYhHKsspx6+RUTgW+7YbHs6LEd8HmXb0hIp1Xb4yUS
+ADVI7TgTGEGGRt1gQYkfcwl1YoVQeyBK8Yvfz88tgQKBgQD9PeBEXM+y7z8jcXAB
+f/JpmMmm+S8JhPyKOMDZRL5jPKgm93Xm0pAReo8xM/quKH2jAoMxmburnYTTskyo
+HBATcWDTBUiNkjCJORdWKwP6kvtYt8ZZsC9vrWkx4pPqTXQaXUNmrfZ1cuh5U/BK
+5aAzN5Drx0tKie+/+2gvevoZawKBgQDA++qDlRAiNft7fEZhjA3ovOSq9kIf1hnE
+psh4SRB21QZ443gifQKRRFIhMWRX0QkTyw2PbeVJvPjab08NmcumJWK5NCxPy3C0
+/ihQV2Ip49GVYA2qlgVzOMuxJJlG6SyKvCiBmadHY/ex4Ya1YPcfhjKsNr4ObIV8
+OCvQruQmwQKBgB+jp21jGyAD/CN1fMTzM1o2GJuf7lyGHPc3+AAtMow7e9bCfByG
+mjFU2qcPE3bG4EuJeNKtnmDmoT3BvQoT135WX/59Xn8xkJbUZzIA1dJsorKG42U5
+OfP9+nKdGFXhr2vL0yv0+CHcZWcjMZZp8gX0H0sV7zY03Zti0bV869pZAoGBALDg
+c+IkJoRkm9ljXxKbDkiJkMBNMvABCN8fyk/ND8UKnIMCYaKil07Tor7/iSuf0MUO
+b6BNJkE+bYuvR3J8ypW+YEzFT/PWz7dj10lDvhoMz5QsVHpMRDSGEtOKat3+ay/B
+IxMd5J7fNjAYN6JYfEetdRY4mluYBYSD60y6byxBAoGBALDoRoub5TUMdgr66fNp
+p7tc9ERH8/htPEq5g2SrzQex7lUIp8+wmvprx0i4a2SgDYCkj6gmjG8rP2O65tsn
+dkrKXnUOjIgjHGesbZoKgE+7Gl4c+eyoDsNVHH+ZFKN26fcO9i6wrbeGKjTTMcfu
+nEXqAq0CccdZ0lXxQTS/ttbU
-----END PRIVATE KEY-----
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 23c07958841..1c99e1ed645 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -62,9 +62,9 @@ sub skip_combinations {
}
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
- $skip{'main/openssl_6975.test'} = 'no or too old openssl'
+ $skip{'main/openssl_6975.test'} = 'no or wrong openssl version'
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
- and $1 ge "1.0.1d";
+ and $1 ge "1.0.1d" and $1 lt "1.1.1";
$skip{'main/ssl_7937.combinations'} = [ 'x509v3' ]
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
@@ -74,4 +74,3 @@ sub skip_combinations {
}
bless { };
-
diff --git a/mysql-test/suite/archive/disabled.def b/mysql-test/suite/archive/disabled.def
new file mode 100644
index 00000000000..ae841eaaf33
--- /dev/null
+++ b/mysql-test/suite/archive/disabled.def
@@ -0,0 +1,13 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+
+archive_gis : MDEV-17297 wait for the fix and then enable it
diff --git a/mysql-test/suite/archive/flush.result b/mysql-test/suite/archive/flush.result
new file mode 100644
index 00000000000..428f32d09f8
--- /dev/null
+++ b/mysql-test/suite/archive/flush.result
@@ -0,0 +1,18 @@
+CREATE TABLE t1(a INT) ENGINE=archive;
+INSERT INTO t1 VALUES(1);
+connect con1, localhost, root;
+LOCK TABLE t1 READ;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+# Must return 1 row
+SELECT * FROM t2;
+a
+1
+SELECT * FROM t1;
+a
+1
+connection con1;
+UNLOCK TABLES;
+connection default;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/archive/flush.test b/mysql-test/suite/archive/flush.test
new file mode 100644
index 00000000000..feadef08d7a
--- /dev/null
+++ b/mysql-test/suite/archive/flush.test
@@ -0,0 +1,25 @@
+--source include/have_archive.inc
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+CREATE TABLE t1(a INT) ENGINE=archive;
+INSERT INTO t1 VALUES(1);
+# Works correct if we uncomment next row
+#FLUSH TABLE t1;
+
+connect(con1, localhost, root);
+LOCK TABLE t1 READ;
+
+connection default;
+FLUSH TABLES WITH READ LOCK;
+copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/t2.frm;
+copy_file $MYSQLD_DATADIR/test/t1.ARZ $MYSQLD_DATADIR/test/t2.ARZ;
+UNLOCK TABLES;
+--echo # Must return 1 row
+SELECT * FROM t2;
+SELECT * FROM t1;
+
+connection con1;
+UNLOCK TABLES;
+
+connection default;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/archive/rnd_pos.result b/mysql-test/suite/archive/rnd_pos.result
new file mode 100644
index 00000000000..b6b6748d53f
--- /dev/null
+++ b/mysql-test/suite/archive/rnd_pos.result
@@ -0,0 +1,56 @@
+create table t1(c1 int not null, c2 double not null, c3 char(255) not null) engine=archive;
+insert t1 select seq, seq+0.7, concat('row with c1 = ', seq) from seq_1_to_10;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using filesort
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
+flush status;
+select c1,c3 from t1 order by c2;
+c1 c3
+1 row with c1 = 1
+2 row with c1 = 2
+3 row with c1 = 3
+4 row with c1 = 4
+5 row with c1 = 5
+6 row with c1 = 6
+7 row with c1 = 7
+8 row with c1 = 8
+9 row with c1 = 9
+10 row with c1 = 10
+set max_length_for_sort_data = default;
+show status where variable_name like '%tmp%' and value != 0;
+Variable_name Value
+Created_tmp_tables 1
+Handler_tmp_write 10
+Rows_tmp_read 20
+alter table t1 partition by hash (c1) partitions 3;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 10 Using filesort
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
+flush status;
+select c1,c3 from t1 order by c2;
+c1 c3
+1 row with c1 = 1
+2 row with c1 = 2
+3 row with c1 = 3
+4 row with c1 = 4
+5 row with c1 = 5
+6 row with c1 = 6
+7 row with c1 = 7
+8 row with c1 = 8
+9 row with c1 = 9
+10 row with c1 = 10
+set max_length_for_sort_data = default;
+show status where variable_name like '%tmp%' and value != 0;
+Variable_name Value
+Created_tmp_tables 1
+Handler_tmp_write 10
+Rows_tmp_read 20
+drop table t1;
diff --git a/mysql-test/suite/archive/rnd_pos.test b/mysql-test/suite/archive/rnd_pos.test
new file mode 100644
index 00000000000..7a1d78ea003
--- /dev/null
+++ b/mysql-test/suite/archive/rnd_pos.test
@@ -0,0 +1,27 @@
+#
+# MDEV-14500 Support engines without rnd_pos
+#
+source include/have_archive.inc;
+source include/have_sequence.inc;
+source include/have_partition.inc;
+
+create table t1(c1 int not null, c2 double not null, c3 char(255) not null) engine=archive;
+insert t1 select seq, seq+0.7, concat('row with c1 = ', seq) from seq_1_to_10;
+explain partitions select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+flush status;
+select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = default;
+show status where variable_name like '%tmp%' and value != 0;
+
+alter table t1 partition by hash (c1) partitions 3;
+explain partitions select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = 4;
+explain partitions select c1,c3 from t1 order by c2;
+flush status;
+select c1,c3 from t1 order by c2;
+set max_length_for_sort_data = default;
+show status where variable_name like '%tmp%' and value != 0;
+
+drop table t1;
diff --git a/mysql-test/suite/binlog/include/binlog.test b/mysql-test/suite/binlog/include/binlog.test
index 40befc9d3d1..e5d4efb183b 100644
--- a/mysql-test/suite/binlog/include/binlog.test
+++ b/mysql-test/suite/binlog/include/binlog.test
@@ -269,12 +269,10 @@ create table if not exists t3 like tt1;
# the mysql database is replicated even when the current database is
# 'mysql'.
---disable_warnings
USE mysql;
-INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
-UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
-DELETE FROM user WHERE host='localhost' AND user='@#@';
---enable_warnings
+INSERT db SET host='localhost', user='@#@', db='Just a test';
+UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
+DELETE FROM db WHERE host='localhost' AND user='@#@';
use test;
source include/show_binlog_events.inc;
diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
index 4068a80771c..2d79de6960a 100644
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result
@@ -843,9 +843,9 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
-INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
-UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
-DELETE FROM user WHERE host='localhost' AND user='@#@';
+INSERT db SET host='localhost', user='@#@', db='Just a test';
+UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
+DELETE FROM db WHERE host='localhost' AND user='@#@';
use test;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -894,18 +894,18 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Annotate_rows # # INSERT db SET host='localhost', user='@#@', db='Just a test'
+master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Annotate_rows # # UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # DELETE FROM user WHERE host='localhost' AND user='@#@'
-master-bin.000001 # Table_map # # table_id: # (mysql.user)
+master-bin.000001 # Annotate_rows # # DELETE FROM db WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Table_map # # table_id: # (mysql.db)
master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3,tt1;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index 872ba40e05f..ccc3db2ba7e 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -1,4 +1,3 @@
-drop table if exists t1;
create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
@@ -6,8 +5,6 @@ commit;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
@@ -451,9 +448,9 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
-INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
-UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
-DELETE FROM user WHERE host='localhost' AND user='@#@';
+INSERT db SET host='localhost', user='@#@', db='Just a test';
+UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@';
+DELETE FROM db WHERE host='localhost' AND user='@#@';
use test;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -501,15 +498,14 @@ master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
+master-bin.000001 # Query # # use `mysql`; INSERT db SET host='localhost', user='@#@', db='Just a test'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Query # # use `mysql`; UPDATE db SET db='Another db' WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
+master-bin.000001 # Query # # use `mysql`; DELETE FROM db WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Rotate # # master-bin.000002;pos=POS
drop table t1,t2,t3,tt1;
reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog.test b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
index c3d8066f807..e9c8e0ed874 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_binlog.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
@@ -3,10 +3,6 @@
let collation=utf8_unicode_ci;
--source include/have_collation.inc
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
# REQUIREMENT
# replace_regex should replace output of SHOW BINLOG EVENTS
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel.result b/mysql-test/suite/binlog_encryption/rpl_parallel.result
index 20f3facea27..5f78a378829 100644
--- a/mysql-test/suite/binlog_encryption/rpl_parallel.result
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel.result
@@ -1518,6 +1518,7 @@ SET SESSION debug_dbug="+d,binlog_force_commit_id";
SET @commit_id= 10000;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t3 VALUES (120, 0);
SET @commit_id= 10001;
diff --git a/mysql-test/suite/compat/oracle/r/parser.result b/mysql-test/suite/compat/oracle/r/parser.result
index c8600c29bd4..1c60c1434a3 100644
--- a/mysql-test/suite/compat/oracle/r/parser.result
+++ b/mysql-test/suite/compat/oracle/r/parser.result
@@ -499,3 +499,113 @@ test.comment()
Warnings:
Note 1585 This function 'comment' has the same name as a native function
DROP FUNCTION comment;
+#
+# MDEV-17660 sql_mode=ORACLE: Some keywords do not work as label names: history, system, versioning, without
+#
+BEGIN
+<<date_format>>
+NULL;
+END;
+/
+BEGIN
+<<decode>>
+NULL;
+END;
+/
+BEGIN
+<<history>>
+NULL;
+END;
+/
+BEGIN
+<<system>>
+NULL;
+END;
+/
+BEGIN
+<<versioning>>
+NULL;
+END;
+/
+BEGIN
+<<without>>
+NULL;
+END;
+/
+#
+# MDEV-17666 sql_mode=ORACLE: Keyword ELSEIF should not be reserved
+#
+DECLARE
+ELSEIF INT;
+BEGIN
+ELSEIF:=1;
+END;
+/
+BEGIN
+<<ELSEIF>>
+NULL;
+END;
+/
+#
+# MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the option_value_no_option_type grammar
+#
+CREATE TABLE names (names INT);
+SELECT names FROM names AS names;
+names
+DROP TABLE names;
+CREATE TABLE password (password INT);
+SELECT password FROM password AS password;
+password
+DROP TABLE password;
+CREATE TABLE role (role INT);
+SELECT role FROM role AS role;
+role
+DROP TABLE role;
+DECLARE
+names VARCHAR(32) DEFAULT '[names]';
+password VARCHAR(32) DEFAULT '[password]';
+role VARCHAR(32) DEFAULT '[role]';
+BEGIN
+<<names>>
+SELECT names;
+<<password>>
+SELECT password;
+<<role>>
+SELECT role;
+END;
+$$
+names
+[names]
+password
+[password]
+role
+[role]
+DECLARE
+names VARCHAR(32);
+BEGIN
+SET names='[names]';
+END;
+$$
+ERROR 42000: Variable 'names' must be quoted with `...`, or renamed
+DECLARE
+password VARCHAR(32);
+BEGIN
+SET password='[password]';
+END;
+$$
+ERROR 42000: Variable 'password' must be quoted with `...`, or renamed
+DECLARE
+role VARCHAR(32);
+BEGIN
+SET role='[role]';
+END;
+$$
+SELECT @@GLOBAL.names;
+ERROR HY000: Unknown system variable 'names'
+SELECT @@GLOBAL.password;
+ERROR HY000: Unknown system variable 'password'
+SELECT @@GLOBAL.role;
+ERROR HY000: Unknown system variable 'role'
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/suite/compat/oracle/r/sp-code.result b/mysql-test/suite/compat/oracle/r/sp-code.result
index 1049563511c..1c6aacc8743 100644
--- a/mysql-test/suite/compat/oracle/r/sp-code.result
+++ b/mysql-test/suite/compat/oracle/r/sp-code.result
@@ -579,8 +579,8 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@2 0
1 set i@3 1
-2 set [upper_bound]@4 a@0
-3 jump_if_not 9(9) i@3 <= [upper_bound]@4
+2 set [target_bound]@4 a@0
+3 jump_if_not 9(9) i@3 <= [target_bound]@4
4 set total@2 total@2 + i@3
5 jump_if_not 7(7) i@3 = b@1
6 jump 9
@@ -598,7 +598,7 @@ CREATE FUNCTION f1 (a INT, b INT) RETURN INT
AS
total INT := 0;
BEGIN
-FOR i IN REVERSE a..1
+FOR i IN REVERSE 1..a
LOOP
total:= total + i;
IF i = b THEN
@@ -612,8 +612,8 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@2 0
1 set i@3 a@0
-2 set [upper_bound]@4 1
-3 jump_if_not 9(9) i@3 >= [upper_bound]@4
+2 set [target_bound]@4 1
+3 jump_if_not 9(9) i@3 >= [target_bound]@4
4 set total@2 total@2 + i@3
5 jump_if_not 7(7) i@3 = b@1
6 jump 9
@@ -651,12 +651,12 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@4 0
1 set ia@5 1
-2 set [upper_bound]@6 a@0
-3 jump_if_not 17(17) ia@5 <= [upper_bound]@6
+2 set [target_bound]@6 a@0
+3 jump_if_not 17(17) ia@5 <= [target_bound]@6
4 set total@4 total@4 + 1000
5 set ib@7 1
-6 set [upper_bound]@8 b@2
-7 jump_if_not 15(15) ib@7 <= [upper_bound]@8
+6 set [target_bound]@8 b@2
+7 jump_if_not 15(15) ib@7 <= [target_bound]@8
8 set total@4 total@4 + 1
9 jump_if_not 11(0) ib@7 = limitb@3
10 jump 15
@@ -698,8 +698,8 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@1 0
1 set i@2 1
-2 set [upper_bound]@3 a@0
-3 jump_if_not 11(11) i@2 <= [upper_bound]@3
+2 set [target_bound]@3 a@0
+3 jump_if_not 11(11) i@2 <= [target_bound]@3
4 set total@1 total@1 + 1000
5 jump_if_not 8(8) i@2 = 5
6 set i@2 i@2 + 1
@@ -735,11 +735,11 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@1 0
1 set i@2 1
-2 set [upper_bound]@3 a@0
-3 jump_if_not 16(16) i@2 <= [upper_bound]@3
+2 set [target_bound]@3 a@0
+3 jump_if_not 16(16) i@2 <= [target_bound]@3
4 set j@4 1
-5 set [upper_bound]@5 2
-6 jump_if_not 14(14) j@4 <= [upper_bound]@5
+5 set [target_bound]@5 2
+6 jump_if_not 14(14) j@4 <= [target_bound]@5
7 set total@1 total@1 + 1000
8 jump_if_not 11(11) i@2 = 5
9 set i@2 i@2 + 1
@@ -778,11 +778,11 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@1 0
1 set j@2 1
-2 set [upper_bound]@3 2
-3 jump_if_not 16(16) j@2 <= [upper_bound]@3
+2 set [target_bound]@3 2
+3 jump_if_not 16(16) j@2 <= [target_bound]@3
4 set i@4 1
-5 set [upper_bound]@5 a@0
-6 jump_if_not 14(14) i@4 <= [upper_bound]@5
+5 set [target_bound]@5 a@0
+6 jump_if_not 14(14) i@4 <= [target_bound]@5
7 set total@1 total@1 + 1000
8 jump_if_not 11(11) i@4 = 5
9 set i@4 i@4 + 1
@@ -814,8 +814,8 @@ SHOW FUNCTION CODE f1;
Pos Instruction
0 set total@1 0
1 set i@2 1
-2 set [upper_bound]@3 a@0
-3 jump_if_not 10(10) i@2 <= [upper_bound]@3
+2 set [target_bound]@3 a@0
+3 jump_if_not 10(10) i@2 <= [target_bound]@3
4 jump_if_not 7(0) i@2 = 5
5 set i@2 i@2 + 1
6 jump 3
diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result
index 093d52ba4e3..a60bbc38883 100644
--- a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result
+++ b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result
@@ -1479,3 +1479,28 @@ f1()
1
DROP FUNCTION f1;
DROP TABLE t1;
+#
+# MDEV-17278 CURSOR FOR LOOP - ERROR: unexpected end of stream, read 0 bytes (SERVER CRASH)
+#
+CREATE TABLE t1 (id2 int, id int, en1 enum('aaa','a','b','c'));
+INSERT INTO t1 VALUES(1,1,'aaa'),(2,2,'a'),(3,3,'b'),(4,4,'c');
+CREATE PROCEDURE p1()
+AS
+BEGIN
+FOR rec IN (SELECT en1 FROM t1)
+LOOP
+SELECT rec.en1;
+END LOOP;
+END;
+$$
+CALL p1();
+rec.en1
+aaa
+rec.en1
+a
+rec.en1
+b
+rec.en1
+c
+DROP PROCEDURE p1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor.result b/mysql-test/suite/compat/oracle/r/sp-cursor.result
index 03211509f8b..a09459ad7cd 100644
--- a/mysql-test/suite/compat/oracle/r/sp-cursor.result
+++ b/mysql-test/suite/compat/oracle/r/sp-cursor.result
@@ -459,7 +459,7 @@ CALL p1('b1');
msg
Fetched a record a=0
Warnings:
-Warning 1366 Incorrect integer value: 'b1' for column 'p_a' at row 1
+Warning 1366 Incorrect integer value: 'b1' for column ``.``.`p_a` at row 1
DROP PROCEDURE p1;
#
# One parameter in SELECT list + subselect
@@ -949,3 +949,31 @@ def c%FOUND 3 1 0 Y 32896 0 63
def c%ROWCOUNT 8 21 1 Y 32896 0 63
c%ISOPEN c%NOTFOUND c%FOUND c%ROWCOUNT
1 NULL NULL 0
+#
+# MDEV-17387 MariaDB Server giving wrong error while executing select query from procedure
+#
+CREATE TABLE t1
+(
+JOBN varchar(18) NOT NULL,
+pk int(11) NOT NULL,
+PRIMARY KEY (pk),
+KEY (JOBN)
+);
+CREATE PROCEDURE p1
+AS
+lS NUMBER(10) :=0;
+CURSOR cBPD IS SELECT * FROM t1 WHERE JOBN='x';
+BEGIN
+FOR lbpd IN cBPD LOOP
+lS:=lS+1;
+END LOOP;
+EXCEPTION
+WHEN OTHERS THEN
+BEGIN
+SELECT SQLERRM;
+END;
+END;
+$$
+CALL p1();
+DROP PROCEDURE p1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/r/sp-package-mdl.result b/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
index 18cc834461c..bb46341f202 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
@@ -61,8 +61,8 @@ TABLE_NAME pkg1.p1
CONN 2
INFO DROP PACKAGE pkg1
STATE Waiting for stored package body metadata lock
-LOCK_MODE MDL_INTENTION_EXCLUSIVE
-LOCK_TYPE Global read lock
+LOCK_MODE MDL_BACKUP_DDL
+LOCK_TYPE Backup lock
TABLE_NAME
CONN 2
INFO DROP PACKAGE pkg1
diff --git a/mysql-test/suite/compat/oracle/r/sp-package.result b/mysql-test/suite/compat/oracle/r/sp-package.result
index 1ea53daf43a..4f0f05b1939 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package.result
@@ -2878,3 +2878,51 @@ msg
This is p01
DROP PACKAGE pkg1;
DROP TABLE t1;
+#
+# MDEV-17387 MariaDB Server giving wrong error while executing select query from procedure
+#
+CREATE TABLE t1 (
+CTR varchar(2) NOT NULL,
+COR varchar(3) NOT NULL,
+DATE datetime NOT NULL,
+CHAN varchar(4) NOT NULL,
+CNO varchar(20) NOT NULL,
+JOBN varchar(18) NOT NULL,
+C1 varchar(30) DEFAULT NULL,
+C2 varchar(30) DEFAULT NULL,
+TIME datetime DEFAULT NULL,
+AMT decimal(12,2) DEFAULT NULL,
+DT datetime NOT NULL,
+pk int(11) NOT NULL,
+PRIMARY KEY (pk),
+KEY Indx1 (JOBN)
+);
+CREATE PACKAGE xyz IS
+PROCEDURE xyz123(ctr IN VARCHAR2,Jn IN VARCHAR2,R OUT VARCHAR2);
+END;
+$$
+CREATE OR REPLACE PACKAGE BODY xyz IS
+PROCEDURE xyz123(
+ctr IN VARCHAR2,
+Jn IN VARCHAR2,
+R OUT VARCHAR2)
+AS
+lS NUMBER(10) :=0;
+CURSOR cBPD IS
+SELECT CTR, COR, DATE, CHAN, CNO, C1, C2, TIME, AMT
+FROM t1 WHERE JOBN=Jn;
+BEGIN
+FOR lbpd IN cBPD
+LOOP
+lS:=lS+1;
+END LOOP;
+EXCEPTION
+WHEN OTHERS THEN
+BEGIN
+SELECT SQLERRM;
+END;
+END;
+END $$
+CALL xyz.xyz123(17,18,@R);
+DROP PACKAGE xyz;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result
index 5cdfd517562..6db999b238f 100644
--- a/mysql-test/suite/compat/oracle/r/sp.result
+++ b/mysql-test/suite/compat/oracle/r/sp.result
@@ -843,7 +843,7 @@ CREATE FUNCTION f1 (a INT, b INT) RETURN INT
AS
total INT := 0;
BEGIN
-FOR i IN REVERSE a..1
+FOR i IN REVERSE 1..a
LOOP
total:= total + i;
IF i = b THEN
@@ -2494,3 +2494,61 @@ BEGIN
SELECT 'a' IN ('b',v);
END $$
ERROR HY000: Illegal parameter data types varchar and row for operation 'in'
+#
+# MDEV-17253 Oracle compatibility: The REVERSE key word for FOR loop behaves incorrectly
+#
+DECLARE
+totalprice DECIMAL(12,2):=NULL;
+loop_start INTEGER := 1;
+BEGIN
+FOR idx IN REVERSE loop_start..10 LOOP
+SELECT idx;
+END LOOP;
+END;
+$$
+idx
+10
+idx
+9
+idx
+8
+idx
+7
+idx
+6
+idx
+5
+idx
+4
+idx
+3
+idx
+2
+idx
+1
+CREATE PROCEDURE p1 AS
+loop_start INTEGER := 1;
+BEGIN
+FOR idx IN REVERSE 3..loop_start LOOP
+SELECT idx;
+END LOOP;
+END;
+$$
+CALL p1();
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1 AS
+loop_start INTEGER := 1;
+BEGIN
+FOR idx IN REVERSE loop_start..3 LOOP
+SELECT idx;
+END LOOP;
+END;
+$$
+CALL p1();
+idx
+3
+idx
+2
+idx
+1
+DROP PROCEDURE p1;
diff --git a/mysql-test/suite/compat/oracle/r/versioning.result b/mysql-test/suite/compat/oracle/r/versioning.result
index ebedcf0f462..bbecfa1f6b1 100644
--- a/mysql-test/suite/compat/oracle/r/versioning.result
+++ b/mysql-test/suite/compat/oracle/r/versioning.result
@@ -14,3 +14,11 @@ SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
a
20
DROP TABLE t1;
+#
+# MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
+#
+SET SQL_MODE= ORACLE;
+CREATE TABLE t1 (a INT);
+DELETE HISTORY FROM t1;
+ERROR HY000: Table `t1` is not system-versioned
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/parser.test b/mysql-test/suite/compat/oracle/t/parser.test
index 86b6b270ccd..067fd9beb48 100644
--- a/mysql-test/suite/compat/oracle/t/parser.test
+++ b/mysql-test/suite/compat/oracle/t/parser.test
@@ -258,3 +258,157 @@ enable_prepare_warnings;
SELECT test.comment() FROM DUAL;
disable_prepare_warnings;
DROP FUNCTION comment;
+
+
+--echo #
+--echo # MDEV-17660 sql_mode=ORACLE: Some keywords do not work as label names: history, system, versioning, without
+--echo #
+
+DELIMITER /;
+BEGIN
+<<date_format>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN
+<<decode>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN
+<<history>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN
+<<system>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN
+<<versioning>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+DELIMITER /;
+BEGIN
+<<without>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+--echo #
+--echo # MDEV-17666 sql_mode=ORACLE: Keyword ELSEIF should not be reserved
+--echo #
+
+DELIMITER /;
+DECLARE
+ ELSEIF INT;
+BEGIN
+ ELSEIF:=1;
+END;
+/
+DELIMITER ;/
+
+DELIMITER /;
+BEGIN
+<<ELSEIF>>
+ NULL;
+END;
+/
+DELIMITER ;/
+
+
+--echo #
+--echo # MDEV-17693 Shift/reduce conflicts for NAMES,ROLE,PASSWORD in the option_value_no_option_type grammar
+--echo #
+
+CREATE TABLE names (names INT);
+SELECT names FROM names AS names;
+DROP TABLE names;
+
+CREATE TABLE password (password INT);
+SELECT password FROM password AS password;
+DROP TABLE password;
+
+CREATE TABLE role (role INT);
+SELECT role FROM role AS role;
+DROP TABLE role;
+
+DELIMITER $$;
+DECLARE
+ names VARCHAR(32) DEFAULT '[names]';
+ password VARCHAR(32) DEFAULT '[password]';
+ role VARCHAR(32) DEFAULT '[role]';
+BEGIN
+<<names>>
+ SELECT names;
+<<password>>
+ SELECT password;
+<<role>>
+ SELECT role;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_BAD_VAR_SHADOW
+DECLARE
+ names VARCHAR(32);
+BEGIN
+ SET names='[names]';
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+--error ER_SP_BAD_VAR_SHADOW
+DECLARE
+ password VARCHAR(32);
+BEGIN
+ SET password='[password]';
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+DECLARE
+ role VARCHAR(32);
+BEGIN
+ SET role='[role]';
+END;
+$$
+DELIMITER ;$$
+
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.names;
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.password;
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.role;
+
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/suite/compat/oracle/t/sp-code.test b/mysql-test/suite/compat/oracle/t/sp-code.test
index 9a1f64e54b4..ea66ed80d2a 100644
--- a/mysql-test/suite/compat/oracle/t/sp-code.test
+++ b/mysql-test/suite/compat/oracle/t/sp-code.test
@@ -470,7 +470,7 @@ CREATE FUNCTION f1 (a INT, b INT) RETURN INT
AS
total INT := 0;
BEGIN
- FOR i IN REVERSE a..1
+ FOR i IN REVERSE 1..a
LOOP
total:= total + i;
IF i = b THEN
diff --git a/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test b/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test
index 31e28d5c8de..ba0ca9b6a60 100644
--- a/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test
+++ b/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test
@@ -1572,3 +1572,26 @@ DELIMITER ;$$
SELECT f1();
DROP FUNCTION f1;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17278 CURSOR FOR LOOP - ERROR: unexpected end of stream, read 0 bytes (SERVER CRASH)
+--echo #
+
+CREATE TABLE t1 (id2 int, id int, en1 enum('aaa','a','b','c'));
+INSERT INTO t1 VALUES(1,1,'aaa'),(2,2,'a'),(3,3,'b'),(4,4,'c');
+
+DELIMITER $$;
+CREATE PROCEDURE p1()
+AS
+BEGIN
+ FOR rec IN (SELECT en1 FROM t1)
+ LOOP
+ SELECT rec.en1;
+ END LOOP;
+END;
+$$
+DELIMITER ;$$
+CALL p1();
+DROP PROCEDURE p1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/sp-cursor.test b/mysql-test/suite/compat/oracle/t/sp-cursor.test
index 5a8b7b69f67..03b8b016ee0 100644
--- a/mysql-test/suite/compat/oracle/t/sp-cursor.test
+++ b/mysql-test/suite/compat/oracle/t/sp-cursor.test
@@ -952,3 +952,38 @@ $$
DELIMITER ;$$
--enable_ps_protocol
--disable_metadata
+
+
+--echo #
+--echo # MDEV-17387 MariaDB Server giving wrong error while executing select query from procedure
+--echo #
+
+CREATE TABLE t1
+(
+ JOBN varchar(18) NOT NULL,
+ pk int(11) NOT NULL,
+ PRIMARY KEY (pk),
+ KEY (JOBN)
+);
+
+DELIMITER $$;
+CREATE PROCEDURE p1
+AS
+ lS NUMBER(10) :=0;
+ CURSOR cBPD IS SELECT * FROM t1 WHERE JOBN='x';
+BEGIN
+ FOR lbpd IN cBPD LOOP
+ lS:=lS+1;
+ END LOOP;
+EXCEPTION
+ WHEN OTHERS THEN
+ BEGIN
+ SELECT SQLERRM;
+ END;
+END;
+$$
+DELIMITER ;$$
+
+CALL p1();
+DROP PROCEDURE p1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/sp-package.test b/mysql-test/suite/compat/oracle/t/sp-package.test
index e61dd37467c..04357a7487a 100644
--- a/mysql-test/suite/compat/oracle/t/sp-package.test
+++ b/mysql-test/suite/compat/oracle/t/sp-package.test
@@ -2624,3 +2624,60 @@ DELIMITER ;$$
CALL pkg1.p00;
DROP PACKAGE pkg1;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-17387 MariaDB Server giving wrong error while executing select query from procedure
+--echo #
+
+CREATE TABLE t1 (
+ CTR varchar(2) NOT NULL,
+ COR varchar(3) NOT NULL,
+ DATE datetime NOT NULL,
+ CHAN varchar(4) NOT NULL,
+ CNO varchar(20) NOT NULL,
+ JOBN varchar(18) NOT NULL,
+ C1 varchar(30) DEFAULT NULL,
+ C2 varchar(30) DEFAULT NULL,
+ TIME datetime DEFAULT NULL,
+ AMT decimal(12,2) DEFAULT NULL,
+ DT datetime NOT NULL,
+ pk int(11) NOT NULL,
+ PRIMARY KEY (pk),
+ KEY Indx1 (JOBN)
+);
+
+DELIMITER $$;
+
+CREATE PACKAGE xyz IS
+ PROCEDURE xyz123(ctr IN VARCHAR2,Jn IN VARCHAR2,R OUT VARCHAR2);
+END;
+$$
+
+CREATE OR REPLACE PACKAGE BODY xyz IS
+ PROCEDURE xyz123(
+ ctr IN VARCHAR2,
+ Jn IN VARCHAR2,
+ R OUT VARCHAR2)
+ AS
+ lS NUMBER(10) :=0;
+ CURSOR cBPD IS
+ SELECT CTR, COR, DATE, CHAN, CNO, C1, C2, TIME, AMT
+ FROM t1 WHERE JOBN=Jn;
+ BEGIN
+ FOR lbpd IN cBPD
+ LOOP
+ lS:=lS+1;
+ END LOOP;
+ EXCEPTION
+ WHEN OTHERS THEN
+ BEGIN
+ SELECT SQLERRM;
+ END;
+ END;
+END $$
+DELIMITER ;$$
+
+CALL xyz.xyz123(17,18,@R);
+DROP PACKAGE xyz;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test
index de2a4a5e4e7..96b4cd59fbd 100644
--- a/mysql-test/suite/compat/oracle/t/sp.test
+++ b/mysql-test/suite/compat/oracle/t/sp.test
@@ -918,7 +918,7 @@ CREATE FUNCTION f1 (a INT, b INT) RETURN INT
AS
total INT := 0;
BEGIN
- FOR i IN REVERSE a..1
+ FOR i IN REVERSE 1..a
LOOP
total:= total + i;
IF i = b THEN
@@ -2344,3 +2344,46 @@ BEGIN
END $$
DELIMITER ;$$
+--echo #
+--echo # MDEV-17253 Oracle compatibility: The REVERSE key word for FOR loop behaves incorrectly
+--echo #
+
+DELIMITER $$;
+DECLARE
+ totalprice DECIMAL(12,2):=NULL;
+ loop_start INTEGER := 1;
+BEGIN
+ FOR idx IN REVERSE loop_start..10 LOOP
+ SELECT idx;
+ END LOOP;
+END;
+$$
+DELIMITER ;$$
+
+
+DELIMITER $$;
+CREATE PROCEDURE p1 AS
+ loop_start INTEGER := 1;
+BEGIN
+ FOR idx IN REVERSE 3..loop_start LOOP
+ SELECT idx;
+ END LOOP;
+END;
+$$
+DELIMITER ;$$
+CALL p1();
+DROP PROCEDURE p1;
+
+
+DELIMITER $$;
+CREATE PROCEDURE p1 AS
+ loop_start INTEGER := 1;
+BEGIN
+ FOR idx IN REVERSE loop_start..3 LOOP
+ SELECT idx;
+ END LOOP;
+END;
+$$
+DELIMITER ;$$
+CALL p1();
+DROP PROCEDURE p1;
diff --git a/mysql-test/suite/compat/oracle/t/versioning.test b/mysql-test/suite/compat/oracle/t/versioning.test
index d70058c56e4..abcca8c588a 100644
--- a/mysql-test/suite/compat/oracle/t/versioning.test
+++ b/mysql-test/suite/compat/oracle/t/versioning.test
@@ -11,3 +11,13 @@ INSERT INTO t1 VALUES (20);
SELECT * FROM t1 FOR SYSTEM_TIME ALL;
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17959 Assertion `opt_bootstrap || mysql_parse_status || thd->lex->select_stack_top == 0' failed in parse_sql upon DELETE HISTORY under ORACLE mode
+--echo #
+
+SET SQL_MODE= ORACLE;
+CREATE TABLE t1 (a INT);
+--error ER_VERS_NOT_VERSIONED
+DELETE HISTORY FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/csv/flush.result b/mysql-test/suite/csv/flush.result
new file mode 100644
index 00000000000..b0b9b21bd0a
--- /dev/null
+++ b/mysql-test/suite/csv/flush.result
@@ -0,0 +1,25 @@
+CREATE TABLE t1(a INT NOT NULL) ENGINE=csv;
+INSERT INTO t1 VALUES(1);
+connect con1, localhost, root;
+LOCK TABLE t1 READ;
+connection default;
+FLUSH TABLES WITH READ LOCK;
+UNLOCK TABLES;
+# Must return 1 row
+SELECT * FROM t2;
+a
+1
+SELECT * FROM t1;
+a
+1
+connection con1;
+UNLOCK TABLES;
+connection default;
+INSERT INTO t2 VALUES(2);
+INSERT INTO t2 VALUES(2);
+SELECT * from t1,t2;
+a a
+1 1
+1 2
+1 2
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/csv/flush.test b/mysql-test/suite/csv/flush.test
new file mode 100644
index 00000000000..934ac26f291
--- /dev/null
+++ b/mysql-test/suite/csv/flush.test
@@ -0,0 +1,30 @@
+--source include/have_csv.inc
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+CREATE TABLE t1(a INT NOT NULL) ENGINE=csv;
+INSERT INTO t1 VALUES(1);
+# works correct if uncommented
+#FLUSH TABLE t1;
+
+connect(con1, localhost, root);
+LOCK TABLE t1 READ;
+
+connection default;
+FLUSH TABLES WITH READ LOCK;
+copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/t2.frm;
+copy_file $MYSQLD_DATADIR/test/t1.CSV $MYSQLD_DATADIR/test/t2.CSV;
+copy_file $MYSQLD_DATADIR/test/t1.CSM $MYSQLD_DATADIR/test/t2.CSM;
+UNLOCK TABLES;
+--echo # Must return 1 row
+SELECT * FROM t2;
+SELECT * FROM t1;
+connection con1;
+UNLOCK TABLES;
+
+connection default;
+
+INSERT INTO t2 VALUES(2);
+INSERT INTO t2 VALUES(2);
+SELECT * from t1,t2;
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/encryption/disabled.def b/mysql-test/suite/encryption/disabled.def
index d92d3495cb8..746faf49873 100644
--- a/mysql-test/suite/encryption/disabled.def
+++ b/mysql-test/suite/encryption/disabled.def
@@ -12,3 +12,4 @@
innodb_scrub : MDEV-8139 scrubbing does not work reliably
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
+innodb-redo-badkey : MDEV-13893/MDEV-12699 fix recovery of corrupted pages
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index 179be43cc41..5812ff6dce9 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -3,6 +3,7 @@ call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
# Start server with keys2.txt
SET GLOBAL innodb_file_per_table = ON;
diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
index cca3b9ad686..afb79dbad8a 100644
--- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
+++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
@@ -58,31 +58,6 @@ tpe_crc32.cfg
tpe_crc32.frm
tpe_crc32.ibd
UNLOCK TABLES;
-SET GLOBAL innodb_checksum_algorithm=strict_crc32;
-ALTER TABLE tce_crc32 DISCARD TABLESPACE;
-ALTER TABLE tc_crc32 DISCARD TABLESPACE;
-ALTER TABLE te_crc32 DISCARD TABLESPACE;
-ALTER TABLE t_crc32 DISCARD TABLESPACE;
-ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
-ALTER TABLE tp_crc32 DISCARD TABLESPACE;
-restore: tce_crc32 .ibd and .cfg files
-restore: tc_crc32 .ibd and .cfg files
-restore: te_crc32 .ibd and .cfg files
-restore: t_crc32 .ibd and .cfg files
-restore: tpe_crc32 .ibd and .cfg files
-restore: tp_crc32 .ibd and .cfg files
-ALTER TABLE tce_crc32 IMPORT TABLESPACE;
-update tce_crc32 set b=substr(b,1);
-ALTER TABLE tc_crc32 IMPORT TABLESPACE;
-update tc_crc32 set b=substr(b,1);
-ALTER TABLE te_crc32 IMPORT TABLESPACE;
-update te_crc32 set b=substr(b,1);
-ALTER TABLE t_crc32 IMPORT TABLESPACE;
-update t_crc32 set b=substr(b,1);
-ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
-update tpe_crc32 set b=substr(b,1);
-ALTER TABLE tp_crc32 IMPORT TABLESPACE;
-update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=crc32;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
@@ -108,31 +83,6 @@ ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
-SET GLOBAL innodb_checksum_algorithm=strict_innodb;
-ALTER TABLE tce_crc32 DISCARD TABLESPACE;
-ALTER TABLE tc_crc32 DISCARD TABLESPACE;
-ALTER TABLE te_crc32 DISCARD TABLESPACE;
-ALTER TABLE t_crc32 DISCARD TABLESPACE;
-ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
-ALTER TABLE tp_crc32 DISCARD TABLESPACE;
-restore: tce_crc32 .ibd and .cfg files
-restore: tc_crc32 .ibd and .cfg files
-restore: te_crc32 .ibd and .cfg files
-restore: t_crc32 .ibd and .cfg files
-restore: tpe_crc32 .ibd and .cfg files
-restore: tp_crc32 .ibd and .cfg files
-ALTER TABLE tce_crc32 IMPORT TABLESPACE;
-update tce_crc32 set b=substr(b,1);
-ALTER TABLE tc_crc32 IMPORT TABLESPACE;
-update tc_crc32 set b=substr(b,1);
-ALTER TABLE te_crc32 IMPORT TABLESPACE;
-update te_crc32 set b=substr(b,1);
-ALTER TABLE t_crc32 IMPORT TABLESPACE;
-update t_crc32 set b=substr(b,1);
-ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
-update tpe_crc32 set b=substr(b,1);
-ALTER TABLE tp_crc32 IMPORT TABLESPACE;
-update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
@@ -158,31 +108,6 @@ ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
-SET GLOBAL innodb_checksum_algorithm=strict_none;
-ALTER TABLE tce_crc32 DISCARD TABLESPACE;
-ALTER TABLE tc_crc32 DISCARD TABLESPACE;
-ALTER TABLE te_crc32 DISCARD TABLESPACE;
-ALTER TABLE t_crc32 DISCARD TABLESPACE;
-ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
-ALTER TABLE tp_crc32 DISCARD TABLESPACE;
-restore: tce_crc32 .ibd and .cfg files
-restore: tc_crc32 .ibd and .cfg files
-restore: te_crc32 .ibd and .cfg files
-restore: t_crc32 .ibd and .cfg files
-restore: tpe_crc32 .ibd and .cfg files
-restore: tp_crc32 .ibd and .cfg files
-ALTER TABLE tce_crc32 IMPORT TABLESPACE;
-update tce_crc32 set b=substr(b,1);
-ALTER TABLE tc_crc32 IMPORT TABLESPACE;
-update tc_crc32 set b=substr(b,1);
-ALTER TABLE te_crc32 IMPORT TABLESPACE;
-update te_crc32 set b=substr(b,1);
-ALTER TABLE t_crc32 IMPORT TABLESPACE;
-update t_crc32 set b=substr(b,1);
-ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
-update tpe_crc32 set b=substr(b,1);
-ALTER TABLE tp_crc32 IMPORT TABLESPACE;
-update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
@@ -268,31 +193,6 @@ tpe_innodb.cfg
tpe_innodb.frm
tpe_innodb.ibd
UNLOCK TABLES;
-SET GLOBAL innodb_checksum_algorithm=strict_crc32;
-ALTER TABLE tce_innodb DISCARD TABLESPACE;
-ALTER TABLE tc_innodb DISCARD TABLESPACE;
-ALTER TABLE te_innodb DISCARD TABLESPACE;
-ALTER TABLE t_innodb DISCARD TABLESPACE;
-ALTER TABLE tpe_innodb DISCARD TABLESPACE;
-ALTER TABLE tp_innodb DISCARD TABLESPACE;
-restore: tce_innodb .ibd and .cfg files
-restore: tc_innodb .ibd and .cfg files
-restore: te_innodb .ibd and .cfg files
-restore: t_innodb .ibd and .cfg files
-restore: tpe_innodb .ibd and .cfg files
-restore: tp_innodb .ibd and .cfg files
-ALTER TABLE tce_innodb IMPORT TABLESPACE;
-update tce_innodb set b=substr(b,1);
-ALTER TABLE tc_innodb IMPORT TABLESPACE;
-update tc_innodb set b=substr(b,1);
-ALTER TABLE te_innodb IMPORT TABLESPACE;
-update te_innodb set b=substr(b,1);
-ALTER TABLE t_innodb IMPORT TABLESPACE;
-update t_innodb set b=substr(b,1);
-ALTER TABLE tpe_innodb IMPORT TABLESPACE;
-update tpe_innodb set b=substr(b,1);
-ALTER TABLE tp_innodb IMPORT TABLESPACE;
-update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=crc32;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
@@ -318,31 +218,6 @@ ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
-SET GLOBAL innodb_checksum_algorithm=strict_innodb;
-ALTER TABLE tce_innodb DISCARD TABLESPACE;
-ALTER TABLE tc_innodb DISCARD TABLESPACE;
-ALTER TABLE te_innodb DISCARD TABLESPACE;
-ALTER TABLE t_innodb DISCARD TABLESPACE;
-ALTER TABLE tpe_innodb DISCARD TABLESPACE;
-ALTER TABLE tp_innodb DISCARD TABLESPACE;
-restore: tce_innodb .ibd and .cfg files
-restore: tc_innodb .ibd and .cfg files
-restore: te_innodb .ibd and .cfg files
-restore: t_innodb .ibd and .cfg files
-restore: tpe_innodb .ibd and .cfg files
-restore: tp_innodb .ibd and .cfg files
-ALTER TABLE tce_innodb IMPORT TABLESPACE;
-update tce_innodb set b=substr(b,1);
-ALTER TABLE tc_innodb IMPORT TABLESPACE;
-update tc_innodb set b=substr(b,1);
-ALTER TABLE te_innodb IMPORT TABLESPACE;
-update te_innodb set b=substr(b,1);
-ALTER TABLE t_innodb IMPORT TABLESPACE;
-update t_innodb set b=substr(b,1);
-ALTER TABLE tpe_innodb IMPORT TABLESPACE;
-update tpe_innodb set b=substr(b,1);
-ALTER TABLE tp_innodb IMPORT TABLESPACE;
-update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
@@ -368,31 +243,6 @@ ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
-SET GLOBAL innodb_checksum_algorithm=strict_none;
-ALTER TABLE tce_innodb DISCARD TABLESPACE;
-ALTER TABLE tc_innodb DISCARD TABLESPACE;
-ALTER TABLE te_innodb DISCARD TABLESPACE;
-ALTER TABLE t_innodb DISCARD TABLESPACE;
-ALTER TABLE tpe_innodb DISCARD TABLESPACE;
-ALTER TABLE tp_innodb DISCARD TABLESPACE;
-restore: tce_innodb .ibd and .cfg files
-restore: tc_innodb .ibd and .cfg files
-restore: te_innodb .ibd and .cfg files
-restore: t_innodb .ibd and .cfg files
-restore: tpe_innodb .ibd and .cfg files
-restore: tp_innodb .ibd and .cfg files
-ALTER TABLE tce_innodb IMPORT TABLESPACE;
-update tce_innodb set b=substr(b,1);
-ALTER TABLE tc_innodb IMPORT TABLESPACE;
-update tc_innodb set b=substr(b,1);
-ALTER TABLE te_innodb IMPORT TABLESPACE;
-update te_innodb set b=substr(b,1);
-ALTER TABLE t_innodb IMPORT TABLESPACE;
-update t_innodb set b=substr(b,1);
-ALTER TABLE tpe_innodb IMPORT TABLESPACE;
-update tpe_innodb set b=substr(b,1);
-ALTER TABLE tp_innodb IMPORT TABLESPACE;
-update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
@@ -478,31 +328,6 @@ tpe_none.cfg
tpe_none.frm
tpe_none.ibd
UNLOCK TABLES;
-SET GLOBAL innodb_checksum_algorithm=strict_crc32;
-ALTER TABLE tce_none DISCARD TABLESPACE;
-ALTER TABLE tc_none DISCARD TABLESPACE;
-ALTER TABLE te_none DISCARD TABLESPACE;
-ALTER TABLE t_none DISCARD TABLESPACE;
-ALTER TABLE tpe_none DISCARD TABLESPACE;
-ALTER TABLE tp_none DISCARD TABLESPACE;
-restore: tce_none .ibd and .cfg files
-restore: tc_none .ibd and .cfg files
-restore: te_none .ibd and .cfg files
-restore: t_none .ibd and .cfg files
-restore: tpe_none .ibd and .cfg files
-restore: tp_none .ibd and .cfg files
-ALTER TABLE tce_none IMPORT TABLESPACE;
-update tce_none set b=substr(b,1);
-ALTER TABLE tc_none IMPORT TABLESPACE;
-update tc_none set b=substr(b,1);
-ALTER TABLE te_none IMPORT TABLESPACE;
-update te_none set b=substr(b,1);
-ALTER TABLE t_none IMPORT TABLESPACE;
-update t_none set b=substr(b,1);
-ALTER TABLE tpe_none IMPORT TABLESPACE;
-update tpe_none set b=substr(b,1);
-ALTER TABLE tp_none IMPORT TABLESPACE;
-update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=crc32;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
@@ -528,31 +353,6 @@ ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
-SET GLOBAL innodb_checksum_algorithm=strict_innodb;
-ALTER TABLE tce_none DISCARD TABLESPACE;
-ALTER TABLE tc_none DISCARD TABLESPACE;
-ALTER TABLE te_none DISCARD TABLESPACE;
-ALTER TABLE t_none DISCARD TABLESPACE;
-ALTER TABLE tpe_none DISCARD TABLESPACE;
-ALTER TABLE tp_none DISCARD TABLESPACE;
-restore: tce_none .ibd and .cfg files
-restore: tc_none .ibd and .cfg files
-restore: te_none .ibd and .cfg files
-restore: t_none .ibd and .cfg files
-restore: tpe_none .ibd and .cfg files
-restore: tp_none .ibd and .cfg files
-ALTER TABLE tce_none IMPORT TABLESPACE;
-update tce_none set b=substr(b,1);
-ALTER TABLE tc_none IMPORT TABLESPACE;
-update tc_none set b=substr(b,1);
-ALTER TABLE te_none IMPORT TABLESPACE;
-update te_none set b=substr(b,1);
-ALTER TABLE t_none IMPORT TABLESPACE;
-update t_none set b=substr(b,1);
-ALTER TABLE tpe_none IMPORT TABLESPACE;
-update tpe_none set b=substr(b,1);
-ALTER TABLE tp_none IMPORT TABLESPACE;
-update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
@@ -578,31 +378,6 @@ ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
-SET GLOBAL innodb_checksum_algorithm=strict_none;
-ALTER TABLE tce_none DISCARD TABLESPACE;
-ALTER TABLE tc_none DISCARD TABLESPACE;
-ALTER TABLE te_none DISCARD TABLESPACE;
-ALTER TABLE t_none DISCARD TABLESPACE;
-ALTER TABLE tpe_none DISCARD TABLESPACE;
-ALTER TABLE tp_none DISCARD TABLESPACE;
-restore: tce_none .ibd and .cfg files
-restore: tc_none .ibd and .cfg files
-restore: te_none .ibd and .cfg files
-restore: t_none .ibd and .cfg files
-restore: tpe_none .ibd and .cfg files
-restore: tp_none .ibd and .cfg files
-ALTER TABLE tce_none IMPORT TABLESPACE;
-update tce_none set b=substr(b,1);
-ALTER TABLE tc_none IMPORT TABLESPACE;
-update tc_none set b=substr(b,1);
-ALTER TABLE te_none IMPORT TABLESPACE;
-update te_none set b=substr(b,1);
-ALTER TABLE t_none IMPORT TABLESPACE;
-update t_none set b=substr(b,1);
-ALTER TABLE tpe_none IMPORT TABLESPACE;
-update tpe_none set b=substr(b,1);
-ALTER TABLE tp_none IMPORT TABLESPACE;
-update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
index 1d5b88bc750..995360a5744 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
@@ -77,7 +77,6 @@ t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-DROP TABLE t2;
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
ERROR HY000: Can't create table `test`.`t3` (errno: 140 "Wrong create options")
SHOW WARNINGS;
@@ -85,3 +84,30 @@ Level Code Message
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
Error 1005 Can't create table `test`.`t3` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+FLUSH TABLES;
+create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes;
+insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8);
+insert into t1 select * from t1;
+BEGIN;
+INSERT INTO t2 VALUES (1);
+connect con1, localhost, root;
+SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL done WAIT_FOR ever';
+alter table t1 force;
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR done';
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+COMMIT;
+disconnect con1;
+select * from t1;
+f1 f2
+1 2
+2 3
+4 5
+5 6
+7 8
+1 2
+2 3
+4 5
+5 6
+7 8
+drop table t1,t2;
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index d8d37ba7493..94b47103dd0 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -1,6 +1,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
create table t5 (
`intcol1` int(32) DEFAULT NULL,
diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
index 4c8ee2ef4de..13c38f1587d 100644
--- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result
+++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
@@ -1,6 +1,5 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
-call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
-call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=3221342974");
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
# Create and populate tables to be corrupted
diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result
index 32ae29ca76b..6f4a45d817a 100644
--- a/mysql-test/suite/encryption/r/innodb-missing-key.result
+++ b/mysql-test/suite/encryption/r/innodb-missing-key.result
@@ -1,6 +1,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
# Start server with keys2.txt
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
CREATE TABLE t2(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index 5c424d8752b..a832880c494 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -13,6 +13,7 @@ call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
--echo # Start server with keys2.txt
diff --git a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test
index 7eaa1bd64c6..c9a4a9e1b92 100644
--- a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test
+++ b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test
@@ -65,17 +65,14 @@ EOF
--list_files $MYSQLD_DATADIR/test
UNLOCK TABLES;
-let $to = 6;
+let $to = 3;
while ($to)
{
dec $to;
let $tocksum = `select case $to
when 0 then 'none'
- when 1 then 'strict_none'
- when 2 then 'innodb'
- when 3 then 'strict_innodb'
- when 4 then 'crc32'
- when 5 then 'strict_crc32'
+ when 1 then 'innodb'
+ when 2 then 'crc32'
end`;
eval SET GLOBAL innodb_checksum_algorithm=$tocksum;
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index e8391d97d6c..a6a4dbaff9b 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -1,13 +1,12 @@
-- source include/have_innodb.inc
+-- source include/have_debug.inc
+-- source include/have_debug_sync.inc
-- source include/have_file_key_management_plugin.inc
#
# MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
#
-let $encrypt_tables = `SELECT @@innodb_encrypt_tables`;
-let $threads = `SELECT @@innodb_encryption_threads`;
-
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
@@ -99,14 +98,35 @@ ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
SHOW WARNINGS;
SHOW CREATE TABLE t2;
-DROP TABLE t2;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
SHOW WARNINGS;
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables;
-EVAL SET GLOBAL innodb_encryption_threads = $threads;
---enable_query_log
+FLUSH TABLES;
+
+create table t1(f1 int not null, f2 int not null)engine=innodb encrypted=yes;
+insert into t1 values(1, 2), (2, 3), (4, 5), (5, 6), (7, 8);
+insert into t1 select * from t1;
+BEGIN;
+INSERT INTO t2 VALUES (1);
+
+connect con1, localhost, root;
+SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL done WAIT_FOR ever';
+send alter table t1 force;
+
+connection default;
+SET DEBUG_SYNC = 'now WAIT_FOR done';
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
+COMMIT;
+
+--let $shutdown_timeout= 0
+--source include/restart_mysqld.inc
+disconnect con1;
+
+select * from t1;
+drop table t1,t2;
+
+# Work around missing crash recovery at the SQL layer.
+let $datadir= `select @@datadir`;
+--remove_files_wildcard $datadir/test #sql-*.frm
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index 0994078788e..6d6f1c40d4c 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -10,6 +10,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
index 2ec4960af4c..6c775dbf733 100644
--- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test
+++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
@@ -8,8 +8,7 @@
-- source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
-call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
-call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=3221342974");
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
@@ -51,17 +50,17 @@ perl;
open(FILE, "+<", "$ENV{MYSQLD_DATADIR}/test/t1.ibd") or die "open";
binmode FILE;
seek(FILE, $ENV{'INNODB_PAGE_SIZE'} * 3 + 26, SEEK_SET) or die "seek";
-print FILE pack("H*", "c00lcafedeadb017");
+print FILE pack("H*", "c001cafedeadb017");
close FILE or die "close";
open(FILE, "+<", "$ENV{MYSQLD_DATADIR}/test/t2.ibd") or die "open";
binmode FILE;
seek(FILE, $ENV{'INNODB_PAGE_SIZE'} * 3 + 26, SEEK_SET) or die "seek";
-print FILE pack("H*", "c00lcafedeadb017");
+print FILE pack("H*", "c001cafedeadb017");
close FILE or die "close";
open(FILE, "+<", "$ENV{MYSQLD_DATADIR}/test/t3.ibd") or die "open";
binmode FILE;
seek(FILE, $ENV{'INNODB_PAGE_SIZE'} * 3 + 26, SEEK_SET) or die "seek";
-print FILE pack("H*", "c00lcafedeadb017");
+print FILE pack("H*", "c001cafedeadb017");
close FILE or die "close";
EOF
diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test
index cf851a54def..c2a73d594b4 100644
--- a/mysql-test/suite/encryption/t/innodb-missing-key.test
+++ b/mysql-test/suite/encryption/t/innodb-missing-key.test
@@ -10,6 +10,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
+call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
diff --git a/mysql-test/suite/engines/funcs/r/an_calendar.result b/mysql-test/suite/engines/funcs/r/an_calendar.result
index f057c3b618f..669b097b325 100644
--- a/mysql-test/suite/engines/funcs/r/an_calendar.result
+++ b/mysql-test/suite/engines/funcs/r/an_calendar.result
@@ -11,6 +11,7 @@ Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c2' at row 1
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL);
@@ -25,6 +26,7 @@ Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c2' at row 1
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DATETIME NULL, c2 DATETIME NULL);
@@ -33,6 +35,7 @@ INSERT INTO t1 VALUES(NOW(),NOW());
INSERT INTO t1 VALUES(NOW(),NOW());
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 TIMESTAMP NULL, c2 TIMESTAMP NULL);
@@ -41,5 +44,6 @@ INSERT INTO t1 VALUES(NOW(),NOW());
INSERT INTO t1 VALUES(NOW(),NOW());
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/r/an_number.result b/mysql-test/suite/engines/funcs/r/an_number.result
index a77fc0e7d69..257213d0bf8 100644
--- a/mysql-test/suite/engines/funcs/r/an_number.result
+++ b/mysql-test/suite/engines/funcs/r/an_number.result
@@ -4,6 +4,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 SMALLINT NULL, c2 SMALLINT NULL);
@@ -11,6 +12,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 MEDIUMINT NULL, c2 MEDIUMINT NULL);
@@ -18,6 +20,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 INT NULL, c2 INT NULL);
@@ -25,6 +28,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 INTEGER NULL, c2 INTEGER NULL);
@@ -32,6 +36,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 BIGINT NULL, c2 BIGINT NULL);
@@ -39,6 +44,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DECIMAL NULL, c2 DECIMAL NULL);
@@ -46,6 +52,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DEC NULL, c2 DEC NULL);
@@ -53,6 +60,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 FIXED NULL, c2 FIXED NULL);
@@ -60,6 +68,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 NUMERIC NULL, c2 NUMERIC NULL);
@@ -67,6 +76,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DOUBLE NULL, c2 DOUBLE NULL);
@@ -74,6 +84,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 REAL NULL, c2 REAL NULL);
@@ -81,6 +92,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 DOUBLE PRECISION NULL, c2 DOUBLE PRECISION NULL);
@@ -88,6 +100,7 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 FLOAT NULL, c2 FLOAT NULL);
@@ -95,5 +108,6 @@ INSERT INTO t1 VALUES(1,2);
INSERT INTO t1 VALUES(3,4);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/r/an_string.result b/mysql-test/suite/engines/funcs/r/an_string.result
index c7762155a7d..f3e7eaedb15 100644
--- a/mysql-test/suite/engines/funcs/r/an_string.result
+++ b/mysql-test/suite/engines/funcs/r/an_string.result
@@ -4,6 +4,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(100) NULL, c2 VARCHAR(100) NULL);
@@ -11,6 +12,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 BINARY(100) NULL, c2 BINARY(100) NULL);
@@ -18,6 +20,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 VARBINARY(100) NULL, c2 VARBINARY(100) NULL);
@@ -25,6 +28,7 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 BLOB(100) NULL, c2 BLOB(100) NULL);
@@ -32,6 +36,9 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c1'
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c2'
test.t1 analyze status OK
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT(100) NULL, c2 TEXT(100) NULL);
@@ -39,5 +46,8 @@ INSERT INTO t1 VALUES('abc','ABCDEFG');
INSERT INTO t1 VALUES('123','1234567890');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c1'
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c2'
test.t1 analyze status OK
DROP TABLE t1;
diff --git a/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result b/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result
index 53964697506..b1c46a3a398 100644
--- a/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result
+++ b/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result
@@ -7,7 +7,7 @@ INSERT INTO t4 (c1) VALUES(0);
INSERT INTO t4 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t4 (c1) VALUES('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t4`.`c1` at row 1
INSERT INTO t4 (c1) VALUES('9');
SELECT COUNT(c1) AS total_rows FROM t4;
total_rows
@@ -26,7 +26,7 @@ INSERT INTO t4 (c1) VALUES(0);
INSERT INTO t4 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t4 (c1) VALUES('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t4`.`c1` at row 1
INSERT INTO t4 (c1) VALUES('9');
SELECT COUNT(c1) AS total_rows FROM t4;
total_rows
@@ -45,7 +45,7 @@ INSERT INTO t4 (c1) VALUES(0);
INSERT INTO t4 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t4 (c1) VALUES('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t4`.`c1` at row 1
INSERT INTO t4 (c1) VALUES('9');
SELECT COUNT(c1) AS total_rows FROM t4;
total_rows
@@ -64,7 +64,7 @@ INSERT INTO t4 (c1) VALUES(0);
INSERT INTO t4 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t4 (c1) VALUES('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t4`.`c1` at row 1
INSERT INTO t4 (c1) VALUES('9');
SELECT COUNT(c1) AS total_rows FROM t4;
total_rows
@@ -83,7 +83,7 @@ INSERT INTO t4 (c1) VALUES(0);
INSERT INTO t4 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t4 (c1) VALUES('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t4`.`c1` at row 1
INSERT INTO t4 (c1) VALUES('9');
SELECT COUNT(c1) AS total_rows FROM t4;
total_rows
@@ -102,7 +102,7 @@ INSERT INTO t4 (c1) VALUES(0);
INSERT INTO t4 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t4 (c1) VALUES('x');
-ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t4`.`c1` at row 1
INSERT INTO t4 (c1) VALUES('9');
SELECT COUNT(c1) AS total_rows FROM t4;
total_rows
diff --git a/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result b/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result
index 62ad9a568f9..0c9ae5453e3 100644
--- a/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result
+++ b/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result
@@ -7,7 +7,7 @@ INSERT INTO t5 (c1) VALUES(0);
INSERT INTO t5 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t5 (c1) VALUES('x');
-ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
INSERT INTO t5 (c1) VALUES(999999);
ERROR 22003: Out of range value for column 'c1' at row 1
SELECT COUNT(c1) AS total_rows FROM t5;
@@ -27,7 +27,7 @@ INSERT INTO t5 (c1) VALUES(0);
INSERT INTO t5 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t5 (c1) VALUES('x');
-ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
INSERT INTO t5 (c1) VALUES(999999);
ERROR 22003: Out of range value for column 'c1' at row 1
SELECT COUNT(c1) AS total_rows FROM t5;
@@ -47,7 +47,7 @@ INSERT INTO t5 (c1) VALUES(0);
INSERT INTO t5 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t5 (c1) VALUES('x');
-ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
INSERT INTO t5 (c1) VALUES(999999);
ERROR 22003: Out of range value for column 'c1' at row 1
SELECT COUNT(c1) AS total_rows FROM t5;
@@ -67,7 +67,7 @@ INSERT INTO t5 (c1) VALUES(0);
INSERT INTO t5 (c1) VALUES(-1);
ERROR 22003: Out of range value for column 'c1' at row 1
INSERT INTO t5 (c1) VALUES('x');
-ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1
+ERROR 22007: Incorrect decimal value: 'x' for column `test`.`t5`.`c1` at row 1
INSERT INTO t5 (c1) VALUES(999999);
ERROR 22003: Out of range value for column 'c1' at row 1
SELECT COUNT(c1) AS total_rows FROM t5;
diff --git a/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result b/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
index 884408d29b3..52a8b2de642 100644
--- a/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
+++ b/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
@@ -33,6 +33,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p5` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 ANALYZE PARTITION p1,p2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 ORDER BY c1;
c1 c2
diff --git a/mysql-test/suite/engines/iuds/r/insert_decimal.result b/mysql-test/suite/engines/iuds/r/insert_decimal.result
index a341de58946..860fa8a2c4c 100644
--- a/mysql-test/suite/engines/iuds/r/insert_decimal.result
+++ b/mysql-test/suite/engines/iuds/r/insert_decimal.result
@@ -110,15 +110,15 @@ Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
Warning 1264 Out of range value for column 'c2' at row 1
Warning 1264 Out of range value for column 'c3' at row 1
-Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'c1' at row 2
-Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'c2' at row 2
-Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'c3' at row 2
+Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column `test`.`t2`.`c1` at row 2
+Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column `test`.`t2`.`c2` at row 2
+Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column `test`.`t2`.`c3` at row 2
Note 1265 Data truncated for column 'c1' at row 3
Note 1265 Data truncated for column 'c2' at row 3
Note 1265 Data truncated for column 'c3' at row 3
-Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'c1' at row 4
-Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'c2' at row 4
-Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'c3' at row 4
+Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column `test`.`t2`.`c1` at row 4
+Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column `test`.`t2`.`c2` at row 4
+Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column `test`.`t2`.`c3` at row 4
SELECT * FROM t1;
c1 c2 c3 c4
0.00000 -0.10000 0 13
diff --git a/mysql-test/suite/engines/iuds/r/insert_number.result b/mysql-test/suite/engines/iuds/r/insert_number.result
index b70c39341ad..564ce8d3401 100644
--- a/mysql-test/suite/engines/iuds/r/insert_number.result
+++ b/mysql-test/suite/engines/iuds/r/insert_number.result
@@ -12,16 +12,16 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
INSERT IGNORE INTO t1 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT IGNORE INTO t2 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c2` at row 1
INSERT IGNORE INTO t3 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c2` at row 1
INSERT IGNORE INTO t1 VALUES(-1,124,22,23,24,25,26);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
@@ -40,15 +40,15 @@ INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
INSERT IGNORE INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`c2` at row 1
INSERT IGNORE INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`c2` at row 1
INSERT IGNORE INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t3`.`c2` at row 1
SELECT * FROM t1;
c1 c2 c3 c4 c5 c6 c7
0 0 17 18 19 20 21
@@ -1378,22 +1378,22 @@ Warnings:
Warning 1364 Field 'c2' doesn't have a default value
INSERT IGNORE INTO t4 VALUES('','',17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c2` at row 1
INSERT IGNORE INTO t5 VALUES('','',-17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c2` at row 1
INSERT IGNORE INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c3` at row 1
INSERT IGNORE INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c3` at row 1
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
INSERT IGNORE INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
Warnings:
@@ -5621,16 +5621,16 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t1 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c2` at row 1
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
@@ -5649,15 +5649,15 @@ INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t3`.`c2` at row 1
SELECT * FROM t1;
c1 c2 c3 c4 c5 c6 c7
0 0 17 18 19 20 21
@@ -6987,22 +6987,22 @@ Warnings:
Warning 1364 Field 'c2' doesn't have a default value
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c2` at row 1
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c2` at row 1
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c3` at row 1
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c3` at row 1
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
Warnings:
@@ -11321,16 +11321,16 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t1 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c2` at row 1
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
@@ -11349,15 +11349,15 @@ INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t3`.`c2` at row 1
SELECT * FROM t1;
c1 c2 c3 c4 c5 c6 c7
0 0 17 18 19 20 21
@@ -12687,22 +12687,22 @@ Warnings:
Warning 1364 Field 'c2' doesn't have a default value
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c2` at row 1
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c2` at row 1
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c3` at row 1
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c3` at row 1
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
Warnings:
@@ -17126,16 +17126,16 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t1 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c2` at row 1
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
@@ -17154,15 +17154,15 @@ INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t3`.`c2` at row 1
SELECT * FROM t1;
c1 c2 c3 c4 c5 c6 c7
0 0 17 18 19 20 21
@@ -18492,22 +18492,22 @@ Warnings:
Warning 1364 Field 'c2' doesn't have a default value
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c2` at row 1
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c2` at row 1
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c3` at row 1
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c3` at row 1
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
Warnings:
@@ -23036,16 +23036,16 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t1 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c2` at row 1
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
@@ -23064,15 +23064,15 @@ INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t3`.`c2` at row 1
SELECT * FROM t1;
c1 c2 c3 c4 c5 c6 c7
0 0 17 18 19 20 21
@@ -24402,22 +24402,22 @@ Warnings:
Warning 1364 Field 'c2' doesn't have a default value
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c2` at row 1
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c2` at row 1
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c3` at row 1
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c3` at row 1
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
Warnings:
@@ -28946,16 +28946,16 @@ INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
INSERT INTO t1 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('','',17,18,19,20,21);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t3`.`c2` at row 1
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
@@ -28974,15 +28974,15 @@ INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`c2` at row 1
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t2`.`c2` at row 1
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t3`.`c2` at row 1
SELECT * FROM t1;
c1 c2 c3 c4 c5 c6 c7
0 0 17 18 19 20 21
@@ -30312,22 +30312,22 @@ Warnings:
Warning 1364 Field 'c2' doesn't have a default value
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t4`.`c2` at row 1
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t5`.`c2` at row 1
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t4`.`c3` at row 1
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
-Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c2` at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t5`.`c3` at row 1
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
Warnings:
@@ -31586,8 +31586,33 @@ c1 c2 c3 c4 c5 c6 c7
0 -9223372036854775808 1 2 3 4 5
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6;
c1 c2 c3 c4 c5 c6 c7
+0 NULL 5 6 NULL 0 NULL
+0 -9223372036854775808 1 2 3 4 5
+0 0 17 18 19 20 21
+0 124 22 23 24 25 26
+0 124 27 28 29 30 31
+0 -9223372036854775808 31 32 33 34 35
+0 0 32 32 34 35 36
+101 0 37 38 39 40 41
+101 -102 103 104 105 106 107
+102 -109 110 111 112 113 114
+103 -109 110 111 112 113 114
+105 NULL 102 103 104 105 106
+108 -109 110 111 112 101 114
+108 -109 110 111 112 102 114
+108 -109 110 111 112 113 114
+115 -116 117 118 119 120 121
+122 -123 124 125 126 127 128
+255 -2147483648 6 7 8 9 10
+65535 -8388608 11 12 13 14 15
+16777215 -32768 16 17 18 19 20
+4294967295 -128 21 22 23 24 25
+18446744073709551615 9223372036854775807 26 27 28 29 30
+18446744073709551615 9223372036854775807 36 37 38 39 40
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
c1 c2 c3 c4 c5 c6 c7
+0 NULL 5 6 NULL 0 NULL
+0 -9223372036854775808 1 2 3 4 5
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6;
c1 c2 c3 c4 c5 c6 c7
0 NULL 5 6 NULL 0 NULL
@@ -31747,8 +31772,33 @@ c1 c2 c3 c4 c5 c6 c7
0 -9223372036854775808 31 32 33 34 35
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC;
c1 c2 c3 c4 c5 c6 c7
+0 0 32 32 34 35 36
+0 -9223372036854775808 31 32 33 34 35
+0 124 27 28 29 30 31
+0 124 22 23 24 25 26
+0 0 17 18 19 20 21
+0 -9223372036854775808 1 2 3 4 5
+0 NULL 5 6 NULL 0 NULL
+101 -102 103 104 105 106 107
+101 0 37 38 39 40 41
+102 -109 110 111 112 113 114
+103 -109 110 111 112 113 114
+105 NULL 102 103 104 105 106
+108 -109 110 111 112 113 114
+108 -109 110 111 112 102 114
+108 -109 110 111 112 101 114
+115 -116 117 118 119 120 121
+122 -123 124 125 126 127 128
+255 -2147483648 6 7 8 9 10
+65535 -8388608 11 12 13 14 15
+16777215 -32768 16 17 18 19 20
+4294967295 -128 21 22 23 24 25
+18446744073709551615 9223372036854775807 36 37 38 39 40
+18446744073709551615 9223372036854775807 26 27 28 29 30
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
c1 c2 c3 c4 c5 c6 c7
+0 0 32 32 34 35 36
+0 -9223372036854775808 31 32 33 34 35
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 DESC;
c1 c2 c3 c4 c5 c6 c7
0 0 32 32 34 35 36
@@ -32014,8 +32064,33 @@ c1 c2 c3 c4 c5 c6 c7
18446744073709551615 9223372036854775807 36 37 38 39 40
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6;
c1 c2 c3 c4 c5 c6 c7
+0 NULL 5 6 NULL 0 NULL
+0 -9223372036854775808 1 2 3 4 5
+0 0 17 18 19 20 21
+0 124 22 23 24 25 26
+0 124 27 28 29 30 31
+0 -9223372036854775808 31 32 33 34 35
+0 0 32 32 34 35 36
+101 0 37 38 39 40 41
+101 -102 103 104 105 106 107
+102 -109 110 111 112 113 114
+103 -109 110 111 112 113 114
+105 NULL 102 103 104 105 106
+108 -109 110 111 112 101 114
+108 -109 110 111 112 102 114
+108 -109 110 111 112 113 114
+115 -116 117 118 119 120 121
+122 -123 124 125 126 127 128
+255 -2147483648 6 7 8 9 10
+65535 -8388608 11 12 13 14 15
+16777215 -32768 16 17 18 19 20
+4294967295 -128 21 22 23 24 25
+18446744073709551615 9223372036854775807 26 27 28 29 30
+18446744073709551615 9223372036854775807 36 37 38 39 40
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
c1 c2 c3 c4 c5 c6 c7
+0 NULL 5 6 NULL 0 NULL
+0 -9223372036854775808 1 2 3 4 5
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6;
c1 c2 c3 c4 c5 c6 c7
0 NULL 5 6 NULL 0 NULL
@@ -32175,8 +32250,33 @@ c1 c2 c3 c4 c5 c6 c7
18446744073709551615 9223372036854775807 26 27 28 29 30
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC;
c1 c2 c3 c4 c5 c6 c7
+0 0 32 32 34 35 36
+0 -9223372036854775808 31 32 33 34 35
+0 124 27 28 29 30 31
+0 124 22 23 24 25 26
+0 0 17 18 19 20 21
+0 -9223372036854775808 1 2 3 4 5
+0 NULL 5 6 NULL 0 NULL
+101 -102 103 104 105 106 107
+101 0 37 38 39 40 41
+102 -109 110 111 112 113 114
+103 -109 110 111 112 113 114
+105 NULL 102 103 104 105 106
+108 -109 110 111 112 113 114
+108 -109 110 111 112 102 114
+108 -109 110 111 112 101 114
+115 -116 117 118 119 120 121
+122 -123 124 125 126 127 128
+255 -2147483648 6 7 8 9 10
+65535 -8388608 11 12 13 14 15
+16777215 -32768 16 17 18 19 20
+4294967295 -128 21 22 23 24 25
+18446744073709551615 9223372036854775807 36 37 38 39 40
+18446744073709551615 9223372036854775807 26 27 28 29 30
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
c1 c2 c3 c4 c5 c6 c7
+0 0 32 32 34 35 36
+0 -9223372036854775808 31 32 33 34 35
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 DESC;
c1 c2 c3 c4 c5 c6 c7
0 0 32 32 34 35 36
diff --git a/mysql-test/suite/engines/iuds/r/insert_year.result b/mysql-test/suite/engines/iuds/r/insert_year.result
index ea6e10d130b..c7a0dbcba86 100644
--- a/mysql-test/suite/engines/iuds/r/insert_year.result
+++ b/mysql-test/suite/engines/iuds/r/insert_year.result
@@ -60,12 +60,12 @@ Warning 1264 Out of range value for column 'c1' at row 6
Warning 1264 Out of range value for column 'c2' at row 6
INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT IGNORE INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */;
Warnings:
-Warning 1366 Incorrect integer value: 'abcd' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'abcd' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'abcd' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: 'abcd' for column `test`.`t4`.`c2` at row 1
Warning 1264 Out of range value for column 'c1' at row 2
Warning 1264 Out of range value for column 'c2' at row 2
INSERT INTO t2 VALUES('20','30','98-12-16','98.12.16 11:30:45'),('40','20','98-12-15','98.12.15 11:30:45');
@@ -3319,12 +3319,12 @@ Warning 1264 Out of range value for column 'c1' at row 6
Warning 1264 Out of range value for column 'c2' at row 6
INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c1` at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`t1`.`c2` at row 1
INSERT IGNORE INTO t4 VALUES('abcd','abcd','08-01-10','08/01/11'),(1234,1234,'08-01-12','08/01/13') /* Inserts zero dates for absurd dates */;
Warnings:
-Warning 1366 Incorrect integer value: 'abcd' for column 'c1' at row 1
-Warning 1366 Incorrect integer value: 'abcd' for column 'c2' at row 1
+Warning 1366 Incorrect integer value: 'abcd' for column `test`.`t4`.`c1` at row 1
+Warning 1366 Incorrect integer value: 'abcd' for column `test`.`t4`.`c2` at row 1
Warning 1264 Out of range value for column 'c1' at row 2
Warning 1264 Out of range value for column 'c2' at row 2
INSERT INTO t2 VALUES('20','30','98-12-16','98.12.16 11:30:45'),('40','20','98-12-15','98.12.15 11:30:45');
diff --git a/mysql-test/suite/engines/iuds/r/update_decimal.result b/mysql-test/suite/engines/iuds/r/update_decimal.result
index 7b4a3ea9079..8bedcf8ab51 100644
--- a/mysql-test/suite/engines/iuds/r/update_decimal.result
+++ b/mysql-test/suite/engines/iuds/r/update_decimal.result
@@ -334,7 +334,7 @@ INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555'
UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3;
UPDATE IGNORE t1 SET c3='asdf' WHERE c1='11111.11111';
Warnings:
-Warning 1366 Incorrect decimal value: 'asdf' for column 'c3' at row 1
+Warning 1366 Incorrect decimal value: 'asdf' for column `test`.`t1`.`c3` at row 1
SELECT c3 FROM t1;
c3
0
@@ -1099,7 +1099,7 @@ INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555'
UPDATE t2,t3 SET t3.c1='22222.22222' WHERE t2.c1=t3.c1 AND t2.c3=t3.c3;
UPDATE IGNORE t1 SET c3='asdf' WHERE c1='11111.11111';
Warnings:
-Warning 1366 Incorrect double value: 'asdf' for column 'c3' at row 1
+Warning 1366 Incorrect double value: 'asdf' for column `test`.`t1`.`c3` at row 1
SELECT c3 FROM t1;
c3
0
diff --git a/mysql-test/suite/engines/iuds/r/update_delete_number.result b/mysql-test/suite/engines/iuds/r/update_delete_number.result
index b091d27d1e6..1cd2a62cb56 100644
--- a/mysql-test/suite/engines/iuds/r/update_delete_number.result
+++ b/mysql-test/suite/engines/iuds/r/update_delete_number.result
@@ -3767,8 +3767,25 @@ c1 c2 c3
-12 18446744073709551615 12
SELECT * FROM t2 WHERE c2 BETWEEN 0 AND 18446744073709551615 ORDER BY c2,c1;
c1 c2 c3
+-4 4 4
+-9 9 9
+0 255 13
+-9223372036854775808 18446744073709551615 12
+-12 18446744073709551615 12
+-11 18446744073709551615 11
+-8 18446744073709551615 8
+-7 18446744073709551615 7
+-6 18446744073709551615 6
+-5 18446744073709551615 5
+-3 18446744073709551615 3
+-2 18446744073709551615 2
+-1 18446744073709551615 1
+50 18446744073709551615 10
+9223372036854775807 18446744073709551615 14
SELECT * FROM t2 WHERE c2 BETWEEN 0 AND 18446744073709551615 ORDER BY c2,c1 DESC LIMIT 2;
c1 c2 c3
+-4 4 4
+-9 9 9
SELECT * FROM t2 WHERE c2 IN(0,18446744073709551615) ORDER BY c2,c1 DESC;
c1 c2 c3
9223372036854775807 18446744073709551615 14
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
index 45c04e32de8..7850e017fb2 100644
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -3715,8 +3715,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 25
Warnings:
-Warning 1292 Incorrect time value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect time value: '1.7976931348623e308' for column 'my_double' at row 3
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3731,8 +3731,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 25
Warnings:
-Warning 1292 Incorrect time value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect time value: '1.7976931348623e308' for column 'my_double' at row 1
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -3749,8 +3749,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 24
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect time value: '9223372036854775807' for column 'my_bigint' at row 3
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3765,8 +3765,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 24
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect time value: '9223372036854775807' for column 'my_bigint' at row 1
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
@@ -4061,10 +4061,10 @@ NULL 1.7976931348623e308 3
NULL -1 5
NULL 200506271758 19
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 5
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_double' at row 19
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 19
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4079,10 +4079,10 @@ NULL 1.7976931348623e308 3
NULL -1 5
NULL 200506271758 19
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_double' at row 1
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -4099,10 +4099,10 @@ NULL 9223372036854775807 3
NULL -1 5
NULL 200506271758 18
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 5
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_bigint' at row 18
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 18
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4117,10 +4117,10 @@ NULL 9223372036854775807 3
NULL -1 5
NULL 200506271758 18
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_bigint' at row 1
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
@@ -4421,9 +4421,9 @@ NULL 1.7976931348623e308 3
NULL -1 5
2005-06-27 20050627 13
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 5
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4438,9 +4438,9 @@ NULL 1.7976931348623e308 3
NULL -1 5
2005-06-27 20050627 13
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 1
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -4457,9 +4457,9 @@ NULL 9223372036854775807 3
NULL -1 5
2005-06-27 20050627 12
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 5
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4474,9 +4474,9 @@ NULL 9223372036854775807 3
NULL -1 5
2005-06-27 20050627 12
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 1
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraint.result b/mysql-test/suite/funcs_1/r/is_check_constraint.result
new file mode 100644
index 00000000000..be44a8867e8
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/is_check_constraint.result
@@ -0,0 +1,121 @@
+#
+# MDEV-17323: Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS to 10.2
+#
+CREATE user boo1;
+GRANT select,create,alter,drop on foo.* to boo1;
+SHOW GRANTS for boo1;
+Grants for boo1@%
+GRANT USAGE ON *.* TO 'boo1'@'%'
+GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO 'boo1'@'%'
+CREATE user boo2;
+create database foo;
+CONNECT con1,localhost, boo1,, foo;
+SET check_constraint_checks=1;
+CREATE TABLE t0
+(
+t int, check (t>32) # table constraint
+) ENGINE=myisam;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CONSTRAINT_1 t0 `t` > 32
+ALTER TABLE t0
+ADD CONSTRAINT CHK_t0_t CHECK(t<100);
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CHK_t0_t t0 `t` < 100
+def foo CONSTRAINT_1 t0 `t` > 32
+ALTER TABLE t0
+DROP CONSTRAINT CHK_t0_t;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CONSTRAINT_1 t0 `t` > 32
+ALTER TABLE t0
+ADD CONSTRAINT CHECK(t<50);
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CONSTRAINT_1 t0 `t` > 32
+def foo CONSTRAINT_2 t0 `t` < 50
+CREATE TABLE t1
+( t int CHECK(t>2), # field constraint
+tt int,
+CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints
+CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint
+) ENGINE=InnoDB;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CHK_tt t1 `tt` < 100
+def foo CONSTRAINT_1 t0 `t` > 32
+def foo CONSTRAINT_1 t1 `tt` > 32
+def foo CONSTRAINT_2 t0 `t` < 50
+def foo CONSTRAINT_2 t1 `tt` < 50
+def foo t t1 `t` > 2
+ALTER TABLE t1
+DROP CONSTRAINT CHK_tt;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CONSTRAINT_1 t0 `t` > 32
+def foo CONSTRAINT_1 t1 `tt` > 32
+def foo CONSTRAINT_2 t0 `t` < 50
+def foo CONSTRAINT_2 t1 `tt` < 50
+def foo t t1 `t` > 2
+CREATE TABLE t2
+(
+name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint
+start_date DATE,
+end_date DATE,
+CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint
+)ENGINE=Innodb;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CHK_dates t2 `start_date` is null
+def foo CONSTRAINT_1 t0 `t` > 32
+def foo CONSTRAINT_1 t1 `tt` > 32
+def foo CONSTRAINT_2 t0 `t` < 50
+def foo CONSTRAINT_2 t1 `tt` < 50
+def foo name t2 char_length(`name`) > 2
+def foo t t1 `t` > 2
+ALTER TABLE t1
+ADD CONSTRAINT CHK_new_ CHECK(t>tt);
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CHK_dates t2 `start_date` is null
+def foo CHK_new_ t1 `t` > `tt`
+def foo CONSTRAINT_1 t0 `t` > 32
+def foo CONSTRAINT_1 t1 `tt` > 32
+def foo CONSTRAINT_2 t0 `t` < 50
+def foo CONSTRAINT_2 t1 `tt` < 50
+def foo name t2 char_length(`name`) > 2
+def foo t t1 `t` > 2
+CREATE TABLE t3
+(
+a int,
+b int check (b>0), # field constraint named 'b'
+CONSTRAINT b check (b>10) # table constraint
+) ENGINE=InnoDB;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+def foo CHK_dates t2 `start_date` is null
+def foo CHK_new_ t1 `t` > `tt`
+def foo CONSTRAINT_1 t0 `t` > 32
+def foo CONSTRAINT_1 t1 `tt` > 32
+def foo CONSTRAINT_2 t0 `t` < 50
+def foo CONSTRAINT_2 t1 `tt` < 50
+def foo b t3 `b` > 0
+def foo b t3 `b` > 10
+def foo name t2 char_length(`name`) > 2
+def foo t t1 `t` > 2
+disconnect con1;
+CONNECT con2, localhost, boo2,, test;
+SELECT * from information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
+disconnect con2;
+CONNECT con1, localhost, boo1,,foo;
+DROP TABLE t0;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP DATABASE foo;
+disconnect con1;
+connection default;
+DROP USER boo1;
+DROP USER boo2;
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 678cfb8db2f..eaf90f44544 100644
--- a/mysql-test/suite/funcs_1/r/is_check_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -9,6 +9,11 @@ t int, check (t>32) # table constraint
) ENGINE=myisam;
SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1
TABLE_NAME t0
@@ -17,6 +22,11 @@ ALTER TABLE t0
ADD CONSTRAINT CHK_t0_t CHECK(t<100);
SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_t0_t
TABLE_NAME t0
@@ -30,6 +40,11 @@ ALTER TABLE t0
DROP CONSTRAINT CHK_t0_t;
SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1
TABLE_NAME t0
@@ -40,6 +55,11 @@ tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint
) ENGINE=InnoDB;
SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_tt
TABLE_NAME t1
@@ -58,6 +78,11 @@ ALTER TABLE t1
DROP CONSTRAINT CHK_tt;
SELECT * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME t
TABLE_NAME t1
@@ -81,6 +106,11 @@ CONSTRAINT_NAME name
TABLE_NAME t2
CHECK_CLAUSE char_length(`name`) > 2
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_dates
TABLE_NAME t2
@@ -104,6 +134,11 @@ CONSTRAINT_NAME name
TABLE_NAME t2
CHECK_CLAUSE char_length(`name`) > 2
CONSTRAINT_CATALOG def
+CONSTRAINT_SCHEMA mysql
+CONSTRAINT_NAME Priv
+TABLE_NAME global_priv
+CHECK_CLAUSE json_valid(`Priv`)
+CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_dates
TABLE_NAME t2
@@ -132,6 +167,7 @@ CONSTRAINT b check (b>10) # table constraint
select * from information_schema.check_constraints order by check_clause;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
def test name t2 char_length(`name`) > 2
+def mysql Priv global_priv json_valid(`Priv`)
def test b t3 `b` > 0
def test b t3 `b` > 10
def test CHK_dates t2 `start_date` is null
diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
index 8f2ba33b591..fbca906a9fb 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
@@ -359,9 +359,9 @@ drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' INTO TABLE t7;
-ERROR 22007: Incorrect date value: '' for column 'f3' at row 1
+ERROR 22007: Incorrect date value: '' for column `test`.`t7`.`f3` at row 1
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' INTO TABLE t8;
-ERROR 22007: Incorrect date value: '' for column 'f3' at row 1
+ERROR 22007: Incorrect date value: '' for column `test`.`t8`.`f3` at row 1
drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' INTO TABLE t9;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
index 5a7fdbd63c9..31160f8a3ec 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
@@ -61,7 +61,7 @@ def mysql event modified 9 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NUL
def mysql event name 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NEVER NULL
def mysql event on_completion 14 'DROP' NO enum 8 24 NULL NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NEVER NULL
def mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
-def mysql event sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') select,insert,update,references NEVER NULL
+def mysql event sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL
def mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references NEVER NULL
def mysql event status 13 'ENABLED' NO enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NEVER NULL
def mysql event time_zone 18 'SYSTEM' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
@@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references NEVER NULL
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NEVER NULL
+def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
+def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
@@ -133,7 +136,7 @@ def mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL
def mysql proc security_type 8 'DEFINER' NO enum 7 21 NULL NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references NEVER NULL
def mysql proc specific_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL
def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NEVER NULL
-def mysql proc sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') select,insert,update,references NEVER NULL
+def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') select,insert,update,references NEVER NULL
def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI select,insert,update,references NEVER NULL
def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL
def mysql procs_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references NEVER NULL
@@ -206,53 +209,53 @@ def mysql transaction_registry commit_id 2 NULL NO bigint NULL NULL 20 0 NULL NU
def mysql transaction_registry commit_timestamp 4 '0000-00-00 00:00:00.000000' NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) MUL select,insert,update,references NEVER NULL
def mysql transaction_registry isolation_level 5 NULL NO enum 16 48 NULL NULL NULL utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') select,insert,update,references NEVER NULL
def mysql transaction_registry transaction_id 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references NEVER NULL
-def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references NEVER NULL
-def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
-def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL
-def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
-def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
+def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
+def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) select,insert,update,references NEVER NULL
-def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references NEVER NULL
-def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
-def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references NEVER NULL
-def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NEVER NULL
-def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
-def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NEVER NULL
-def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL
-def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL
-def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
-def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references NEVER NULL
+def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
+def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select,insert,update,references NEVER NULL
+def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) select,insert,update,references NEVER NULL
+def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) select,insert,update,references NEVER NULL
+def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) select,insert,update,references NEVER NULL
+def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
+def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext select,insert,update,references NEVER NULL
##########################################################################
# Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH
##########################################################################
@@ -269,11 +272,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 blob NULL NULL
1.0000 longblob NULL NULL
1.0000 varbinary NULL NULL
-1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci
+1.0000 longtext utf8mb4 utf8mb4_bin
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
@@ -380,7 +384,7 @@ NULL mysql event starts datetime NULL NULL NULL NULL datetime
NULL mysql event ends datetime NULL NULL NULL NULL datetime
3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
-3.0000 mysql event sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql event sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
@@ -398,6 +402,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
+3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60)
+3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
@@ -451,7 +458,7 @@ NULL mysql innodb_table_stats sum_of_other_index_sizes bigint NULL NULL NULL NUL
3.0000 mysql proc definer char 141 423 utf8 utf8_bin char(141)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
-3.0000 mysql proc sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql proc sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
1.0000 mysql proc comment text 65535 65535 utf8 utf8_bin text
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32)
@@ -531,48 +538,48 @@ NULL mysql transaction_registry commit_timestamp timestamp NULL NULL NULL NULL t
3.0000 mysql transaction_registry isolation_level enum 16 48 utf8 utf8_bin enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE')
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 80 240 utf8 utf8_bin char(80)
-1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41)
-3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED')
-1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob
-NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
-1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
-1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
-3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
+1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
+1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
index 440478b892d..6ad671a54c8 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
@@ -61,7 +61,7 @@ def mysql event modified 9 '0000-00-00 00:00:00' NO timestamp NULL NULL NULL NUL
def mysql event name 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI NEVER NULL
def mysql event on_completion 14 'DROP' NO enum 8 24 NULL NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') NEVER NULL
def mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
-def mysql event sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NEVER NULL
+def mysql event sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL
def mysql event starts 11 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL
def mysql event status 13 'ENABLED' NO enum 18 54 NULL NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NEVER NULL
def mysql event time_zone 18 'SYSTEM' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL
@@ -75,6 +75,9 @@ def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL N
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext NEVER NULL
+def mysql global_priv Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL
+def mysql global_priv Priv 3 '{}' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql global_priv User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql gtid_slave_pos server_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned NEVER NULL
@@ -119,7 +122,7 @@ def mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL
def mysql proc security_type 8 'DEFINER' NO enum 7 21 NULL NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') NEVER NULL
def mysql proc specific_name 4 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL
def mysql proc sql_data_access 6 'CONTAINS_SQL' NO enum 17 51 NULL NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NEVER NULL
-def mysql proc sql_mode 15 '' NO set 539 1617 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT') NEVER NULL
+def mysql proc sql_mode 15 '' NO set 561 1683 NULL NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL') NEVER NULL
def mysql proc type 3 NULL NO enum 12 36 NULL NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY') PRI NEVER NULL
def mysql procs_priv Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL
def mysql procs_priv Grantor 6 '' NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL NEVER NULL
@@ -187,53 +190,53 @@ def mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NUL
def mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
def mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
def mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL
-def mysql user Alter_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Alter_routine_priv 28 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user authentication_string 43 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text NEVER NULL
-def mysql user Create_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_routine_priv 27 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_tablespace_priv 32 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_tmp_table_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_user_priv 29 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Create_view_priv 25 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user default_role 46 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL
-def mysql user Delete_history_priv 33 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Delete_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Drop_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Event_priv 30 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Execute_priv 22 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user File_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Grant_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL
-def mysql user Index_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Insert_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user is_role 45 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Lock_tables_priv 21 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user max_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL
-def mysql user max_questions 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL
+def mysql user Alter_priv 17 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Alter_routine_priv 28 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user authentication_string 43 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Create_priv 8 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_routine_priv 27 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_tablespace_priv 32 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_tmp_table_priv 20 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_user_priv 29 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Create_view_priv 25 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user default_role 46 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Delete_history_priv 33 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Delete_priv 7 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Drop_priv 9 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Event_priv 30 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Execute_priv 22 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user File_priv 13 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Grant_priv 14 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) NEVER NULL
+def mysql user Index_priv 16 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Insert_priv 5 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user is_role 45 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Lock_tables_priv 21 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user max_connections 40 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_questions 38 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
def mysql user max_statement_time 47 0.000000 NO decimal NULL NULL 12 6 NULL NULL NULL decimal(12,6) NEVER NULL
-def mysql user max_updates 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned NEVER NULL
-def mysql user max_user_connections 41 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL
-def mysql user Password 3 '' NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) NEVER NULL
-def mysql user password_expired 44 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user plugin 42 '' NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) NEVER NULL
-def mysql user Process_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user References_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Reload_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Repl_client_priv 24 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Repl_slave_priv 23 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Select_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Show_db_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Show_view_priv 26 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Shutdown_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user ssl_cipher 35 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
-def mysql user ssl_type 34 '' NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') NEVER NULL
-def mysql user Super_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Trigger_priv 31 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user Update_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL
-def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL
-def mysql user x509_issuer 36 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
-def mysql user x509_subject 37 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
+def mysql user max_updates 39 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned NEVER NULL
+def mysql user max_user_connections 41 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
+def mysql user Password 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user password_expired 44 '' NO varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user plugin 42 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user Process_priv 12 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user References_priv 15 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Reload_priv 10 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Repl_client_priv 24 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Repl_slave_priv 23 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Select_priv 4 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Show_db_priv 18 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Show_view_priv 26 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Shutdown_priv 11 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user ssl_cipher 35 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user ssl_type 34 NULL YES varchar 9 9 NULL NULL NULL latin1 latin1_swedish_ci varchar(9) NEVER NULL
+def mysql user Super_priv 19 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Trigger_priv 31 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user Update_priv 6 NULL YES varchar 1 1 NULL NULL NULL latin1 latin1_swedish_ci varchar(1) NEVER NULL
+def mysql user User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) NEVER NULL
+def mysql user x509_issuer 36 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
+def mysql user x509_subject 37 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8mb4 utf8mb4_bin longtext NEVER NULL
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
@@ -254,11 +257,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 blob NULL NULL
1.0000 longblob NULL NULL
1.0000 varbinary NULL NULL
-1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci
+1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci
+1.0000 longtext utf8mb4 utf8mb4_bin
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
@@ -377,7 +381,7 @@ NULL mysql event starts datetime NULL NULL NULL NULL datetime
NULL mysql event ends datetime NULL NULL NULL NULL datetime
3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED')
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
-3.0000 mysql event sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql event sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
@@ -395,6 +399,9 @@ NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
+3.0000 mysql global_priv Host char 60 180 utf8 utf8_bin char(60)
+3.0000 mysql global_priv User char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql global_priv Priv longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql gtid_slave_pos domain_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql gtid_slave_pos sub_id bigint NULL NULL NULL NULL bigint(20) unsigned
NULL mysql gtid_slave_pos server_id int NULL NULL NULL NULL int(10) unsigned
@@ -434,7 +441,7 @@ NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
3.0000 mysql proc definer char 141 423 utf8 utf8_bin char(141)
NULL mysql proc created timestamp NULL NULL NULL NULL timestamp
NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
-3.0000 mysql proc sql_mode set 539 1617 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT')
+3.0000 mysql proc sql_mode set 561 1683 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')
1.0000 mysql proc comment text 65535 65535 utf8 utf8_bin text
3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32)
3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32)
@@ -509,50 +516,50 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(
3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8)
3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user User char 80 240 utf8 utf8_bin char(80)
-1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41)
-3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Create_tablespace_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user Delete_history_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED')
-1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob
-1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob
-NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
-NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
-1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
-1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
-3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y')
-3.0000 mysql user default_role char 80 240 utf8 utf8_bin char(80)
+1.0000 mysql user Password longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user Select_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Insert_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Update_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Drop_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Reload_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Shutdown_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Process_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user File_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Grant_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user References_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Index_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_db_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Super_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tmp_table_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Lock_tables_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Execute_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_slave_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Repl_client_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Show_view_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Alter_routine_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_user_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Event_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Trigger_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Create_tablespace_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user Delete_history_priv varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user ssl_type varchar 9 9 latin1 latin1_swedish_ci varchar(9)
+1.0000 mysql user ssl_cipher longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_issuer longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user x509_subject longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+NULL mysql user max_questions bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_updates bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_connections bigint NULL NULL NULL NULL bigint(20) unsigned
+NULL mysql user max_user_connections bigint NULL NULL NULL NULL bigint(21)
+1.0000 mysql user plugin longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user authentication_string longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
+1.0000 mysql user password_expired varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user is_role varchar 1 1 latin1 latin1_swedish_ci varchar(1)
+1.0000 mysql user default_role longtext 4294967295 4294967295 utf8mb4 utf8mb4_bin longtext
NULL mysql user max_statement_time decimal NULL NULL NULL NULL decimal(12,6)
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
index 326ea3f4acc..efb67e32cee 100644
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
@@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User
def mysql PRIMARY def mysql event db
def mysql PRIMARY def mysql event name
def mysql PRIMARY def mysql func name
+def mysql PRIMARY def mysql global_priv Host
+def mysql PRIMARY def mysql global_priv User
def mysql PRIMARY def mysql gtid_slave_pos domain_id
def mysql PRIMARY def mysql gtid_slave_pos sub_id
def mysql PRIMARY def mysql help_category help_category_id
@@ -142,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql commit_id def mysql transaction_registry commit_id
def mysql PRIMARY def mysql transaction_registry transaction_id
-def mysql PRIMARY def mysql user Host
-def mysql PRIMARY def mysql user User
########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
########################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
index a547b1ddf61..cf67be8f7a0 100644
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result
@@ -90,6 +90,8 @@ def mysql PRIMARY def mysql db User
def mysql PRIMARY def mysql event db
def mysql PRIMARY def mysql event name
def mysql PRIMARY def mysql func name
+def mysql PRIMARY def mysql global_priv Host
+def mysql PRIMARY def mysql global_priv User
def mysql PRIMARY def mysql gtid_slave_pos domain_id
def mysql PRIMARY def mysql gtid_slave_pos sub_id
def mysql PRIMARY def mysql help_category help_category_id
@@ -142,8 +144,6 @@ def mysql PRIMARY def mysql time_zone_transition_type Time_zone_id
def mysql PRIMARY def mysql time_zone_transition_type Transition_type_id
def mysql commit_id def mysql transaction_registry commit_id
def mysql PRIMARY def mysql transaction_registry transaction_id
-def mysql PRIMARY def mysql user Host
-def mysql PRIMARY def mysql user User
########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information
########################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
index cb736417a17..ec375e9c5f6 100644
--- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
@@ -197,7 +197,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
SELECT * FROM db_datadict_2.res_6_408002_2;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
-check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
connect testuser2, localhost, testuser2, , db_datadict;
SELECT * FROM information_schema.routines;
@@ -209,7 +209,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
SELECT * FROM db_datadict_2.res_6_408002_2;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
-check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
connect testuser3, localhost, testuser3, , test;
SELECT * FROM information_schema.routines;
@@ -221,7 +221,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
SELECT * FROM db_datadict_2.res_6_408002_2;
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
-check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
+check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
connection default;
disconnect testuser1;
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
index 2cb94b657cc..bacc106a1be 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -101,6 +101,8 @@ def mysql db mysql User
def mysql event mysql PRIMARY
def mysql event mysql PRIMARY
def mysql func mysql PRIMARY
+def mysql global_priv mysql PRIMARY
+def mysql global_priv mysql PRIMARY
def mysql gtid_slave_pos mysql PRIMARY
def mysql gtid_slave_pos mysql PRIMARY
def mysql help_category mysql name
@@ -148,8 +150,6 @@ def mysql time_zone_transition mysql PRIMARY
def mysql time_zone_transition mysql PRIMARY
def mysql time_zone_transition_type mysql PRIMARY
def mysql time_zone_transition_type mysql PRIMARY
-def mysql user mysql PRIMARY
-def mysql user mysql PRIMARY
Warnings:
Warning 1286 Unknown storage engine 'InnoDB'
Warning 1286 Unknown storage engine 'InnoDB'
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
index 96d85a0425f..c01c456edf8 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
@@ -22,6 +22,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -80,8 +82,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL
def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE
def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE
def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql'
diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
index 69a502e53dd..b7bd3ec2e23 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
@@ -22,6 +22,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -80,8 +82,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL
def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE
def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE
def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.statistics
WHERE table_schema = 'mysql'
@@ -102,6 +102,8 @@ def mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
def mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
+def mysql global_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 1 domain_id A #CARD# NULL NULL BTREE
def mysql gtid_slave_pos 0 mysql PRIMARY 2 sub_id A #CARD# NULL NULL BTREE
def mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE
@@ -160,8 +162,6 @@ def mysql transaction_registry 0 mysql commit_id 1 commit_id A #CARD# NULL NULL
def mysql transaction_registry 1 mysql commit_timestamp 1 commit_timestamp A #CARD# NULL NULL BTREE
def mysql transaction_registry 1 mysql commit_timestamp 2 transaction_id A #CARD# NULL NULL BTREE
def mysql transaction_registry 0 mysql PRIMARY 1 transaction_id A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
-def mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
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 cb7aa1f8fc0..bc0f9a724a1 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result
@@ -63,6 +63,8 @@ def mysql PRIMARY mysql column_stats
def mysql PRIMARY mysql db
def mysql PRIMARY mysql event
def mysql PRIMARY mysql func
+def mysql PRIMARY mysql global_priv
+def mysql Priv mysql global_priv
def mysql PRIMARY mysql gtid_slave_pos
def mysql name mysql help_category
def mysql PRIMARY mysql help_category
@@ -89,7 +91,6 @@ def mysql PRIMARY mysql time_zone_transition
def mysql PRIMARY mysql time_zone_transition_type
def mysql commit_id mysql transaction_registry
def mysql PRIMARY mysql transaction_registry
-def mysql PRIMARY mysql user
#########################################################################################
# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
#########################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
index fc9ba660467..d5da807388b 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
@@ -12,6 +12,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
def mysql name mysql help_category UNIQUE
def mysql PRIMARY mysql help_category PRIMARY KEY
@@ -38,7 +40,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql commit_id mysql transaction_registry UNIQUE
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
-def mysql PRIMARY mysql user PRIMARY KEY
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql'
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
index 54e27e22140..0426877bc1c 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
@@ -12,6 +12,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
def mysql name mysql help_category UNIQUE
def mysql PRIMARY mysql help_category PRIMARY KEY
@@ -38,7 +40,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql commit_id mysql transaction_registry UNIQUE
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
-def mysql PRIMARY mysql user PRIMARY KEY
connect testuser1,localhost,testuser1,,db_datadict;
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'mysql'
@@ -49,6 +50,8 @@ def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
+def mysql PRIMARY mysql global_priv PRIMARY KEY
+def mysql Priv mysql global_priv CHECK
def mysql PRIMARY mysql gtid_slave_pos PRIMARY KEY
def mysql name mysql help_category UNIQUE
def mysql PRIMARY mysql help_category PRIMARY KEY
@@ -75,7 +78,6 @@ def mysql PRIMARY mysql time_zone_transition PRIMARY KEY
def mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY
def mysql commit_id mysql transaction_registry UNIQUE
def mysql PRIMARY mysql transaction_registry PRIMARY KEY
-def mysql PRIMARY mysql user PRIMARY KEY
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
index 9d1539bc778..be432e2422a 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
@@ -162,6 +162,31 @@ user_comment General log
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
+TABLE_NAME global_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Users and global privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
TABLE_NAME gtid_slave_pos
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
@@ -738,10 +763,10 @@ Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME user
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -752,13 +777,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION NULL
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
-TEMPORARY N
-user_comment Users and global privileges
+TEMPORARY NULL
+user_comment VIEW
Separator -----------------------------------------------------
DROP USER testuser1@localhost;
CREATE USER testuser1@localhost;
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
index c28b4b45ede..01381a5e746 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
@@ -162,6 +162,31 @@ user_comment General log
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
+TABLE_NAME global_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Users and global privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
TABLE_NAME gtid_slave_pos
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
@@ -738,10 +763,10 @@ Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME user
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -752,13 +777,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION NULL
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
-TEMPORARY N
-user_comment Users and global privileges
+TEMPORARY NULL
+user_comment VIEW
Separator -----------------------------------------------------
DROP USER testuser1@localhost;
CREATE USER testuser1@localhost;
@@ -926,6 +951,31 @@ user_comment General log
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
+TABLE_NAME global_priv
+TABLE_TYPE BASE TABLE
+ENGINE MYISAM_OR_MARIA
+VERSION 11
+ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_ROWS #TBLR#
+AVG_ROW_LENGTH #ARL#
+DATA_LENGTH #DL#
+MAX_DATA_LENGTH #MDL#
+INDEX_LENGTH #IL#
+DATA_FREE #DF#
+AUTO_INCREMENT NULL
+CREATE_TIME #CRT#
+UPDATE_TIME #UT#
+CHECK_TIME #CT#
+TABLE_COLLATION utf8_bin
+CHECKSUM NULL
+CREATE_OPTIONS #CO#
+TABLE_COMMENT #TC#
+MAX_INDEX_LENGTH #MIL#
+TEMPORARY N
+user_comment Users and global privileges
+Separator -----------------------------------------------------
+TABLE_CATALOG def
+TABLE_SCHEMA mysql
TABLE_NAME gtid_slave_pos
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
@@ -1502,10 +1552,10 @@ Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME user
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
+TABLE_TYPE VIEW
+ENGINE NULL
+VERSION NULL
+ROW_FORMAT NULL
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -1516,13 +1566,13 @@ AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
-TABLE_COLLATION utf8_bin
+TABLE_COLLATION NULL
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
MAX_INDEX_LENGTH #MIL#
-TEMPORARY N
-user_comment Users and global privileges
+TEMPORARY NULL
+user_comment VIEW
Separator -----------------------------------------------------
connection default;
disconnect testuser1;
diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result
index fa1284c355e..fe181fbf069 100644
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -54,7 +54,6 @@ grantee table_catalog privilege_type
# Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES
# accessible information
##########################################################################
-DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict;
DROP USER 'testuser1'@'localhost';
CREATE USER 'testuser1'@'localhost';
@@ -63,7 +62,7 @@ CREATE USER 'testuser2'@'localhost';
DROP USER 'testuser3'@'localhost';
CREATE USER 'testuser3'@'localhost';
GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
GRANT INSERT ON *.* TO 'testuser2'@'localhost';
GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
SELECT * FROM information_schema.user_privileges
@@ -85,149 +84,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
#
# Add GRANT OPTION db_datadict.* to testuser1;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
@@ -250,149 +129,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
connect testuser1, localhost, testuser1, , db_datadict;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -401,154 +160,34 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost'
+GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost'
# Now add SELECT on *.* to testuser1;
connection default;
@@ -574,149 +213,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv Y
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
#
# Here <SELECT YES> is shown correctly for testuser1;
@@ -739,149 +258,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv Y
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv Y
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1025,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -890,154 +289,34 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE SELECT
IS_GRANTABLE YES
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv Y
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv Y
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 1025,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION
GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost'
+GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost'
connect testuser2, localhost, testuser2, , db_datadict;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1050,9 +329,9 @@ GRANTEE 'testuser2'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE UPDATE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser2@localhost
GRANT INSERT, UPDATE ON *.* TO 'testuser2'@'localhost'
@@ -1064,9 +343,9 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser3@localhost
GRANT USAGE ON *.* TO 'testuser3'@'localhost'
@@ -1093,149 +372,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1244,9 +403,9 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -1259,19 +418,19 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66'
-# Add ALL on db_datadict.* (and select on mysql.user) to testuser1;
+# Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
connection default;
GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_catalog, privilege_type;
@@ -1291,149 +450,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1442,154 +481,34 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost'
+GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost'
CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56'
USE db_datadict;
@@ -1600,154 +519,34 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION
-GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost'
+GRANT SELECT ON `mysql`.`global_priv` TO 'testuser1'@'localhost'
CREATE TABLE tb_57 ( c1 TEXT )
ENGINE = <other_engine_type>;
@@ -1773,149 +572,29 @@ GRANTEE 'testuser3'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-Host localhost
-User testuser1
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser2
-Password
-Select_priv N
-Insert_priv Y
-Update_priv Y
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
-Host localhost
-User testuser3
-Password
-Select_priv N
-Insert_priv N
-Update_priv N
-Delete_priv N
-Create_priv N
-Drop_priv N
-Reload_priv N
-Shutdown_priv N
-Process_priv N
-File_priv N
-Grant_priv N
-References_priv N
-Index_priv N
-Alter_priv N
-Show_db_priv N
-Super_priv N
-Create_tmp_table_priv N
-Lock_tables_priv N
-Execute_priv N
-Repl_slave_priv N
-Repl_client_priv N
-Create_view_priv N
-Show_view_priv N
-Create_routine_priv N
-Alter_routine_priv N
-Create_user_priv N
-Event_priv N
-Trigger_priv N
-Create_tablespace_priv N
-Delete_history_priv N
-ssl_type
-ssl_cipher
-x509_issuer
-x509_subject
-max_questions 0
-max_updates 0
-max_connections 0
-max_user_connections 0
-plugin mysql_native_password
-authentication_string
-password_expired N
-is_role N
-default_role
-max_statement_time 0.000000
+host localhost
+user testuser1
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser2
+json_detailed(priv) {
+ "access": 6,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
+host localhost
+user testuser3
+json_detailed(priv) {
+ "access": 0,
+ "plugin": "mysql_native_password",
+ "authentication_string": ""
+}
connection testuser1;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1924,9 +603,9 @@ GRANTEE 'testuser1'@'localhost'
TABLE_CATALOG def
PRIVILEGE_TYPE USAGE
IS_GRANTABLE NO
-SELECT * FROM mysql.user
+SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
-ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user'
+ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result
index 62ec33c8340..e6a2715bbb3 100644
--- a/mysql-test/suite/funcs_1/r/is_views.result
+++ b/mysql-test/suite/funcs_1/r/is_views.result
@@ -70,6 +70,7 @@ ALGORITHM varchar(10) NO
SELECT table_catalog, table_schema, table_name
FROM information_schema.views WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name
+def mysql user
################################################################################
# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
################################################################################
diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result
index c382370e892..cc6ade7daaf 100644
--- a/mysql-test/suite/funcs_1/r/is_views_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result
@@ -70,6 +70,7 @@ ALGORITHM varchar(10) NO
SELECT table_catalog, table_schema, table_name
FROM information_schema.views WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name
+def mysql user
################################################################################
# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information
################################################################################
diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result
index 62c9a245010..88bfa702be8 100644
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -3716,8 +3716,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 25
Warnings:
-Warning 1292 Incorrect time value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect time value: '1.7976931348623e308' for column 'my_double' at row 3
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3732,8 +3732,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 25
Warnings:
-Warning 1292 Incorrect time value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect time value: '1.7976931348623e308' for column 'my_double' at row 1
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -3750,8 +3750,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 24
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect time value: '9223372036854775807' for column 'my_bigint' at row 3
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3766,8 +3766,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 24
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect time value: '9223372036854775807' for column 'my_bigint' at row 1
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
@@ -4062,10 +4062,10 @@ NULL 1.7976931348623e308 3
NULL -1 5
NULL 200506271758 19
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 5
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_double' at row 6
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 6
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4080,10 +4080,10 @@ NULL 1.7976931348623e308 3
NULL -1 5
NULL 200506271758 19
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_double' at row 1
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -4100,10 +4100,10 @@ NULL 9223372036854775807 3
NULL -1 5
NULL 200506271758 18
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 5
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_bigint' at row 6
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 6
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4118,10 +4118,10 @@ NULL 9223372036854775807 3
NULL -1 5
NULL 200506271758 18
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_bigint' at row 1
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
@@ -4422,9 +4422,9 @@ NULL 1.7976931348623e308 3
NULL -1 5
2005-06-27 20050627 13
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 5
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4439,9 +4439,9 @@ NULL 1.7976931348623e308 3
NULL -1 5
2005-06-27 20050627 13
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 1
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -4458,9 +4458,9 @@ NULL 9223372036854775807 3
NULL -1 5
2005-06-27 20050627 12
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 5
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4475,9 +4475,9 @@ NULL 9223372036854775807 3
NULL -1 5
2005-06-27 20050627 12
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 1
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result
index 62c9a245010..88bfa702be8 100644
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -3716,8 +3716,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 25
Warnings:
-Warning 1292 Incorrect time value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect time value: '1.7976931348623e308' for column 'my_double' at row 3
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3732,8 +3732,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 25
Warnings:
-Warning 1292 Incorrect time value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect time value: '1.7976931348623e308' for column 'my_double' at row 1
+Warning 1292 Incorrect time value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect time value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -3750,8 +3750,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 24
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect time value: '9223372036854775807' for column 'my_bigint' at row 3
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3766,8 +3766,8 @@ NULL NULL 1
-00:00:01 -1 5
00:17:58 1758 24
Warnings:
-Warning 1292 Incorrect time value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect time value: '9223372036854775807' for column 'my_bigint' at row 1
+Warning 1292 Incorrect time value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect time value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
@@ -4062,10 +4062,10 @@ NULL 1.7976931348623e308 3
NULL -1 5
NULL 200506271758 19
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 5
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_double' at row 6
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 6
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4080,10 +4080,10 @@ NULL 1.7976931348623e308 3
NULL -1 5
NULL 200506271758 19
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_double' at row 1
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -4100,10 +4100,10 @@ NULL 9223372036854775807 3
NULL -1 5
NULL 200506271758 18
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 5
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_bigint' at row 6
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 6
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4118,10 +4118,10 @@ NULL 9223372036854775807 3
NULL -1 5
NULL 200506271758 18
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '200506271758' for column 'my_bigint' at row 1
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '200506271758' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
@@ -4422,9 +4422,9 @@ NULL 1.7976931348623e308 3
NULL -1 5
2005-06-27 20050627 13
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 2
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 5
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 2
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4439,9 +4439,9 @@ NULL 1.7976931348623e308 3
NULL -1 5
2005-06-27 20050627 13
Warnings:
-Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column 'my_double' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_double' at row 1
+Warning 1292 Incorrect datetime value: '-1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '1.7976931348623e308' for column `test`.`t1_values`.`my_double` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_double` at row 1
DROP VIEW v1;
@@ -4458,9 +4458,9 @@ NULL 9223372036854775807 3
NULL -1 5
2005-06-27 20050627 12
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 2
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 3
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 5
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 2
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 3
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 5
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -4475,9 +4475,9 @@ NULL 9223372036854775807 3
NULL -1 5
2005-06-27 20050627 12
Warnings:
-Warning 1292 Incorrect datetime value: '-9223372036854775808' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '9223372036854775807' for column 'my_bigint' at row 1
-Warning 1292 Incorrect datetime value: '-1' for column 'my_bigint' at row 1
+Warning 1292 Incorrect datetime value: '-9223372036854775808' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '9223372036854775807' for column `test`.`t1_values`.`my_bigint` at row 1
+Warning 1292 Incorrect datetime value: '-1' for column `test`.`t1_values`.`my_bigint` at row 1
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 0fe7082bea1..81ed8405b7d 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -13825,7 +13825,7 @@ CALL sp1();
@xx
0
Warnings:
-Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1
+Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 1
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -13874,7 +13874,7 @@ CALL sp1();
xx
0
Warnings:
-Warning 1366 Incorrect double value: 'asd' for column 'xx' at row 1
+Warning 1366 Incorrect double value: 'asd' for column ``.``.`xx` at row 1
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -13946,7 +13946,7 @@ CALL sp1();
xx
0
Warnings:
-Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1
+Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 1
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
diff --git a/mysql-test/suite/funcs_1/t/is_check_constraint.test b/mysql-test/suite/funcs_1/t/is_check_constraint.test
new file mode 100644
index 00000000000..30a72d02b34
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/is_check_constraint.test
@@ -0,0 +1,92 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--echo #
+--echo # MDEV-17323: Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS to 10.2
+--echo #
+CREATE user boo1;
+GRANT select,create,alter,drop on foo.* to boo1;
+SHOW GRANTS for boo1;
+CREATE user boo2;
+create database foo;
+# Connect with user boo1
+CONNECT(con1,localhost, boo1,, foo);
+
+SET check_constraint_checks=1;
+CREATE TABLE t0
+(
+ t int, check (t>32) # table constraint
+) ENGINE=myisam;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t0
+ADD CONSTRAINT CHK_t0_t CHECK(t<100);
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t0
+DROP CONSTRAINT CHK_t0_t;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t0
+ADD CONSTRAINT CHECK(t<50);
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+CREATE TABLE t1
+( t int CHECK(t>2), # field constraint
+ tt int,
+ CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints
+ CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint
+) ENGINE=InnoDB;
+ --sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t1
+DROP CONSTRAINT CHK_tt;
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+CREATE TABLE t2
+(
+name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint
+start_date DATE,
+end_date DATE,
+CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint
+)ENGINE=Innodb;
+ --sorted_result
+SELECT * from information_schema.check_constraints;
+
+ALTER TABLE t1
+ADD CONSTRAINT CHK_new_ CHECK(t>tt);
+--sorted_result
+SELECT * from information_schema.check_constraints;
+
+# Create table with same field and table check constraint name
+CREATE TABLE t3
+(
+a int,
+b int check (b>0), # field constraint named 'b'
+CONSTRAINT b check (b>10) # table constraint
+) ENGINE=InnoDB;
+ --sorted_result
+SELECT * from information_schema.check_constraints;
+
+DISCONNECT con1;
+CONNECT(con2, localhost, boo2,, test);
+ --sorted_result
+SELECT * from information_schema.check_constraints;
+
+DISCONNECT con2;
+CONNECT(con1, localhost, boo1,,foo);
+DROP TABLE t0;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+DROP DATABASE foo;
+
+DISCONNECT con1;
+--CONNECTION default
+DROP USER boo1;
+DROP USER boo2;
diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test
index a61e9187d15..53d46b83f88 100644
--- a/mysql-test/suite/funcs_1/t/is_user_privileges.test
+++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test
@@ -77,9 +77,6 @@ WHERE table_catalog IS NULL OR table_catalog <> 'def';
# 3.2.16.4: Ensure that the table does not show any information on any
# privileges that are not user privileges for the current user.
#
---disable_warnings
-DROP DATABASE IF EXISTS db_datadict;
---enable_warnings
CREATE DATABASE db_datadict;
--error 0,ER_CANNOT_USER
@@ -93,7 +90,7 @@ DROP USER 'testuser3'@'localhost';
CREATE USER 'testuser3'@'localhost';
GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost';
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
GRANT INSERT ON *.* TO 'testuser2'@'localhost';
GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
@@ -101,7 +98,7 @@ GRANT UPDATE ON *.* TO 'testuser2'@'localhost';
let $my_select1= SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
ORDER BY grantee, table_catalog, privilege_type;
-let $my_select2= SELECT * FROM mysql.user
+let $my_select2= SELECT host,user,json_detailed(priv) FROM mysql.global_priv
WHERE user LIKE 'testuser%' ORDER BY host, user;
let $my_show= SHOW GRANTS;
--vertical_results
@@ -203,10 +200,10 @@ eval $my_show;
CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
--echo
---echo # Add ALL on db_datadict.* (and select on mysql.user) to testuser1;
+--echo # Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
connection default;
GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
-GRANT SELECT ON mysql.user TO 'testuser1'@'localhost';
+GRANT SELECT ON mysql.global_priv TO 'testuser1'@'localhost';
--vertical_results
eval $my_select1;
eval $my_select2;
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index e84832458a3..76f62e7b0eb 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -9,20 +9,18 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-
+MW-360 : needs rewrite to be MariaDB gtid compatible
galera_flush : MariaDB does not have global.thread_statistics
galera_account_management : MariaDB 10.0 does not support ALTER USER
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
galera_migrate : MariaDB does not support START SLAVE USER
galera_as_master_gtid : Requires MySQL GTID
galera_as_master_gtid_change_master : Requires MySQL GTID
+galera_as_slave_gtid_replicate_do_db_cc : Requires MySQL GTID
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
GAL-419 : MDEV-13549 Galera test failures
galera_var_notify_cmd : MDEV-13549 Galera test failures
galera_as_slave_replication_bundle : MDEV-13549 Galera test failures
-galera_gcache_recover : MDEV-13549 Galera test failures
-galera_gcache_recover_full_gcache : MDEV-13549 Galera test failures
-galera_gcache_recover_manytrx : MDEV-13549 Galera test failures
galera_ssl_upgrade : MDEV-13549 Galera test failures
MW-329 : wsrep_local_replays not stable
MW-416 : MDEV-13549 Galera test failures
@@ -33,8 +31,6 @@ galera_kill_applier : race condition at the start of the test
galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status
pxc-421: Lock timeout exceeded
galera_sst_mysqldump_with_key : MDEV-16890 Galera test failure
-galera_sst_xtrabackup-v2-options : Failed to read uuid:seqno and wsrep_gtid_domain_id from joiner script
-MW-328C : Timeouts
galera_gcs_fc_limit : Timeouts
pool_of_threads: WSREP has not yet prepared node for application use
galera_var_innodb_disallow_writes : Timeout
@@ -44,8 +40,24 @@ galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
galera_var_node_address : MDEV-17151 Galera test failure on galera.galera_var_node_address
galera_binlog_stmt_autoinc: MDEV-17106 Test failure on galera.galera_binlog_stmt_autoinc
galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit
-partition : MDEV-13881 galera.partition failed in buildbot with wrong result
galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion
galera_wan : MDEV-17259: Test failure on galera.galera_wan
galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb
-galera_drop_database : test
+MW-328A : MDEV-17847 Galera test failure on MW-328[A|B|C]
+MW-328B : MDEV-17847 Galera test failure on MW-328[A|B|C]
+MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
+galera.galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
+galera.galera_var_reject_queries : assertion in inline_mysql_socket_send
+query_cache : MDEV-18137: Galera test failure on query_cache
+galera.galera_autoinc_sst_mariabackup : MDEV-18177 Galera test failure on galera_autoinc_sst_mariabackup
+galera_gcache_recover_manytrx : MDEV-15740
+galera.galera_ist_mariabackup : Leaves port open
+galera.galera_sst_rsync2 : MDEV-18178 Galera test failure on galera_sst_rsync2
+galera.galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
+galera.galera_concurrent_ctas : MDEV-18180 Galera test failure on galera.galera_concurrent_ctas
+galera.galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
+galera.galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
+galera.galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
+galera.galera_split_brain : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
+galera.galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
+galera.GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf
index b24f3603894..ef8a17a77be 100644
--- a/mysql-test/suite/galera/galera_2nodes.cnf
+++ b/mysql-test/suite/galera/galera_2nodes.cnf
@@ -2,7 +2,7 @@
!include include/default_mysqld.cnf
[mysqld]
-wsrep-on=1
+loose-innodb
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
@@ -10,20 +10,35 @@ wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
wsrep-sync-wait=15
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.1]
+loose-innodb
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep-cluster-address=gcomm://
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
+# enforce read-committed characteristics across the cluster
+wsrep_causal_reads=ON
+wsrep_sync_wait = 15
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
+
[mysqld.2]
+loose-innodb
+# debug=d:t:i:o,/tmp/mysqld.2.trace
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
@@ -34,8 +49,14 @@ wsrep_sync_wait = 15
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
+wsrep_sst_receive_address='127.0.0.2:@mysqld.2.#sst_port'
+# enforce read-committed characteristics across the cluster
+wsrep_causal_reads=ON
+wsrep_sync_wait = 15
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[ENV]
NODE_MYPORT_1= @mysqld.1.port
@@ -43,4 +64,3 @@ NODE_MYSOCK_1= @mysqld.1.socket
NODE_MYPORT_2= @mysqld.2.port
NODE_MYSOCK_2= @mysqld.2.socket
-
diff --git a/mysql-test/suite/galera/galera_2nodes_as_master.cnf b/mysql-test/suite/galera/galera_2nodes_as_master.cnf
index 33bfc475721..4403416b033 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_master.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_master.cnf
@@ -11,6 +11,9 @@ log-bin=mysqld-bin
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.1]
#galera_port=@OPT.port
@@ -30,6 +33,9 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.2]
#galera_port=@OPT.port
@@ -49,9 +55,15 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.3]
server-id=3
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[ENV]
NODE_MYPORT_1= @mysqld.1.port
@@ -62,9 +74,3 @@ NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
-
-NODE_GALERAPORT_1= @mysqld.1.#galera_port
-NODE_GALERAPORT_2= @mysqld.2.#galera_port
-
-NODE_SSTPORT_1= @mysqld.1.#sst_port
-NODE_SSTPORT_2= @mysqld.2.#sst_port
diff --git a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
index 4d9e39d2aae..d1fa7bfbfca 100644
--- a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
+++ b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf
@@ -9,17 +9,13 @@
binlog-format=row
[mysqld.1]
-log-bin
-server-id=1
-
-[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
wsrep-on=1
-log-bin
+log-bin=master-bin
+log-bin-index=master-bin
log-slave-updates
innodb-autoinc-lock-mode=2
@@ -27,38 +23,53 @@ default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
-server-id=2
+server-id=1
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
-[mysqld.3]
+[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
wsrep-on=1
-log-bin
+log-bin=master-bin
+log-bin-index=master-bin
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
-wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
+server-id=2
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
+
+[mysqld.3]
+log-bin=master-bin
+log-bin-index=master-bin
server-id=3
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
+
[ENV]
NODE_MYPORT_1= @mysqld.1.port
@@ -69,9 +80,3 @@ NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
-
-NODE_GALERAPORT_2= @mysqld.2.#galera_port
-NODE_GALERAPORT_3= @mysqld.3.#galera_port
-
-NODE_SSTPORT_2= @mysqld.2.#sst_port
-NODE_SSTPORT_3= @mysqld.3.#sst_port
diff --git a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
index ac1ca34e242..c84c4b25d2a 100644
--- a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
+++ b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf
@@ -8,14 +8,15 @@
[mysqld]
log-bin
binlog-format=row
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.1]
-server-id=1
-
-[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
log-slave-updates
@@ -24,19 +25,23 @@ default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
-server-id=2
+server-id=1
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
-[mysqld.3]
+[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
log-slave-updates
@@ -44,20 +49,24 @@ innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
-wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
-server-id=3
+server-id=2
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
-[mysqld.4]
+[mysqld.3]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
log-slave-updates
@@ -65,15 +74,24 @@ innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
-wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
-wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
-wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
-wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
+wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
+wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
+wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
+server-id=3
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
+
+[mysqld.4]
server-id=4
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[ENV]
NODE_MYPORT_1= @mysqld.1.port
@@ -87,11 +105,3 @@ NODE_MYSOCK_3= @mysqld.3.socket
NODE_MYPORT_4= @mysqld.4.port
NODE_MYSOCK_4= @mysqld.4.socket
-
-NODE_GALERAPORT_2= @mysqld.2.#galera_port
-NODE_GALERAPORT_3= @mysqld.3.#galera_port
-NODE_GALERAPORT_4= @mysqld.4.#galera_port
-
-NODE_SSTPORT_2= @mysqld.2.#sst_port
-NODE_SSTPORT_3= @mysqld.3.#sst_port
-NODE_SSTPORT_4= @mysqld.4.#sst_port
diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf
index 1c195afd54b..7f59f75b2dc 100644
--- a/mysql-test/suite/galera/galera_4nodes.cnf
+++ b/mysql-test/suite/galera/galera_4nodes.cnf
@@ -5,50 +5,68 @@
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
-wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.1]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.3]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[mysqld.4]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
+# lock schedule alg appears to be VATS by default, and it is not
+# yet compatible with galera
+innodb_lock_schedule_algorithm=FCFS
[ENV]
NODE_MYPORT_1= @mysqld.1.port
@@ -62,13 +80,3 @@ NODE_MYSOCK_3= @mysqld.3.socket
NODE_MYPORT_4= @mysqld.4.port
NODE_MYSOCK_4= @mysqld.4.socket
-
-NODE_GALERAPORT_1= @mysqld.1.#galera_port
-NODE_GALERAPORT_2= @mysqld.2.#galera_port
-NODE_GALERAPORT_3= @mysqld.3.#galera_port
-NODE_GALERAPORT_4= @mysqld.4.#galera_port
-
-NODE_SSTPORT_1= @mysqld.1.#sst_port
-NODE_SSTPORT_2= @mysqld.2.#sst_port
-NODE_SSTPORT_3= @mysqld.3.#sst_port
-NODE_SSTPORT_4= @mysqld.4.#sst_port
diff --git a/mysql-test/suite/galera/include/galera_base_port.inc b/mysql-test/suite/galera/include/galera_base_port.inc
new file mode 100644
index 00000000000..caf986ee950
--- /dev/null
+++ b/mysql-test/suite/galera/include/galera_base_port.inc
@@ -0,0 +1,8 @@
+#
+# Extract base_port from galera node.
+#
+
+# Convert "... base_port = N; ..." to "N; ..."
+--let $s1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
+# Convert "N; ..." to "N"
+--let $_NODE_GALERAPORT = `SELECT SUBSTR('$s1', 1, LOCATE(';', '$s1') - 1)`
diff --git a/mysql-test/suite/galera/include/galera_concurrent_test.inc b/mysql-test/suite/galera/include/galera_concurrent_test.inc
new file mode 100644
index 00000000000..3d1bc7674a1
--- /dev/null
+++ b/mysql-test/suite/galera/include/galera_concurrent_test.inc
@@ -0,0 +1,90 @@
+#
+# Perform a quick concurrent test on two nodes using a set of predefined statements.
+#
+# Such tests are not deterministic, so we are hoping to catch assertions, slave apply errors
+# and cases where the two nodes diverge
+#
+# Parameters:
+# - $wsrep_trx_fragment_size
+# - $count
+# - $query_node_1
+# - $query_node_1a (optional)
+# - $query_node_2
+#
+
+if (!$count) {
+ --let $count = 50;
+}
+
+if (!$node_1a_connected) {
+ --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ --let $node_1a_connected = 1
+}
+
+--echo Running a concurrent test with the following queries:
+--echo $query_node_1
+--echo $query_node_1a
+--echo $query_node_2
+
+--connection node_1
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+
+SET SESSION wsrep_sync_wait = 0;
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
+
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
+
+--disable_query_log
+--let $i = `SELECT $count`
+while ($i)
+{
+ --connection node_1
+ --send_eval $query_node_1
+
+ --connection node_1a
+ if ($query_node_1a) {
+ --send_eval $query_node_1a
+ }
+
+ --connection node_2
+ --send_eval $query_node_2
+
+ --connection node_1
+ --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ --reap
+
+ --connection node_1a
+ if ($query_node_1a) {
+ --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ --reap
+ }
+
+ --connection node_2
+ --error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ --reap
+ --dec $i
+}
+
+SET SESSION wsrep_sync_wait = 15;
+--enable_query_log
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+DROP TABLE t1;
+
+--let $query_node_1 = ""
+--let $query_node_1a = ""
+--let $query_node_2 = ""
+
+--echo Concurrent test end
diff --git a/mysql-test/suite/galera/include/galera_dump_sr_table.inc b/mysql-test/suite/galera/include/galera_dump_sr_table.inc
new file mode 100644
index 00000000000..48a55006eae
--- /dev/null
+++ b/mysql-test/suite/galera/include/galera_dump_sr_table.inc
@@ -0,0 +1,28 @@
+#
+# Dump the contents of the SR table using mysqldump
+#
+
+--let $sr_min = `SELECT MIN(seqno) FROM mysql.wsrep_streaming_log`
+--let $sr_max = `SELECT MAX(seqno) FROM mysql.wsrep_streaming_log`
+
+--let $seqno = $sr_min
+while ($seqno <= $sr_max)
+{
+ --let $sr_fragment_file = $MYSQLTEST_VARDIR/tmp/sr_fragment.log
+ --exec rm -rf $sr_fragment_file
+ --disable_query_log
+ --eval SELECT frag FROM mysql.wsrep_streaming_log WHERE seqno = $seqno INTO DUMPFILE '$sr_fragment_file'
+ --enable_query_log
+
+ --let $sr_binlog_file = $MYSQLTEST_VARDIR/tmp/sr_binlog.log
+ --exec rm -rf $sr_binlog_file
+
+ --exec cp std_data/binlog-header.log $sr_binlog_file
+ --exec cat $sr_fragment_file >> $sr_binlog_file
+
+ --replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /#[0-9]+ +[0-9]+:[0-9]+:[0-9]+/<ISO TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/ /thread_id=[0-9]+/thread_id=<QUERY_THREAD_ID>/ /table id [0-9]+/table id <TABLE_ID>/ /mapped to number [0-9]+/mapped to number <TABLE_ID>/ /auto_increment_increment=[0-9]+/auto_increment_increment=<AUTO_INCREMENT_INCREMENT>/ /auto_increment_offset=[0-9]+/auto_increment_offset=<AUTO_INCREMENT_OFFSET>/ /exec_time=[0-9]+/exec_time=<EXEC_TIME>/
+ --exec $MYSQL_BINLOG --skip-gtids $sr_binlog_file --base64-output=decode-rows --start-position=120 | grep -v 'SET @' 2>&1
+
+ --inc $seqno
+}
+
diff --git a/mysql-test/suite/galera/include/galera_load_provider.inc b/mysql-test/suite/galera/include/galera_load_provider.inc
index aeab7e6ea19..0f843597d9c 100644
--- a/mysql-test/suite/galera/include/galera_load_provider.inc
+++ b/mysql-test/suite/galera/include/galera_load_provider.inc
@@ -2,7 +2,75 @@
--disable_query_log
--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
+
+#
+# count occurences of successful node starts in error log
+#
+perl;
+ use strict;
+ my $test_log=$ENV{'LOG_FILE'} or die "LOG_FILE not set";
+ my $test_log_copy=$test_log . '.copy';
+ if (-e $test_log_copy) {
+ unlink $test_log_copy;
+ }
+
+EOF
+--copy_file $LOG_FILE $LOG_FILE.copy
+
+#
+# now join to the cluster
+#
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
+
+--enable_query_log
+
+#
+# Cluster address change above, will launch SST/IST
+# if mysqldump ST has been configured, mysqld will close all
+# client connections, and it will be hard for us to poll for
+# cluster status during SST process, therefore wait_until_connected_again.inc
+# and wait_until_ready.inc may fail in this phase
+# To workaround this, we do first lazy polling here just to see when
+# client connections will be possible, and after that check for node readyness
+#
+--disable_result_log
+--disable_query_log
+
+--error 0,1
+perl;
+ use strict;
+ my $logfile = $ENV{'LOG_FILE'} or die ("no error log file set");
+
+ my $counter = 1000;
+ #my $found = false
+
+ while ($counter > 0) {
+
+ open(FILE, "$logfile") or die("Unable to open $logfile : $!\n");
+ my $new_sync_count = () = grep(/Synchronized with group/g,<FILE>);
+ close(FILE);
+
+ open(FILEN, "$logfile.copy") or die("Unable to open $logfile.copy : $!\n");
+ my $old_sync_count = () = grep(/Synchronized with group/g,<FILEN>);
+ close(FILEN);
+
+ if ($new_sync_count > $old_sync_count ) {
+ exit(0);
+ }
+ $counter--;
+ sleep(5);
+ }
+ exit(1);
+EOF
+if ($errno)
+{
+--echo "SST failed $errno"
+}
+
+--remove_file $LOG_FILE.copy
+
--enable_query_log
+--enable_result_log
+#--eval SET GLOBAL log_error = $log_error_;
--source include/galera_wait_ready.inc
diff --git a/mysql-test/suite/galera/include/galera_sst_restore.inc b/mysql-test/suite/galera/include/galera_sst_restore.inc
index 7c9a08090ad..83d07f086d1 100644
--- a/mysql-test/suite/galera/include/galera_sst_restore.inc
+++ b/mysql-test/suite/galera/include/galera_sst_restore.inc
@@ -20,7 +20,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
-
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
--disable_query_log
--eval SET GLOBAL wsrep_sst_method = '$wsrep_sst_method_orig';
--eval SET GLOBAL wsrep_sst_receive_address = '$wsrep_sst_receive_address_orig';
diff --git a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
index c8869746bd1..d6d7552f7b6 100644
--- a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
+++ b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
@@ -55,6 +55,14 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
--connection node_2
--source suite/galera/include/galera_load_provider.inc
+#
+# client connections were killed by provider load, so have to re-open here
+#
+--disconnect node_2
+--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2
+--enable_reconnect
+
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
diff --git a/mysql-test/suite/galera/include/galera_unload_provider.inc b/mysql-test/suite/galera/include/galera_unload_provider.inc
index edc7eb31e0e..cd841f51fbc 100644
--- a/mysql-test/suite/galera/include/galera_unload_provider.inc
+++ b/mysql-test/suite/galera/include/galera_unload_provider.inc
@@ -3,5 +3,13 @@
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
--let $wsrep_provider_orig = `SELECT @@wsrep_provider`
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+--let $wsrep_error_log_orig = `SELECT @@log_error`
+if(!$wsrep_log_error_orig)
+{
+ # MySQL Server on windows is started with --console and thus
+ # does not know the location of its .err log, use default location
+ let $wsrep_log_error_orig = $MYSQLTEST_VARDIR/log/mysqld.2.err;
+}
+--let LOG_FILE= $wsrep_log_error_orig
SET GLOBAL wsrep_provider = 'none';
diff --git a/mysql-test/suite/galera/include/have_filekeymanagement.inc b/mysql-test/suite/galera/include/have_filekeymanagement.inc
new file mode 100644
index 00000000000..f5507ca4548
--- /dev/null
+++ b/mysql-test/suite/galera/include/have_filekeymanagement.inc
@@ -0,0 +1,3 @@
+#
+# Used in galera/suite.pm to check file key management plugin
+#
diff --git a/mysql-test/suite/galera/r/GAL-382.result b/mysql-test/suite/galera/r/GAL-382.result
index fb7c229bd56..137efe4efba 100644
--- a/mysql-test/suite/galera/r/GAL-382.result
+++ b/mysql-test/suite/galera/r/GAL-382.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb;
insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result
index 3b55b7589b7..3dfc32ffb8c 100644
--- a/mysql-test/suite/galera/r/GAL-401.result
+++ b/mysql-test/suite/galera/r/GAL-401.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
connection node_2;
SET @@global.wsrep_desync = 1;
diff --git a/mysql-test/suite/galera/r/GAL-480.result b/mysql-test/suite/galera/r/GAL-480.result
index 143f48a69e3..8a4f8edcdd6 100644
--- a/mysql-test/suite/galera/r/GAL-480.result
+++ b/mysql-test/suite/galera/r/GAL-480.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB;
FLUSH TABLE t1 FOR EXPORT;
diff --git a/mysql-test/suite/galera/r/GCF-1081.result b/mysql-test/suite/galera/r/GCF-1081.result
new file mode 100644
index 00000000000..ede512ec6b1
--- /dev/null
+++ b/mysql-test/suite/galera/r/GCF-1081.result
@@ -0,0 +1,47 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0), (3, 0);
+CREATE PROCEDURE proc_update ()
+BEGIN
+UPDATE t1 SET f2 = 1 where f1 > 0;
+END|
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+CALL proc_update ();;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+connection node_1a;
+SET GLOBAL DEBUG = 'd,sync.wsrep_before_BF_victim_unlock';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+connection node_2;
+INSERT INTO t1 VALUES (2, 2);;
+connection node_1a;
+SET SESSION DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached';
+SET GLOBAL DEBUG = '';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_2;
+SELECT * FROM t1;
+f1 f2
+1 1
+2 2
+3 1
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+1 1
+2 2
+3 1
+wsrep_local_replays
+1
+DROP PROCEDURE proc_update;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/GCF-939.result b/mysql-test/suite/galera/r/GCF-939.result
new file mode 100644
index 00000000000..24d4eab67e5
--- /dev/null
+++ b/mysql-test/suite/galera/r/GCF-939.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+connection node_1;
+DROP TABLE t1;
+ERROR 42S02: Unknown table 'test.t1'
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+GRA_.log
+GRA_.log
+DROP TABLE t1;
+CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query");
+connection node_2;
+CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query");
diff --git a/mysql-test/suite/galera/r/MDEV-15443.result b/mysql-test/suite/galera/r/MDEV-15443.result
index 618e5459878..21332b372e8 100644
--- a/mysql-test/suite/galera/r/MDEV-15443.result
+++ b/mysql-test/suite/galera/r/MDEV-15443.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/MW-252.result b/mysql-test/suite/galera/r/MW-252.result
index 795d3fff670..4d458802614 100644
--- a/mysql-test/suite/galera/r/MW-252.result
+++ b/mysql-test/suite/galera/r/MW-252.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
FLUSH TABLES WITH READ LOCK;
diff --git a/mysql-test/suite/galera/r/MW-258.result b/mysql-test/suite/galera/r/MW-258.result
index 1c2a1744c98..22963557daf 100644
--- a/mysql-test/suite/galera/r/MW-258.result
+++ b/mysql-test/suite/galera/r/MW-258.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
LOCK TABLE t1 WRITE;
diff --git a/mysql-test/suite/galera/r/MW-259.result b/mysql-test/suite/galera/r/MW-259.result
index 5256a95c52c..9a0f2ccfa23 100644
--- a/mysql-test/suite/galera/r/MW-259.result
+++ b/mysql-test/suite/galera/r/MW-259.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result
index 0f6c0be25fe..11a0a7df387 100644
--- a/mysql-test/suite/galera/r/MW-284.result
+++ b/mysql-test/suite/galera/r/MW-284.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -24,7 +26,9 @@ RESET SLAVE ALL;
CALL mtr.add_suppression('failed registering on master');
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
connection node_1;
+set global wsrep_on=OFF;
RESET MASTER;
+set global wsrep_on=ON;
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
connection node_2;
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
diff --git a/mysql-test/suite/galera/r/MW-285.result b/mysql-test/suite/galera/r/MW-285.result
index 8c5a21fcbee..762f22d5d25 100644
--- a/mysql-test/suite/galera/r/MW-285.result
+++ b/mysql-test/suite/galera/r/MW-285.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
CREATE TABLE child (
diff --git a/mysql-test/suite/galera/r/MW-286.result b/mysql-test/suite/galera/r/MW-286.result
index f3bef6f7516..b3accb1cd9b 100644
--- a/mysql-test/suite/galera/r/MW-286.result
+++ b/mysql-test/suite/galera/r/MW-286.result
@@ -1,15 +1,24 @@
+connection node_2;
+connection node_1;
connection node_1;
-CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
-INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
-INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
-INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
+INSERT INTO t1 (f1) VALUES (1), (2), (3);
connection node_2;
SET GLOBAL wsrep_desync = TRUE;
SET wsrep_on = FALSE;
-ALTER TABLE t1 ADD PRIMARY KEY (f1);
+SET SESSION debug_sync = "alter_table_inplace_after_lock_upgrade SIGNAL mdl_locked WAIT_FOR mdl_continue";
+ALTER TABLE t1 ADD PRIMARY KEY (f1);;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION debug_sync = "now WAIT_FOR mdl_locked";
+connection node_1;
+INSERT INTO t1(f1) VALUES (11);
+connection node_2a;
+SET debug_sync = "now SIGNAL mdl_continue";
+SET debug_sync='RESET';
+connection node_2;
+ERROR 70100: Query execution was interrupted
SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;
connection node_1;
DROP TABLE t1;
-DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/MW-292.result b/mysql-test/suite/galera/r/MW-292.result
index 5b9214ace2a..81e5a316b63 100644
--- a/mysql-test/suite/galera/r/MW-292.result
+++ b/mysql-test/suite/galera/r/MW-292.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE rand_table (f1 FLOAT);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a');
@@ -10,19 +12,28 @@ SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
f1 f2
2 a
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
-connection node_1;
-COMMIT;;
-connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
-SET SESSION wsrep_on = 0;
-SET SESSION wsrep_on = 1;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
TIMEDIFF(SYSDATE(), NOW()) < 2
diff --git a/mysql-test/suite/galera/r/MW-309.result b/mysql-test/suite/galera/r/MW-309.result
index 3dd49a041ee..0169b56e3e1 100644
--- a/mysql-test/suite/galera/r/MW-309.result
+++ b/mysql-test/suite/galera/r/MW-309.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/r/MW-313.result b/mysql-test/suite/galera/r/MW-313.result
index dc605ffc370..909caf77f1d 100644
--- a/mysql-test/suite/galera/r/MW-313.result
+++ b/mysql-test/suite/galera/r/MW-313.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 SELECT * FROM t1;
diff --git a/mysql-test/suite/galera/r/MW-328A.result b/mysql-test/suite/galera/r/MW-328A.result
index db0301b6bf2..f4bb018b442 100644
--- a/mysql-test/suite/galera/r/MW-328A.result
+++ b/mysql-test/suite/galera/r/MW-328A.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1);
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
@@ -14,10 +16,6 @@ connection node_1X;
CALL proc_update();;
connection node_2;
SET SESSION wsrep_retry_autocommit = 0;
-have_successes
-1
-have_deadlocks
-1
connection node_1;
connection node_1X;
Got one of the listed errors
@@ -25,3 +23,22 @@ connection node_1;
DROP PROCEDURE proc_update;
DROP TABLE t1, t2;
CALL mtr.add_suppression("conflict state 3 after post commit");
+connection node_1;
+CREATE TABLE t1 (i int primary key, j int) engine=innodb;
+INSERT INTO t1 values (1,0);
+BEGIN;
+UPDATE t1 SET j=1 WHERE i=1;
+connection node_2;
+UPDATE t1 SET j=2 WHERE i=1;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+i j
+1 2
+connection node_2;
+SELECT * FROM t1;
+i j
+1 2
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-328B.result b/mysql-test/suite/galera/r/MW-328B.result
index e898e315ca8..d29c3a50f3d 100644
--- a/mysql-test/suite/galera/r/MW-328B.result
+++ b/mysql-test/suite/galera/r/MW-328B.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1);
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/MW-328C.result b/mysql-test/suite/galera/r/MW-328C.result
index d8e164e7b4a..748f9420764 100644
--- a/mysql-test/suite/galera/r/MW-328C.result
+++ b/mysql-test/suite/galera/r/MW-328C.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1);
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/MW-328D.result b/mysql-test/suite/galera/r/MW-328D.result
index 6562136ec27..43e1cefe08f 100644
--- a/mysql-test/suite/galera/r/MW-328D.result
+++ b/mysql-test/suite/galera/r/MW-328D.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (i INT) ENGINE = InnoDB;
INSERT INTO t1 (i) VALUES(1);
CREATE TABLE t2 (i INT) ENGINE = InnoDB;
diff --git a/mysql-test/suite/galera/r/MW-328E.result b/mysql-test/suite/galera/r/MW-328E.result
index 89654ec066a..729fdea1a63 100644
--- a/mysql-test/suite/galera/r/MW-328E.result
+++ b/mysql-test/suite/galera/r/MW-328E.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
create table t1 (i int primary key, j int) engine=innodb;
create table t2 (i int primary key, j int) engine=innodb;
insert into t1 values (1,0);
diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result
index a3cb7277a9c..334ff9f80fb 100644
--- a/mysql-test/suite/galera/r/MW-329.result
+++ b/mysql-test/suite/galera/r/MW-329.result
@@ -1,10 +1,6 @@
CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1),(65535);
-FLUSH STATUS;
-SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
-VARIABLE_VALUE = 0
-1
CREATE PROCEDURE proc_insert ()
BEGIN
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
@@ -16,10 +12,7 @@ END|
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
CALL proc_insert();;
-connection node_2;
-CALL mtr.add_suppression("WSREP: Failed to report last committed .*");
-SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
-VARIABLE_VALUE > 0
+wsrep_local_replays
1
connection node_1;
connection node_1b;
diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
index e35044d872b..5961d1f3e24 100644
--- a/mysql-test/suite/galera/r/MW-336.result
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 values(0);
connection node_1;
diff --git a/mysql-test/suite/galera/r/MW-357.result b/mysql-test/suite/galera/r/MW-357.result
index 35855e21233..dc391be4dd3 100644
--- a/mysql-test/suite/galera/r/MW-357.result
+++ b/mysql-test/suite/galera/r/MW-357.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
SET GLOBAL wsrep_slave_threads = 0;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
diff --git a/mysql-test/suite/galera/r/MW-360.result b/mysql-test/suite/galera/r/MW-360.result
new file mode 100644
index 00000000000..f20d5be2135
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-360.result
@@ -0,0 +1,41 @@
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+DROP TABLE t1, t2;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+DROP TABLE t1, t2;
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (3);
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (3);
+DROP TABLE t1, t2, t3;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2);
+DROP TABLE t1;
+DROP TABLE t1;
+gtid_executed_equal
+1
diff --git a/mysql-test/suite/galera/r/MW-369.result b/mysql-test/suite/galera/r/MW-369.result
index 516904d1b2a..9f0a77edbbc 100644
--- a/mysql-test/suite/galera/r/MW-369.result
+++ b/mysql-test/suite/galera/r/MW-369.result
@@ -1,25 +1,36 @@
+connection node_2;
+connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
DELETE FROM p WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
INSERT INTO c VALUES (1, 1);
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
SELECT * FROM p;
f1 f2
1 0
@@ -29,6 +40,7 @@ f1 p_id
1 1
DROP TABLE c;
DROP TABLE p;
+connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
f2 INTEGER,
@@ -36,22 +48,30 @@ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
UPDATE c SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+connection node_2;
SELECT * FROM p;
f1 f2
1 1
@@ -61,28 +81,37 @@ f1 p_id f2
1 1 1
DROP TABLE c;
DROP TABLE p;
+connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
DELETE FROM c WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+connection node_2;
SELECT * FROM p;
f1 f2
1 1
@@ -95,23 +124,31 @@ CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ;
INSERT INTO p VALUES (1, 0);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
INSERT INTO c VALUES (1, 0);;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
SELECT * FROM p;
f1 f2
1 0
@@ -127,23 +164,31 @@ ON DELETE CASCADE) ;
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1, 0);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
DELETE FROM p WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
UPDATE c SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
SELECT * FROM p;
f1 f2
1 0
@@ -153,3 +198,87 @@ f1 p_id f2
1 1 1
DROP TABLE c;
DROP TABLE p;
+#
+# Start of 10.4 tests
+#
+connection node_1;
+CREATE TABLE pf (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE cf (
+f1 INTEGER PRIMARY KEY,
+p_id INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pf (f1)
+);
+INSERT INTO pf VALUES (1);
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+INSERT INTO cf (f1, p_id) VALUES (10, 1);
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+INSERT INTO cf (f1, p_id) VALUES (20, 1);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+connection node_2;
+SELECT * FROM pf;
+f1
+1
+SELECT * FROM cf;
+f1 p_id
+10 1
+20 1
+DROP TABLE cf;
+DROP TABLE pf;
+connection node_1;
+CREATE TABLE pg (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE cg (f1 INTEGER PRIMARY KEY, p_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pg (f1)) ;
+INSERT INTO pg VALUES (1, 0);
+INSERT INTO pg VALUES (2, 0);
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE pg SET f2 = 1 WHERE f1 = 1;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+INSERT INTO cg VALUES (1, 1, 0);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+connection node_2;
+SELECT * FROM pg;
+f1 f2
+1 1
+2 0
+SELECT * FROM cg;
+f1 p_id f2
+1 1 0
+DROP TABLE cg;
+DROP TABLE pg;
diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result
index a2cf02712bb..3e532b3e12d 100644
--- a/mysql-test/suite/galera/r/MW-388.result
+++ b/mysql-test/suite/galera/r/MW-388.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
CREATE PROCEDURE insert_proc ()
@@ -18,7 +20,7 @@ connection node_1a;
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
SET SESSION wsrep_sync_wait = 0;
-SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue';
+SET SESSION DEBUG_SYNC = 'wsrep_after_certification SIGNAL wsrep_after_certification_reached WAIT_FOR wsrep_after_certification_continue';
CALL insert_proc ();;
connection node_1a;
SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached";
@@ -29,7 +31,7 @@ connection node_2;
connection node_1;
SELECT @errno = 1213;
@errno = 1213
-0
+1
SELECT * FROM t1;
f1 f2
1 node 2
diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result
index 9be98d629fb..f692c90d611 100644
--- a/mysql-test/suite/galera/r/MW-402.result
+++ b/mysql-test/suite/galera/r/MW-402.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
@@ -20,14 +22,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
@@ -60,14 +62,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
@@ -102,14 +104,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
@@ -135,14 +137,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
@@ -159,8 +161,10 @@ DROP TABLE p;
connection node_1;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
-CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
-CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
INSERT INTO p1 VALUES (1, 0);
INSERT INTO p2 VALUES (1, 0);
@@ -179,14 +183,14 @@ connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
connection node_1;
connection node_2;
@@ -197,4 +201,52 @@ f1 f2
1 2
SELECT * FROM c;
f1 p1_id p2_id f2
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
+connection node_1;
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+f2 INTEGER,
+CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ON DELETE CASCADE,
+CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ON DELETE CASCADE);
+INSERT INTO p1 VALUES (1, 0);
+INSERT INTO p2 VALUES (1, 0);
+INSERT INTO c VALUES (1, 1, 1, 0);
+connection node_1a;
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+DELETE FROM p2 WHERE f1=1;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+DELETE FROM p1 WHERE f1=1;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
+SELECT * FROM p1;
+f1 f2
+SELECT * FROM p2;
+f1 f2
+1 0
+SELECT * FROM c;
+f1 p1_id p2_id f2
DROP TABLE c,p1,p2;
diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result
index 05399b213a8..537e648df6b 100644
--- a/mysql-test/suite/galera/r/MW-416.result
+++ b/mysql-test/suite/galera/r/MW-416.result
@@ -109,6 +109,5 @@ mtr
mysql
performance_schema
test
-SHOW GLOBAL STATUS LIKE 'wsrep_replicated';
-Variable_name Value
-wsrep_replicated 3
+wsrep_replicated_after_diff
+1
diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result
index 00010eaedcb..36cbfadf302 100644
--- a/mysql-test/suite/galera/r/MW-86-wait1.result
+++ b/mysql-test/suite/galera/r/MW-86-wait1.result
@@ -1,11 +1,13 @@
connection node_2;
+connection node_1;
+SET @orig_debug=@@debug;
+connection node_2;
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
+set debug_sync='RESET';
SET SESSION wsrep_sync_wait = 1;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
connection node_1;
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait1 VALUES (1);
@@ -36,16 +38,11 @@ SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = @orig_debug;
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait1;
-SET GLOBAL debug = NULL;
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
-SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result
index 47e0ebc1342..6ac2c5f5e1f 100644
--- a/mysql-test/suite/galera/r/MW-86-wait8.result
+++ b/mysql-test/suite/galera/r/MW-86-wait8.result
@@ -1,11 +1,12 @@
connection node_2;
+connection node_1;
+SET @orig_debug=@@debug;
+connection node_2;
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
SET SESSION wsrep_sync_wait = 8;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
connection node_1;
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait8 VALUES (1);
@@ -38,16 +39,11 @@ SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = @orig_debug;
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait8;
-SET GLOBAL debug = NULL;
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
-SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
diff --git a/mysql-test/suite/galera/r/MW-86.result b/mysql-test/suite/galera/r/MW-86.result
new file mode 100644
index 00000000000..bca9be93191
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-86.result
@@ -0,0 +1,78 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET SESSION wsrep_sync_wait = 1;
+SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+connection node_1;
+CREATE DATABASE db1;
+CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO bar VALUES (1);
+connection node_2;
+SHOW BINARY LOGS;
+SHOW BINLOG EVENTS;
+SHOW COLUMNS FROM t1;
+SHOW CREATE DATABASE db1;
+SHOW CREATE EVENT e1;
+SHOW CREATE FUNCTION f1;
+SHOW CREATE PROCEDURE p1;
+SHOW CREATE TABLE t1;
+SHOW CREATE TRIGGER tr1;
+SHOW CREATE VIEW v1;
+SHOW DATABASES;
+SHOW ENGINE InnoDB STATUS;
+SHOW FUNCTION CODE f1;
+SHOW FUNCTION STATUS;
+SHOW GRANTS FOR 'root'@'localhost';
+SHOW INDEX FROM t1;
+SHOW OPEN TABLES;
+SHOW PROCEDURE CODE p1;
+SHOW PROCEDURE STATUS;
+SHOW PRIVILEGES;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SHOW TABLE STATUS;
+SHOW TABLES;
+SHOW TRIGGERS;
+SHOW GLOBAL VARIABLES LIKE 'foo_bar';
+SHOW WARNINGS;
+SET GLOBAL DEBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET SESSION wsrep_sync_wait = 8;
+DROP DATABASE db1;
+connection node_2;
+SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
+SET SESSION wsrep_sync_wait = 8;
+SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
+connection node_1;
+CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO q VALUES (1);
+connection node_2;
+SHOW BINARY LOGS;
+SHOW BINLOG EVENTS;
+SHOW COLUMNS FROM t1;
+SHOW CREATE DATABASE db1;
+SHOW CREATE EVENT e1;
+SHOW CREATE FUNCTION f1;
+SHOW CREATE PROCEDURE p1;
+SHOW CREATE TABLE t1;
+SHOW CREATE TRIGGER tr1;
+SHOW CREATE VIEW v1;
+SHOW DATABASES;
+SHOW ENGINE InnoDB STATUS;
+SHOW FUNCTION CODE f1;
+SHOW FUNCTION STATUS;
+SHOW GRANTS FOR 'root'@'localhost';
+SHOW INDEX FROM t1;
+SHOW OPEN TABLES;
+SHOW PROCEDURE CODE p1;
+SHOW PROCEDURE STATUS;
+SHOW PRIVILEGES;
+SHOW STATUS LIKE 'wsrep_cluster_size';
+SHOW TABLE STATUS;
+SHOW TABLES;
+SHOW TRIGGERS;
+SHOW GLOBAL VARIABLES LIKE 'foo_bar';
+SHOW WARNINGS;
+SET GLOBAL DEBUG = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
diff --git a/mysql-test/suite/galera/r/basic.result b/mysql-test/suite/galera/r/basic.result
index e85c805253f..10f180e7a94 100644
--- a/mysql-test/suite/galera/r/basic.result
+++ b/mysql-test/suite/galera/r/basic.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
USE test;
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
diff --git a/mysql-test/suite/galera/r/binlog_checksum.result b/mysql-test/suite/galera/r/binlog_checksum.result
index e86f3892ac7..4106354eb7d 100644
--- a/mysql-test/suite/galera/r/binlog_checksum.result
+++ b/mysql-test/suite/galera/r/binlog_checksum.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
diff --git a/mysql-test/suite/galera/r/create.result b/mysql-test/suite/galera/r/create.result
index a445b32e8bf..6ad94dd3d43 100644
--- a/mysql-test/suite/galera/r/create.result
+++ b/mysql-test/suite/galera/r/create.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
#
diff --git a/mysql-test/suite/galera/r/enforce_storage_engine.result b/mysql-test/suite/galera/r/enforce_storage_engine.result
index 746aa22bf20..1a453241427 100644
--- a/mysql-test/suite/galera/r/enforce_storage_engine.result
+++ b/mysql-test/suite/galera/r/enforce_storage_engine.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-8831 : enforce_storage_engine doesn't block table creation on
# other nodes (galera cluster)
diff --git a/mysql-test/suite/galera/r/enforce_storage_engine2.result b/mysql-test/suite/galera/r/enforce_storage_engine2.result
index 128994ed221..8b174139eae 100644
--- a/mysql-test/suite/galera/r/enforce_storage_engine2.result
+++ b/mysql-test/suite/galera/r/enforce_storage_engine2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-9312: storage engine not enforced during galera cluster
# replication
diff --git a/mysql-test/suite/galera/r/ev51914.result b/mysql-test/suite/galera/r/ev51914.result
index 3f3d67d01ef..b9d8a82bfa0 100644
--- a/mysql-test/suite/galera/r/ev51914.result
+++ b/mysql-test/suite/galera/r/ev51914.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SAVEPOINT in a stored function should be forbidden
CREATE FUNCTION f1 () RETURNS INT BEGIN
diff --git a/mysql-test/suite/galera/r/fk.result b/mysql-test/suite/galera/r/fk.result
index ab8e1c8f680..17fc99a904e 100644
--- a/mysql-test/suite/galera/r/fk.result
+++ b/mysql-test/suite/galera/r/fk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
USE test;
# On node_1
diff --git a/mysql-test/suite/galera/r/galera#414.result b/mysql-test/suite/galera/r/galera#414.result
index 34dcb6242d3..2c1dccfd131 100644
--- a/mysql-test/suite/galera/r/galera#414.result
+++ b/mysql-test/suite/galera/r/galera#414.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera#500.result b/mysql-test/suite/galera/r/galera#500.result
index 6a07d0359a4..a5ab0b19718 100644
--- a/mysql-test/suite/galera/r/galera#500.result
+++ b/mysql-test/suite/galera/r/galera#500.result
@@ -1,10 +1,18 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
SET SESSION wsrep_sync_wait = default;
SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
+connection node_2;
SET SESSION wsrep_on=0;
+connection node_2;
CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
diff --git a/mysql-test/suite/galera/r/galera#505.result b/mysql-test/suite/galera/r/galera#505.result
index 8d3e3ec072a..bc7eb3b9ed4 100644
--- a/mysql-test/suite/galera/r/galera#505.result
+++ b/mysql-test/suite/galera/r/galera#505.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION wsrep_sync_wait=0;
SET SESSION wsrep_sync_wait=DEFAULT;
diff --git a/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result b/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
new file mode 100644
index 00000000000..5ae577a6323
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_FK_duplicate_client_insert.result
@@ -0,0 +1,382 @@
+connection node_2;
+connection node_1;
+CREATE TABLE user(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE user_session(id int primary key, fk1 int, fk2 int) ENGINE=InnoDB;
+alter table user_session add foreign key (fk1) references user(id);
+INSERT INTO user values (1,0), (2,0), (3,0), (4,0);
+INSERT INTO user_session values (1,1,1);
+connect node_1_u, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_1_i, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2_i, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+"Phase 1: plain SQL statements"
+connection node_1;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+update user set j = j + 1 WHERE id > 0;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+insert into user_session(id,fk1,fk2) values (2, 2, 2);
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+insert into user_session(id,fk1,fk2) values (2, 2, 3);
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+"Phase 2: prepared statements"
+connection node_1_u;
+prepare upd from 'update user set j = j + 1 WHERE id > 0';
+connection node_1_i;
+prepare ins1 from 'insert into user_session(id,fk1,fk2) values (2, 2, 2)';
+connection node_2_i;
+prepare ins2 from 'insert into user_session(id,fk1,fk2) values (2, 2, 3)';
+connection node_1;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1_u;
+begin;
+execute upd;
+connection node_1_i;
+set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+execute ins1;
+connection node_1;
+set debug_sync='now WAIT_FOR ins_waiting';
+connection node_2_i;
+execute ins2;
+connection node_1;
+set debug_sync='now SIGNAL cont_ins';
+connection node_1_i;
+connection node_1_u;
+commit;
+connection node_1;
+truncate user_session;
+set debug_sync = reset;
+connection node_1;
+drop table user_session,user;
diff --git a/mysql-test/suite/galera/r/galera_admin.result b/mysql-test/suite/galera/r/galera_admin.result
index ed753247236..01e2aac16b2 100644
--- a/mysql-test/suite/galera/r/galera_admin.result
+++ b/mysql-test/suite/galera/r/galera_admin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
DROP TABLE IF EXISTS t1, t2;
DROP TABLE IF EXISTS x1, x2;
connection node_1;
@@ -16,7 +18,9 @@ connection node_2;
connection node_1;
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
connection node_2;
# OPTIMIZE test
diff --git a/mysql-test/suite/galera/r/galera_alter_engine_innodb.result b/mysql-test/suite/galera/r/galera_alter_engine_innodb.result
index ff6ab792c0e..dfa30441f85 100644
--- a/mysql-test/suite/galera/r/galera_alter_engine_innodb.result
+++ b/mysql-test/suite/galera/r/galera_alter_engine_innodb.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
index 389383858ac..b3a9bdd30df 100644
--- a/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
+++ b/mysql-test/suite/galera/r/galera_alter_engine_myisam.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_replicate_myisam = TRUE;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/galera_alter_table_force.result b/mysql-test/suite/galera/r/galera_alter_table_force.result
index d0a2f81b631..271796422cd 100644
--- a/mysql-test/suite/galera/r/galera_alter_table_force.result
+++ b/mysql-test/suite/galera/r/galera_alter_table_force.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 FORCE;
diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
index a6607906661..11fda5d8aab 100644
--- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
+++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
index 9711100d155..a5aeb6eb366 100644
--- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
+++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION wsrep_sync_wait = 0;
SET SESSION lock_wait_timeout = 60;
diff --git a/mysql-test/suite/galera/r/galera_as_master.result b/mysql-test/suite/galera/r/galera_as_master.result
index 2a7262359fa..4aca328be56 100644
--- a/mysql-test/suite/galera/r/galera_as_master.result
+++ b/mysql-test/suite/galera/r/galera_as_master.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
START SLAVE;
connection node_1;
@@ -54,4 +56,6 @@ STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
connection node_1;
+set global wsrep_on=OFF;
RESET MASTER;
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_as_master_gtid.result b/mysql-test/suite/galera/r/galera_as_master_gtid.result
index 8dfe462d495..4f5c38b607a 100644
--- a/mysql-test/suite/galera/r/galera_as_master_gtid.result
+++ b/mysql-test/suite/galera/r/galera_as_master_gtid.result
@@ -5,55 +5,19 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
uuids_do_not_match
1
-SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 120;
-Log_name Pos Event_type Server_id End_log_pos Info
-mysqld-bin.000002 120 Previous_gtids 1 151
-mysqld-bin.000002 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
-mysqld-bin.000002 199 Query 1 327 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000002 327 Gtid 1 375 SET @@SESSION.GTID_NEXT= '<effective_uuid>:2'
-mysqld-bin.000002 375 Query 1 452 BEGIN
-mysqld-bin.000002 452 Table_map 1 497 table_id: # (test.t1)
-mysqld-bin.000002 497 Write_rows 1 537 table_id: # flags: STMT_END_F
-mysqld-bin.000002 537 Xid 1 568 COMMIT /* xid=# */
INSERT INTO t1 VALUES(2);
uuids_do_not_match
1
uuids_match
1
-SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 120;
-Log_name Pos Event_type Server_id End_log_pos Info
-mysqld-bin.000003 120 Previous_gtids 2 151
-mysqld-bin.000003 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
-mysqld-bin.000003 199 Query 1 327 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000003 327 Gtid 1 375 SET @@SESSION.GTID_NEXT= '<effective_uuid>:2'
-mysqld-bin.000003 375 Query 1 443 BEGIN
-mysqld-bin.000003 443 Table_map 1 488 table_id: # (test.t1)
-mysqld-bin.000003 488 Write_rows 1 528 table_id: # flags: STMT_END_F
-mysqld-bin.000003 528 Xid 1 559 COMMIT /* xid=# */
-mysqld-bin.000003 559 Gtid 2 607 SET @@SESSION.GTID_NEXT= '<effective_uuid>:3'
-mysqld-bin.000003 607 Query 2 684 BEGIN
-mysqld-bin.000003 684 Table_map 2 729 table_id: # (test.t1)
-mysqld-bin.000003 729 Write_rows 2 769 table_id: # flags: STMT_END_F
-mysqld-bin.000003 769 Xid 2 800 COMMIT /* xid=# */
uuids_do_not_match
1
uuids_match
1
-SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
-Log_name Pos Event_type Server_id End_log_pos Info
-mysqld-bin.000001 120 Previous_gtids 3 151
-mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
-mysqld-bin.000001 199 Query 1 327 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000001 327 Gtid 1 375 SET @@SESSION.GTID_NEXT= '<effective_uuid>:2'
-mysqld-bin.000001 375 Query 1 443 BEGIN
-mysqld-bin.000001 443 Table_map 1 488 table_id: # (test.t1)
-mysqld-bin.000001 488 Write_rows 1 528 table_id: # flags: STMT_END_F
-mysqld-bin.000001 528 Xid 1 559 COMMIT /* xid=# */
-mysqld-bin.000001 559 Gtid 2 607 SET @@SESSION.GTID_NEXT= '<effective_uuid>:3'
-mysqld-bin.000001 607 Query 2 675 BEGIN
-mysqld-bin.000001 675 Table_map 2 720 table_id: # (test.t1)
-mysqld-bin.000001 720 Write_rows 2 760 table_id: # flags: STMT_END_F
-mysqld-bin.000001 760 Xid 2 791 COMMIT /* xid=# */
DROP TABLE t1;
+gtid_executed_equal
+1
+gtid_executed_equal
+1
STOP SLAVE;
RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/r/galera_as_master_large.result b/mysql-test/suite/galera/r/galera_as_master_large.result
index dad74211af9..826d2f32057 100644
--- a/mysql-test/suite/galera/r/galera_as_master_large.result
+++ b/mysql-test/suite/galera/r/galera_as_master_large.result
@@ -2,6 +2,8 @@
# MDEV-9044 : Getting binlog corruption on my Galera cluster (10.1.8)
# making it impossible to async slave.
#
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
START SLAVE;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_as_slave.result b/mysql-test/suite/galera/r/galera_as_slave.result
index 9ccb5106234..391ceecd509 100644
--- a/mysql-test/suite/galera/r/galera_as_slave.result
+++ b/mysql-test/suite/galera/r/galera_as_slave.result
@@ -1,12 +1,14 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
connection node_2;
INSERT INTO t1 VALUES (2);
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
@@ -15,10 +17,10 @@ connection node_2;
SELECT COUNT(*) = 3 FROM t1;
COUNT(*) = 3
1
-connection node_1;
+connection node_3;
DROP TABLE t1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
-connection node_1;
+connection node_3;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
index 60f3216aa9c..6ac51f44950 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
@@ -1,7 +1,9 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
SET SESSION binlog_format='STATEMENT';
CREATE TABLE t1 (
i int(11) NOT NULL AUTO_INCREMENT,
@@ -60,7 +62,7 @@ binlog_format ROW
show variables like 'auto_increment_increment';
Variable_name Value
auto_increment_increment 2
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
select * from t1;
i c
1 dummy_text
@@ -79,10 +81,10 @@ binlog_format ROW
show variables like 'auto_increment_increment';
Variable_name Value
auto_increment_increment 2
-connection node_1;
+connection node_3;
DROP TABLE t1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
-connection node_1;
+connection node_3;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid.result b/mysql-test/suite/galera/r/galera_as_slave_gtid.result
index 0ef9d208bf4..180b72bf729 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_gtid.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid.result
@@ -1,7 +1,9 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
@@ -10,15 +12,15 @@ LENGTH(@@global.gtid_binlog_state) > 1
connection node_2;
gtid_binlog_state_equal
1
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
gtid_binlog_state_equal
1
-connection node_1;
-DROP TABLE t1;
connection node_3;
+DROP TABLE t1;
+connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result
new file mode 100644
index 00000000000..9589d319991
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result
@@ -0,0 +1,159 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+connection node_3;
+RESET MASTER;
+connection node_2;
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+START SLAVE;
+connection node_3;
+CREATE SCHEMA test1;
+CREATE SCHEMA test2;
+USE test1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
+USE test2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
+INSERT INTO test1.t1 (f1) VALUES (1);
+INSERT INTO test2.t1 (f1) VALUES (1);
+INSERT INTO test1.t1 (f1) VALUES (2);
+INSERT INTO test2.t1 (f1) VALUES (2);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+UPDATE test2.t1 SET test2.t1.f2 = 'cde';
+UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz';
+DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO test2.t1 (f1) VALUES (999);
+INSERT INTO test2.t1 (f1) VALUES (9999);
+COMMIT;
+START TRANSACTION;
+INSERT INTO test1.t1 (f1) VALUES (111);
+INSERT INTO test1.t1 (f1) VALUES (222);
+COMMIT;
+START TRANSACTION;
+INSERT INTO test1.t1 (f1) VALUES (333);
+INSERT INTO test2.t1 (f1) VALUES (99999);
+COMMIT;
+connection node_2;
+SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 256 Gtid_list 2 285 []
+master-bin.000001 285 Binlog_checkpoint 2 329 master-bin.000001
+master-bin.000001 329 Gtid 3 371 GTID 0-3-1
+master-bin.000001 371 Query 3 458 CREATE SCHEMA test1
+master-bin.000001 458 Gtid 3 500 GTID 0-3-3
+master-bin.000001 500 Query 3 647 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB
+master-bin.000001 647 Gtid 3 689 BEGIN GTID 0-3-5
+master-bin.000001 689 Annotate_rows 3 748 INSERT INTO test1.t1 (f1) VALUES (1)
+master-bin.000001 748 Table_map 3 797 table_id: ### (test1.t1)
+master-bin.000001 797 Write_rows_v1 3 839 table_id: ### flags: STMT_END_F
+master-bin.000001 839 Xid 3 870 COMMIT /* xid=### */
+master-bin.000001 870 Gtid 3 912 BEGIN GTID 0-3-7
+master-bin.000001 912 Annotate_rows 3 971 INSERT INTO test1.t1 (f1) VALUES (2)
+master-bin.000001 971 Table_map 3 1020 table_id: ### (test1.t1)
+master-bin.000001 1020 Write_rows_v1 3 1062 table_id: ### flags: STMT_END_F
+master-bin.000001 1062 Xid 3 1093 COMMIT /* xid=### */
+master-bin.000001 1093 Gtid 3 1135 BEGIN GTID 0-3-9
+master-bin.000001 1135 Annotate_rows 3 1194 INSERT INTO test1.t1 (f1) VALUES (3)
+master-bin.000001 1194 Table_map 3 1243 table_id: ### (test1.t1)
+master-bin.000001 1243 Write_rows_v1 3 1285 table_id: ### flags: STMT_END_F
+master-bin.000001 1285 Xid 3 1316 COMMIT /* xid=### */
+master-bin.000001 1316 Gtid 3 1358 BEGIN GTID 0-3-12
+master-bin.000001 1358 Annotate_rows 3 1451 UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'
+master-bin.000001 1451 Table_map 3 1500 table_id: ### (test1.t1)
+master-bin.000001 1500 Update_rows_v1 3 1588 table_id: ### flags: STMT_END_F
+master-bin.000001 1588 Xid 3 1619 COMMIT /* xid=### */
+master-bin.000001 1619 Gtid 3 1661 BEGIN GTID 0-3-13
+master-bin.000001 1661 Annotate_rows 3 1795 DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3
+master-bin.000001 1795 Table_map 3 1844 table_id: ### (test1.t1)
+master-bin.000001 1844 Delete_rows_v1 3 1886 table_id: ### flags: STMT_END_F
+master-bin.000001 1886 Xid 3 1917 COMMIT /* xid=### */
+master-bin.000001 1917 Gtid 3 1959 BEGIN GTID 0-3-15
+master-bin.000001 1959 Annotate_rows 3 2020 INSERT INTO test1.t1 (f1) VALUES (111)
+master-bin.000001 2020 Table_map 3 2069 table_id: ### (test1.t1)
+master-bin.000001 2069 Write_rows_v1 3 2111 table_id: ### flags: STMT_END_F
+master-bin.000001 2111 Annotate_rows 3 2172 INSERT INTO test1.t1 (f1) VALUES (222)
+master-bin.000001 2172 Table_map 3 2221 table_id: ### (test1.t1)
+master-bin.000001 2221 Write_rows_v1 3 2263 table_id: ### flags: STMT_END_F
+master-bin.000001 2263 Xid 3 2294 COMMIT /* xid=### */
+master-bin.000001 2294 Gtid 3 2336 BEGIN GTID <effective_uuid>
+master-bin.000001 2336 Annotate_rows 3 2397 INSERT INTO test1.t1 (f1) VALUES (333)
+master-bin.000001 2397 Table_map 3 2446 table_id: ### (test1.t1)
+master-bin.000001 2446 Write_rows_v1 3 2488 table_id: ### flags: STMT_END_F
+master-bin.000001 2488 Xid 3 2519 COMMIT /* xid=### */
+connection node_1;
+gtid_executed_equal
+0
+SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 256 Gtid_list 1 285 []
+master-bin.000001 285 Binlog_checkpoint 1 329 master-bin.000001
+master-bin.000001 329 Gtid 3 371 GTID 0-3-1
+master-bin.000001 371 Query 3 458 CREATE SCHEMA test1
+master-bin.000001 458 Gtid 3 500 GTID 0-3-2
+master-bin.000001 500 Query 3 647 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB
+master-bin.000001 647 Gtid 3 689 BEGIN GTID 0-3-3
+master-bin.000001 689 Annotate_rows 3 748 INSERT INTO test1.t1 (f1) VALUES (1)
+master-bin.000001 748 Table_map 3 797 table_id: ### (test1.t1)
+master-bin.000001 797 Write_rows_v1 3 839 table_id: ### flags: STMT_END_F
+master-bin.000001 839 Xid 3 870 COMMIT /* xid=### */
+master-bin.000001 870 Gtid 3 912 BEGIN GTID 0-3-4
+master-bin.000001 912 Annotate_rows 3 971 INSERT INTO test1.t1 (f1) VALUES (2)
+master-bin.000001 971 Table_map 3 1020 table_id: ### (test1.t1)
+master-bin.000001 1020 Write_rows_v1 3 1062 table_id: ### flags: STMT_END_F
+master-bin.000001 1062 Xid 3 1093 COMMIT /* xid=### */
+master-bin.000001 1093 Gtid 3 1135 BEGIN GTID 0-3-5
+master-bin.000001 1135 Annotate_rows 3 1194 INSERT INTO test1.t1 (f1) VALUES (3)
+master-bin.000001 1194 Table_map 3 1243 table_id: ### (test1.t1)
+master-bin.000001 1243 Write_rows_v1 3 1285 table_id: ### flags: STMT_END_F
+master-bin.000001 1285 Xid 3 1316 COMMIT /* xid=### */
+master-bin.000001 1316 Gtid 3 1358 BEGIN GTID 0-3-6
+master-bin.000001 1358 Annotate_rows 3 1451 UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'
+master-bin.000001 1451 Table_map 3 1500 table_id: ### (test1.t1)
+master-bin.000001 1500 Update_rows_v1 3 1588 table_id: ### flags: STMT_END_F
+master-bin.000001 1588 Xid 3 1619 COMMIT /* xid=### */
+master-bin.000001 1619 Gtid 3 1661 BEGIN GTID 0-3-7
+master-bin.000001 1661 Annotate_rows 3 1795 DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3
+master-bin.000001 1795 Table_map 3 1844 table_id: ### (test1.t1)
+master-bin.000001 1844 Delete_rows_v1 3 1886 table_id: ### flags: STMT_END_F
+master-bin.000001 1886 Xid 3 1917 COMMIT /* xid=### */
+master-bin.000001 1917 Gtid 3 1959 BEGIN GTID 0-3-8
+master-bin.000001 1959 Annotate_rows 3 2020 INSERT INTO test1.t1 (f1) VALUES (111)
+master-bin.000001 2020 Table_map 3 2069 table_id: ### (test1.t1)
+master-bin.000001 2069 Write_rows_v1 3 2111 table_id: ### flags: STMT_END_F
+master-bin.000001 2111 Annotate_rows 3 2172 INSERT INTO test1.t1 (f1) VALUES (222)
+master-bin.000001 2172 Table_map 3 2221 table_id: ### (test1.t1)
+master-bin.000001 2221 Write_rows_v1 3 2263 table_id: ### flags: STMT_END_F
+master-bin.000001 2263 Xid 3 2294 COMMIT /* xid=### */
+master-bin.000001 2294 Gtid 3 2336 BEGIN GTID 0-3-9
+master-bin.000001 2336 Annotate_rows 3 2397 INSERT INTO test1.t1 (f1) VALUES (333)
+master-bin.000001 2397 Table_map 3 2446 table_id: ### (test1.t1)
+master-bin.000001 2446 Write_rows_v1 3 2488 table_id: ### flags: STMT_END_F
+master-bin.000001 2488 Xid 3 2519 COMMIT /* xid=### */
+include/diff_servers.inc [servers=1 2]
+connection node_1;
+SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2);
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333);
+COUNT(*) = 3
+1
+SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm';
+COUNT(*) = 2
+1
+USE test2;
+ERROR 42000: Unknown database 'test2'
+connection node_3;
+DROP SCHEMA test1;
+DROP SCHEMA test2;
+connection node_1;
+connection node_2;
+STOP SLAVE;
+RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result
new file mode 100644
index 00000000000..fc10cc01a45
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result
@@ -0,0 +1,315 @@
+RESET MASTER;
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+START SLAVE USER='root';
+Warnings:
+Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
+CREATE SCHEMA test1;
+CREATE SCHEMA test2;
+USE test1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+USE test2;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO test1.t1 (f1) VALUES (1);
+INSERT INTO test2.t1 (f1) VALUES (1);
+INSERT INTO test1.t1 (f1) VALUES (2);
+INSERT INTO test2.t1 (f1) VALUES (2);
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+SET SESSION wsrep_on=OFF;
+include/wait_for_slave_sql_error.inc [errno=1047]
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+INSERT INTO test1.t1 (f1) VALUES (5);
+INSERT INTO test2.t1 (f1) VALUES (5);
+SET SESSION wsrep_on=ON;
+INSERT INTO test1.t1 (f1) VALUES (6);
+INSERT INTO test2.t1 (f1) VALUES (6);
+START SLAVE;
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 120 Previous_gtids 2 151
+mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:1'
+mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1
+mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:2'
+mysqld-bin.000001 342 Query 1 415 BEGIN
+mysqld-bin.000001 415 Query 1 489 COMMIT
+mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:3'
+mysqld-bin.000001 537 Query 1 655 use `test1`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
+mysqld-bin.000001 655 Gtid 1 703 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:4'
+mysqld-bin.000001 703 Query 1 776 BEGIN
+mysqld-bin.000001 776 Query 1 850 COMMIT
+mysqld-bin.000001 850 Gtid 1 898 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:5'
+mysqld-bin.000001 898 Query 1 961 BEGIN
+mysqld-bin.000001 961 Table_map 1 1007 table_id: ### (test1.t1)
+mysqld-bin.000001 1007 Write_rows 1 1047 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 1047 Xid 1 1078 COMMIT /* xid=### */
+mysqld-bin.000001 1078 Gtid 1 1126 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:6'
+mysqld-bin.000001 1126 Query 1 1189 BEGIN
+mysqld-bin.000001 1189 Query 1 1253 COMMIT
+mysqld-bin.000001 1253 Gtid 1 1301 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:7'
+mysqld-bin.000001 1301 Query 1 1364 BEGIN
+mysqld-bin.000001 1364 Table_map 1 1410 table_id: ### (test1.t1)
+mysqld-bin.000001 1410 Write_rows 1 1450 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 1450 Xid 1 1481 COMMIT /* xid=### */
+mysqld-bin.000001 1481 Gtid 1 1529 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:8'
+mysqld-bin.000001 1529 Query 1 1592 BEGIN
+mysqld-bin.000001 1592 Query 1 1656 COMMIT
+mysqld-bin.000001 1656 Gtid 2 1704 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:12'
+mysqld-bin.000001 1704 Query 2 1772 BEGIN
+mysqld-bin.000001 1772 Ignorable 2 1795 # Unrecognized ignorable event
+mysqld-bin.000001 1795 Query 2 1864 COMMIT
+mysqld-bin.000001 1864 Gtid 2 1912 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:13'
+mysqld-bin.000001 1912 Query 2 1980 BEGIN
+mysqld-bin.000001 1980 Ignorable 2 2003 # Unrecognized ignorable event
+mysqld-bin.000001 2003 Query 2 2072 COMMIT
+mysqld-bin.000001 2072 Gtid 1 2120 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:9'
+mysqld-bin.000001 2120 Query 1 2183 BEGIN
+mysqld-bin.000001 2183 Table_map 1 2229 table_id: ### (test1.t1)
+mysqld-bin.000001 2229 Write_rows 1 2269 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 2269 Xid 1 2300 COMMIT /* xid=### */
+mysqld-bin.000001 2300 Gtid 1 2348 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:10'
+mysqld-bin.000001 2348 Query 1 2411 BEGIN
+mysqld-bin.000001 2411 Query 1 2475 COMMIT
+mysqld-bin.000001 2475 Gtid 1 2523 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:11'
+mysqld-bin.000001 2523 Query 1 2586 BEGIN
+mysqld-bin.000001 2586 Table_map 1 2632 table_id: ### (test1.t1)
+mysqld-bin.000001 2632 Write_rows 1 2672 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 2672 Xid 1 2703 COMMIT /* xid=### */
+mysqld-bin.000001 2703 Gtid 1 2751 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:12'
+mysqld-bin.000001 2751 Query 1 2814 BEGIN
+mysqld-bin.000001 2814 Query 1 2878 COMMIT
+mysqld-bin.000001 2878 Gtid 1 2926 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:13'
+mysqld-bin.000001 2926 Query 1 2989 BEGIN
+mysqld-bin.000001 2989 Table_map 1 3035 table_id: ### (test1.t1)
+mysqld-bin.000001 3035 Write_rows 1 3075 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 3075 Xid 1 3106 COMMIT /* xid=### */
+mysqld-bin.000001 3106 Gtid 1 3154 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:14'
+mysqld-bin.000001 3154 Query 1 3217 BEGIN
+mysqld-bin.000001 3217 Query 1 3281 COMMIT
+mysqld-bin.000001 3281 Gtid 1 3329 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:15'
+mysqld-bin.000001 3329 Query 1 3392 BEGIN
+mysqld-bin.000001 3392 Table_map 1 3438 table_id: ### (test1.t1)
+mysqld-bin.000001 3438 Write_rows 1 3478 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 3478 Xid 1 3509 COMMIT /* xid=### */
+mysqld-bin.000001 3509 Gtid 1 3557 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:16'
+mysqld-bin.000001 3557 Query 1 3620 BEGIN
+mysqld-bin.000001 3620 Query 1 3684 COMMIT
+mysqld-bin.000001 3684 Gtid 1 3732 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:17'
+mysqld-bin.000001 3732 Query 1 3795 BEGIN
+mysqld-bin.000001 3795 Table_map 1 3841 table_id: ### (test1.t1)
+mysqld-bin.000001 3841 Write_rows 1 3881 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 3881 Xid 1 3912 COMMIT /* xid=### */
+mysqld-bin.000001 3912 Gtid 1 3960 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:18'
+mysqld-bin.000001 3960 Query 1 4023 BEGIN
+mysqld-bin.000001 4023 Query 1 4087 COMMIT
+mysqld-bin.000001 4087 Gtid 1 4135 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:19'
+mysqld-bin.000001 4135 Query 1 4198 BEGIN
+mysqld-bin.000001 4198 Table_map 1 4244 table_id: ### (test1.t1)
+mysqld-bin.000001 4244 Write_rows 1 4284 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 4284 Xid 1 4315 COMMIT /* xid=### */
+mysqld-bin.000001 4315 Gtid 1 4363 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:20'
+mysqld-bin.000001 4363 Query 1 4426 BEGIN
+mysqld-bin.000001 4426 Query 1 4490 COMMIT
+mysqld-bin.000001 4490 Gtid 1 4538 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:21'
+mysqld-bin.000001 4538 Query 1 4601 BEGIN
+mysqld-bin.000001 4601 Table_map 1 4647 table_id: ### (test1.t1)
+mysqld-bin.000001 4647 Write_rows 1 4687 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 4687 Xid 1 4718 COMMIT /* xid=### */
+mysqld-bin.000001 4718 Gtid 1 4766 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:22'
+mysqld-bin.000001 4766 Query 1 4829 BEGIN
+mysqld-bin.000001 4829 Query 1 4893 COMMIT
+mysqld-bin.000001 4893 Gtid 1 4941 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:23'
+mysqld-bin.000001 4941 Query 1 5004 BEGIN
+mysqld-bin.000001 5004 Table_map 1 5050 table_id: ### (test1.t1)
+mysqld-bin.000001 5050 Write_rows 1 5090 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 5090 Xid 1 5121 COMMIT /* xid=### */
+mysqld-bin.000001 5121 Gtid 1 5169 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:24'
+mysqld-bin.000001 5169 Query 1 5232 BEGIN
+mysqld-bin.000001 5232 Query 1 5296 COMMIT
+mysqld-bin.000001 5296 Gtid 1 5344 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:25'
+mysqld-bin.000001 5344 Query 1 5407 BEGIN
+mysqld-bin.000001 5407 Table_map 1 5453 table_id: ### (test1.t1)
+mysqld-bin.000001 5453 Write_rows 1 5493 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 5493 Xid 1 5524 COMMIT /* xid=### */
+mysqld-bin.000001 5524 Gtid 1 5572 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:26'
+mysqld-bin.000001 5572 Query 1 5635 BEGIN
+mysqld-bin.000001 5635 Query 1 5699 COMMIT
+mysqld-bin.000001 5699 Gtid 1 5747 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:27'
+mysqld-bin.000001 5747 Query 1 5810 BEGIN
+mysqld-bin.000001 5810 Table_map 1 5856 table_id: ### (test1.t1)
+mysqld-bin.000001 5856 Write_rows 1 5896 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 5896 Xid 1 5927 COMMIT /* xid=### */
+mysqld-bin.000001 5927 Gtid 1 5975 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:28'
+mysqld-bin.000001 5975 Query 1 6038 BEGIN
+mysqld-bin.000001 6038 Query 1 6102 COMMIT
+mysqld-bin.000001 6102 Gtid 1 6150 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:29'
+mysqld-bin.000001 6150 Query 1 6213 BEGIN
+mysqld-bin.000001 6213 Table_map 1 6259 table_id: ### (test1.t1)
+mysqld-bin.000001 6259 Write_rows 1 6299 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 6299 Xid 1 6330 COMMIT /* xid=### */
+mysqld-bin.000001 6330 Gtid 1 6378 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:30'
+mysqld-bin.000001 6378 Query 1 6441 BEGIN
+mysqld-bin.000001 6441 Query 1 6505 COMMIT
+USE test2;
+ERROR 42000: Unknown database 'test2'
+gtid_executed_equal
+1
+USE test2;
+ERROR 42000: Unknown database 'test2'
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 120 Previous_gtids 4 151
+mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:1'
+mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1
+mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:2'
+mysqld-bin.000001 342 Query 1 415 BEGIN
+mysqld-bin.000001 415 Query 1 489 COMMIT
+mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:3'
+mysqld-bin.000001 537 Query 1 655 use `test1`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
+mysqld-bin.000001 655 Gtid 1 703 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:4'
+mysqld-bin.000001 703 Query 1 776 BEGIN
+mysqld-bin.000001 776 Query 1 850 COMMIT
+mysqld-bin.000001 850 Gtid 1 898 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:5'
+mysqld-bin.000001 898 Query 1 961 BEGIN
+mysqld-bin.000001 961 Table_map 1 1007 table_id: ### (test1.t1)
+mysqld-bin.000001 1007 Write_rows 1 1047 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 1047 Xid 1 1078 COMMIT /* xid=### */
+mysqld-bin.000001 1078 Gtid 1 1126 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:6'
+mysqld-bin.000001 1126 Query 1 1189 BEGIN
+mysqld-bin.000001 1189 Query 1 1253 COMMIT
+mysqld-bin.000001 1253 Gtid 1 1301 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:7'
+mysqld-bin.000001 1301 Query 1 1364 BEGIN
+mysqld-bin.000001 1364 Table_map 1 1410 table_id: ### (test1.t1)
+mysqld-bin.000001 1410 Write_rows 1 1450 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 1450 Xid 1 1481 COMMIT /* xid=### */
+mysqld-bin.000001 1481 Gtid 1 1529 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:8'
+mysqld-bin.000001 1529 Query 1 1592 BEGIN
+mysqld-bin.000001 1592 Query 1 1656 COMMIT
+mysqld-bin.000001 1656 Gtid 4 1704 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:12'
+mysqld-bin.000001 1704 Query 4 1772 BEGIN
+mysqld-bin.000001 1772 Ignorable 4 1795 # Unrecognized ignorable event
+mysqld-bin.000001 1795 Query 4 1864 COMMIT
+mysqld-bin.000001 1864 Gtid 4 1912 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:13'
+mysqld-bin.000001 1912 Query 4 1980 BEGIN
+mysqld-bin.000001 1980 Ignorable 4 2003 # Unrecognized ignorable event
+mysqld-bin.000001 2003 Query 4 2072 COMMIT
+mysqld-bin.000001 2072 Gtid 1 2120 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:9'
+mysqld-bin.000001 2120 Query 1 2183 BEGIN
+mysqld-bin.000001 2183 Table_map 1 2229 table_id: ### (test1.t1)
+mysqld-bin.000001 2229 Write_rows 1 2269 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 2269 Xid 1 2300 COMMIT /* xid=### */
+mysqld-bin.000001 2300 Gtid 1 2348 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:10'
+mysqld-bin.000001 2348 Query 1 2411 BEGIN
+mysqld-bin.000001 2411 Query 1 2475 COMMIT
+mysqld-bin.000001 2475 Gtid 1 2523 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:11'
+mysqld-bin.000001 2523 Query 1 2586 BEGIN
+mysqld-bin.000001 2586 Table_map 1 2632 table_id: ### (test1.t1)
+mysqld-bin.000001 2632 Write_rows 1 2672 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 2672 Xid 1 2703 COMMIT /* xid=### */
+mysqld-bin.000001 2703 Gtid 1 2751 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:12'
+mysqld-bin.000001 2751 Query 1 2814 BEGIN
+mysqld-bin.000001 2814 Query 1 2878 COMMIT
+mysqld-bin.000001 2878 Gtid 1 2926 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:13'
+mysqld-bin.000001 2926 Query 1 2989 BEGIN
+mysqld-bin.000001 2989 Table_map 1 3035 table_id: ### (test1.t1)
+mysqld-bin.000001 3035 Write_rows 1 3075 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 3075 Xid 1 3106 COMMIT /* xid=### */
+mysqld-bin.000001 3106 Gtid 1 3154 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:14'
+mysqld-bin.000001 3154 Query 1 3217 BEGIN
+mysqld-bin.000001 3217 Query 1 3281 COMMIT
+mysqld-bin.000001 3281 Gtid 1 3329 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:15'
+mysqld-bin.000001 3329 Query 1 3392 BEGIN
+mysqld-bin.000001 3392 Table_map 1 3438 table_id: ### (test1.t1)
+mysqld-bin.000001 3438 Write_rows 1 3478 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 3478 Xid 1 3509 COMMIT /* xid=### */
+mysqld-bin.000001 3509 Gtid 1 3557 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:16'
+mysqld-bin.000001 3557 Query 1 3620 BEGIN
+mysqld-bin.000001 3620 Query 1 3684 COMMIT
+mysqld-bin.000001 3684 Gtid 1 3732 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:17'
+mysqld-bin.000001 3732 Query 1 3795 BEGIN
+mysqld-bin.000001 3795 Table_map 1 3841 table_id: ### (test1.t1)
+mysqld-bin.000001 3841 Write_rows 1 3881 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 3881 Xid 1 3912 COMMIT /* xid=### */
+mysqld-bin.000001 3912 Gtid 1 3960 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:18'
+mysqld-bin.000001 3960 Query 1 4023 BEGIN
+mysqld-bin.000001 4023 Query 1 4087 COMMIT
+mysqld-bin.000001 4087 Gtid 1 4135 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:19'
+mysqld-bin.000001 4135 Query 1 4198 BEGIN
+mysqld-bin.000001 4198 Table_map 1 4244 table_id: ### (test1.t1)
+mysqld-bin.000001 4244 Write_rows 1 4284 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 4284 Xid 1 4315 COMMIT /* xid=### */
+mysqld-bin.000001 4315 Gtid 1 4363 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:20'
+mysqld-bin.000001 4363 Query 1 4426 BEGIN
+mysqld-bin.000001 4426 Query 1 4490 COMMIT
+mysqld-bin.000001 4490 Gtid 1 4538 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:21'
+mysqld-bin.000001 4538 Query 1 4601 BEGIN
+mysqld-bin.000001 4601 Table_map 1 4647 table_id: ### (test1.t1)
+mysqld-bin.000001 4647 Write_rows 1 4687 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 4687 Xid 1 4718 COMMIT /* xid=### */
+mysqld-bin.000001 4718 Gtid 1 4766 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:22'
+mysqld-bin.000001 4766 Query 1 4829 BEGIN
+mysqld-bin.000001 4829 Query 1 4893 COMMIT
+mysqld-bin.000001 4893 Gtid 1 4941 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:23'
+mysqld-bin.000001 4941 Query 1 5004 BEGIN
+mysqld-bin.000001 5004 Table_map 1 5050 table_id: ### (test1.t1)
+mysqld-bin.000001 5050 Write_rows 1 5090 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 5090 Xid 1 5121 COMMIT /* xid=### */
+mysqld-bin.000001 5121 Gtid 1 5169 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:24'
+mysqld-bin.000001 5169 Query 1 5232 BEGIN
+mysqld-bin.000001 5232 Query 1 5296 COMMIT
+mysqld-bin.000001 5296 Gtid 1 5344 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:25'
+mysqld-bin.000001 5344 Query 1 5407 BEGIN
+mysqld-bin.000001 5407 Table_map 1 5453 table_id: ### (test1.t1)
+mysqld-bin.000001 5453 Write_rows 1 5493 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 5493 Xid 1 5524 COMMIT /* xid=### */
+mysqld-bin.000001 5524 Gtid 1 5572 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:26'
+mysqld-bin.000001 5572 Query 1 5635 BEGIN
+mysqld-bin.000001 5635 Query 1 5699 COMMIT
+mysqld-bin.000001 5699 Gtid 1 5747 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:27'
+mysqld-bin.000001 5747 Query 1 5810 BEGIN
+mysqld-bin.000001 5810 Table_map 1 5856 table_id: ### (test1.t1)
+mysqld-bin.000001 5856 Write_rows 1 5896 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 5896 Xid 1 5927 COMMIT /* xid=### */
+mysqld-bin.000001 5927 Gtid 1 5975 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:28'
+mysqld-bin.000001 5975 Query 1 6038 BEGIN
+mysqld-bin.000001 6038 Query 1 6102 COMMIT
+mysqld-bin.000001 6102 Gtid 1 6150 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:29'
+mysqld-bin.000001 6150 Query 1 6213 BEGIN
+mysqld-bin.000001 6213 Table_map 1 6259 table_id: ### (test1.t1)
+mysqld-bin.000001 6259 Write_rows 1 6299 table_id: ### flags: STMT_END_F
+mysqld-bin.000001 6299 Xid 1 6330 COMMIT /* xid=### */
+mysqld-bin.000001 6330 Gtid 1 6378 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:30'
+mysqld-bin.000001 6378 Query 1 6441 BEGIN
+mysqld-bin.000001 6441 Query 1 6505 COMMIT
+DROP SCHEMA test1;
+DROP SCHEMA test2;
+STOP SLAVE;
+RESET SLAVE ALL;
+CALL mtr.add_suppression("GTID replication failed");
+CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed");
+CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
+CALL mtr.add_suppression("TO isolation failed for");
+CALL mtr.add_suppression("Slave SQL: Error 'Deadlock found when trying to get lock; try restarting transaction' on query");
+CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query");
+CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047");
diff --git a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
index 365ea31f292..fefc988d9d4 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
@@ -1,13 +1,28 @@
+connection node_2;
+connection node_1;
+connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
+connection node_2;
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
+connection node_4;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+connection node_1;
+connection node_4;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+connection node_2;
+connection node_1;
expected_error
1
+connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_1;
+connection node_2;
START SLAVE;
+connection node_4;
DROP TABLE t1;
+connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
@@ -15,4 +30,5 @@ CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
+connection node_4;
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_autoinc_sst_xtrabackup.result b/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
index d0fac1e3d14..7c98b3e85ed 100644
--- a/mysql-test/suite/galera/r/galera_autoinc_sst_xtrabackup.result
+++ b/mysql-test/suite/galera/r/galera_autoinc_sst_mariabackup.result
@@ -1,3 +1,7 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
CREATE PROCEDURE p1 ()
diff --git a/mysql-test/suite/galera/r/galera_bf_abort.result b/mysql-test/suite/galera/r/galera_bf_abort.result
index c2e89965fce..cb4a27c82fd 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
@@ -9,7 +11,7 @@ INSERT INTO t1 VALUES (1,'node_1');
connection node_2a;
connection node_2;
INSERT INTO t1 VALUES (2, 'node_2');
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
index 7b98c807efb..1150a9fff63 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result
index ec8bddb087a..7dd3053b7bb 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 10);
connection node_1;
@@ -10,7 +12,7 @@ UPDATE t1 SET f1 = 2;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_bf_aborts_diff
1
connection node_1;
@@ -23,7 +25,7 @@ UPDATE t1 SET f2 = 20;
connection node_1a;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_bf_aborts_diff
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result b/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result
index ae1ca6d2157..43ca6089d78 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_ftwrl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
index 8c6c7b7d7a4..0ef2a1a72c6 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2a;
SELECT GET_LOCK("foo", 1000);
@@ -10,7 +12,7 @@ SELECT GET_LOCK("foo", 1000);;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_group_commit.result b/mysql-test/suite/galera/r/galera_bf_abort_group_commit.result
new file mode 100644
index 00000000000..2a2ddd519f4
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_group_commit.result
@@ -0,0 +1,685 @@
+SET SESSION wsrep_sync_wait = 0;
+galera_sr_bf_abort_at_commit = 0
+after_replicate_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+INSERT INTO t1 VALUES (3);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+galera_sr_bf_abort_at_commit = 1
+after_replicate_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+galera_sr_bf_abort_at_commit = 1
+after_replicate_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 0;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+COMMIT;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+ROLLBACK;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result b/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result
index 81b5816ddbe..e7882e43b6a 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_lock_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
new file mode 100644
index 00000000000..fa2a5c373f2
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+connection node_2;
+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;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_sleep.result b/mysql-test/suite/galera/r/galera_bf_abort_sleep.result
index 9cd6abad5a1..00d6600d264 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_sleep.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_sleep.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET AUTOCOMMIT=OFF;
@@ -6,7 +8,7 @@ SELECT SLEEP(1000);;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_background_statistics.result b/mysql-test/suite/galera/r/galera_bf_background_statistics.result
index c2c3fce2b14..a8c8842b8e1 100644
--- a/mysql-test/suite/galera/r/galera_bf_background_statistics.result
+++ b/mysql-test/suite/galera/r/galera_bf_background_statistics.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT @@innodb_stats_persistent;
@@innodb_stats_persistent
1
@@ -27,7 +29,7 @@ SELECT SLEEP(1000);;
connection node_1;
ALTER TABLE t1 CHANGE f2 f2 INTEGER NOT NULL DEFAULT 1;
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_bf_lock_wait.result b/mysql-test/suite/galera/r/galera_bf_lock_wait.result
index 7ec524da888..f893848a72d 100644
--- a/mysql-test/suite/galera/r/galera_bf_lock_wait.result
+++ b/mysql-test/suite/galera/r/galera_bf_lock_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
ALTER TABLE t1 add primary key(a);
CREATE PROCEDURE p1()
diff --git a/mysql-test/suite/galera/r/galera_binlog_cache_size.result b/mysql-test/suite/galera/r/galera_binlog_cache_size.result
index 6aac74ab5f0..c5a09074537 100644
--- a/mysql-test/suite/galera/r/galera_binlog_cache_size.result
+++ b/mysql-test/suite/galera/r/galera_binlog_cache_size.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(767)) ENGINE=InnoDB;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_binlog_checksum.result b/mysql-test/suite/galera/r/galera_binlog_checksum.result
index 7303aa61122..3ef7cf5c41e 100644
--- a/mysql-test/suite/galera/r/galera_binlog_checksum.result
+++ b/mysql-test/suite/galera/r/galera_binlog_checksum.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result b/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result
index 46582ff5c4b..b513c491bb0 100644
--- a/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result
+++ b/mysql-test/suite/galera/r/galera_binlog_event_max_size_max.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 VARCHAR(1000));
diff --git a/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result b/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result
index 7b88af5d5af..6c2279bece0 100644
--- a/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result
+++ b/mysql-test/suite/galera/r/galera_binlog_event_max_size_min.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(1000));
INSERT INTO t1 VALUES (REPEAT('x', 1000));
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_binlog_row_image.result b/mysql-test/suite/galera/r/galera_binlog_row_image.result
index d54db61105e..20e6bd9fab8 100644
--- a/mysql-test/suite/galera/r/galera_binlog_row_image.result
+++ b/mysql-test/suite/galera/r/galera_binlog_row_image.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION binlog_row_image=minimal;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_commit_empty.result b/mysql-test/suite/galera/r/galera_commit_empty.result
new file mode 100644
index 00000000000..75b94c54b1e
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_commit_empty.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+START TRANSACTION;
+COMMIT;
+START TRANSACTION;
+COMMIT;
+START TRANSACTION READ ONLY;
+COMMIT;
+START TRANSACTION;
+COMMIT;
+START TRANSACTION;
+START TRANSACTION;
+COMMIT;
+wsrep_last_committed_diff
+1
diff --git a/mysql-test/suite/galera/r/galera_concurrent_ctas.result b/mysql-test/suite/galera/r/galera_concurrent_ctas.result
index 8a3ac1ae0d3..39c55277c52 100644
--- a/mysql-test/suite/galera/r/galera_concurrent_ctas.result
+++ b/mysql-test/suite/galera/r/galera_concurrent_ctas.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/galera_create_function.result b/mysql-test/suite/galera/r/galera_create_function.result
index 9118c2864f3..85fa85d81f1 100644
--- a/mysql-test/suite/galera/r/galera_create_function.result
+++ b/mysql-test/suite/galera/r/galera_create_function.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE USER 'user1';
CREATE
diff --git a/mysql-test/suite/galera/r/galera_create_procedure.result b/mysql-test/suite/galera/r/galera_create_procedure.result
index 98dc4a856dc..24a0bd66b39 100644
--- a/mysql-test/suite/galera/r/galera_create_procedure.result
+++ b/mysql-test/suite/galera/r/galera_create_procedure.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE USER 'user1';
CREATE TABLE t1 (f1 INTEGER);
diff --git a/mysql-test/suite/galera/r/galera_create_table_as_select.result b/mysql-test/suite/galera/r/galera_create_table_as_select.result
new file mode 100644
index 00000000000..6f65ee99f0a
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_create_table_as_select.result
@@ -0,0 +1,103 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET SESSION default_storage_engine=InnoDB;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 AS SELECT * FROM t2;
+ERROR 42S01: Table 't1' already exists
+DROP TABLE t1,t2;
+CREATE TABLE t1 AS SELECT * FROM t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+CREATE TABLE t1 AS SELECT 1 FROM DUAL;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 AS SELECT * FROM t2;
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1,t2;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT * FROM t2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1,t2;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT f1 = 5 FROM t1;
+f1 = 5
+1
+connection node_1;
+DROP TABLE t1,t2;
+connection node_1;
+CREATE PROCEDURE sp1 ()
+BEGIN
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT * FROM t2;
+END|
+CALL sp1();
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1, t2;
+DROP PROCEDURE sp1;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+LOCK TABLE t2 WRITE;
+connection node_1;
+CREATE TABLE t1 AS SELECT * FROM t2;;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t2;
+COUNT(*) = 5
+1
+CREATE TABLE t1 AS SELECT * FROM t2;
+connection node_1a;
+UNLOCK TABLES;
+connection node_1;
+Got one of the listed errors
+DROP TABLE t1, t2;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2;
+connection node_2;
+SELECT * FROM t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query");
+connection node_1;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/r/galera_create_table_like.result b/mysql-test/suite/galera/r/galera_create_table_like.result
index 131ac311bca..82543331ad5 100644
--- a/mysql-test/suite/galera/r/galera_create_table_like.result
+++ b/mysql-test/suite/galera/r/galera_create_table_like.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE SCHEMA schema1;
CREATE SCHEMA schema2;
USE schema1;
diff --git a/mysql-test/suite/galera/r/galera_create_trigger.result b/mysql-test/suite/galera/r/galera_create_trigger.result
index d07a007543e..56b35150d87 100644
--- a/mysql-test/suite/galera/r/galera_create_trigger.result
+++ b/mysql-test/suite/galera/r/galera_create_trigger.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE definer_root (f1 INTEGER, trigger_user VARCHAR(100)) ENGINE=InnoDB;
CREATE TABLE definer_user (f1 INTEGER, trigger_user VARCHAR(100)) ENGINE=InnoDB;
CREATE TABLE definer_current_user (f1 INTEGER, trigger_user VARCHAR(100)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_ddl_multiline.result b/mysql-test/suite/galera/r/galera_ddl_multiline.result
index 339a91125eb..9e70731a62b 100644
--- a/mysql-test/suite/galera/r/galera_ddl_multiline.result
+++ b/mysql-test/suite/galera/r/galera_ddl_multiline.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index 8083784bb01..20ea590e2e5 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -1,6 +1,8 @@
-SELECT COUNT(*) = 43 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
-COUNT(*) = 43
-0
+connection node_2;
+connection node_1;
+SELECT COUNT(*) `expect 48` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+expect 48
+48
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME LIKE 'wsrep_%'
@@ -31,6 +33,7 @@ WSREP_DRUPAL_282555_WORKAROUND OFF
WSREP_FORCED_BINLOG_FORMAT NONE
WSREP_GTID_DOMAIN_ID 0
WSREP_GTID_MODE OFF
+WSREP_IGNORE_APPLY_ERRORS 7
WSREP_LOAD_DATA_SPLITTING ON
WSREP_LOG_CONFLICTS OFF
WSREP_MAX_WS_ROWS 0
@@ -47,9 +50,11 @@ WSREP_RETRY_AUTOCOMMIT 1
WSREP_SLAVE_FK_CHECKS ON
WSREP_SLAVE_THREADS 1
WSREP_SLAVE_UK_CHECKS OFF
+WSREP_SR_STORE table
WSREP_SST_AUTH
WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
WSREP_SYNC_WAIT 15
-<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT30S; evs.info_log_mask = 0; evs.install_timeout = PT15S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.recover = no; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; <REPL_PROTO_MAX>;socket.checksum = 2; socket.recv_buf_size = 212992;
+WSREP_TRX_FRAGMENT_SIZE 0
+WSREP_TRX_FRAGMENT_UNIT bytes
diff --git a/mysql-test/suite/galera/r/galera_delete_limit.result b/mysql-test/suite/galera/r/galera_delete_limit.result
index f6fb2e56346..9898bfcf169 100644
--- a/mysql-test/suite/galera/r/galera_delete_limit.result
+++ b/mysql-test/suite/galera/r/galera_delete_limit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-test/suite/galera/r/galera_desync_overlapped.result
index f9920e7f7ad..e3f40d444ee 100644
--- a/mysql-test/suite/galera/r/galera_desync_overlapped.result
+++ b/mysql-test/suite/galera/r/galera_desync_overlapped.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_drop_database.result b/mysql-test/suite/galera/r/galera_drop_database.result
index 79789da5a11..ac76683cb25 100644
--- a/mysql-test/suite/galera/r/galera_drop_database.result
+++ b/mysql-test/suite/galera/r/galera_drop_database.result
@@ -1,3 +1,7 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
CREATE DATABASE fts;
USE fts;
CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
@@ -9,6 +13,10 @@ INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';
+connection node_2;
+connection node_1;
+connection node_2;
+connection node_1;
USE fts;
DROP TABLE fts_t1;
DROP TABLE fts_t2;
diff --git a/mysql-test/suite/galera/r/galera_drop_multi.result b/mysql-test/suite/galera/r/galera_drop_multi.result
index 7793ef93b90..1ff8afe3219 100644
--- a/mysql-test/suite/galera/r/galera_drop_multi.result
+++ b/mysql-test/suite/galera/r/galera_drop_multi.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result b/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result
index 38480d186ba..fdfca3316b1 100644
--- a/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result
+++ b/mysql-test/suite/galera/r/galera_encrypt_tmp_files.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
diff --git a/mysql-test/suite/galera/r/galera_enum.result b/mysql-test/suite/galera/r/galera_enum.result
index a2a6317e2a0..40fc6931f6a 100644
--- a/mysql-test/suite/galera/r/galera_enum.result
+++ b/mysql-test/suite/galera/r/galera_enum.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 ENUM('', 'one', 'two'), KEY (f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('');
@@ -38,7 +40,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1;
SELECT COUNT(*) FROM t1 WHERE f1 = 'three';
COUNT(*)
diff --git a/mysql-test/suite/galera/r/galera_events.result b/mysql-test/suite/galera/r/galera_events.result
index f01627aba70..791b0be729d 100644
--- a/mysql-test/suite/galera/r/galera_events.result
+++ b/mysql-test/suite/galera/r/galera_events.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE EVENT event1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT 1;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result
index 73375ae55c5..291d641db88 100644
--- a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result
+++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE grandparent (
id INT NOT NULL PRIMARY KEY
) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_update.result b/mysql-test/suite/galera/r/galera_fk_cascade_update.result
index 5fe8b532473..5294826a8f9 100644
--- a/mysql-test/suite/galera/r/galera_fk_cascade_update.result
+++ b/mysql-test/suite/galera/r/galera_fk_cascade_update.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE grandparent (
id INT NOT NULL PRIMARY KEY
) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_fk_conflict.result b/mysql-test/suite/galera/r/galera_fk_conflict.result
index a08aa30a82e..f9f151abce4 100644
--- a/mysql-test/suite/galera/r/galera_fk_conflict.result
+++ b/mysql-test/suite/galera/r/galera_fk_conflict.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT PRIMARY KEY,
KEY (id)
@@ -22,6 +24,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE child;
DROP TABLE parent;
diff --git a/mysql-test/suite/galera/r/galera_fk_mismatch.result b/mysql-test/suite/galera/r/galera_fk_mismatch.result
index bdc60c9e099..a030b1214c5 100644
--- a/mysql-test/suite/galera/r/galera_fk_mismatch.result
+++ b/mysql-test/suite/galera/r/galera_fk_mismatch.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id1 INT,
id2 INT,
diff --git a/mysql-test/suite/galera/r/galera_fk_multicolumn.result b/mysql-test/suite/galera/r/galera_fk_multicolumn.result
index f5b6aa23692..b626d963af8 100644
--- a/mysql-test/suite/galera/r/galera_fk_multicolumn.result
+++ b/mysql-test/suite/galera/r/galera_fk_multicolumn.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t0 (
f1 INT PRIMARY KEY,
f2 INT UNIQUE
diff --git a/mysql-test/suite/galera/r/galera_fk_multitable.result b/mysql-test/suite/galera/r/galera_fk_multitable.result
index 04ff7adc3e9..83e1491ab34 100644
--- a/mysql-test/suite/galera/r/galera_fk_multitable.result
+++ b/mysql-test/suite/galera/r/galera_fk_multitable.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t0 (
f0 INT PRIMARY KEY
);
diff --git a/mysql-test/suite/galera/r/galera_fk_no_pk.result b/mysql-test/suite/galera/r/galera_fk_no_pk.result
index e7b5f0b2b64..622e63dbb8f 100644
--- a/mysql-test/suite/galera/r/galera_fk_no_pk.result
+++ b/mysql-test/suite/galera/r/galera_fk_no_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT,
KEY (id)
diff --git a/mysql-test/suite/galera/r/galera_fk_selfreferential.result b/mysql-test/suite/galera/r/galera_fk_selfreferential.result
index 3b4dbf2a8e9..9a64521e7b8 100644
--- a/mysql-test/suite/galera/r/galera_fk_selfreferential.result
+++ b/mysql-test/suite/galera/r/galera_fk_selfreferential.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 INT NOT NULL PRIMARY KEY,
f2 INT,
diff --git a/mysql-test/suite/galera/r/galera_fk_setnull.result b/mysql-test/suite/galera/r/galera_fk_setnull.result
index d4f20fe60a3..afb3fc3b9b8 100644
--- a/mysql-test/suite/galera/r/galera_fk_setnull.result
+++ b/mysql-test/suite/galera/r/galera_fk_setnull.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT NOT NULL,
PRIMARY KEY (id)
diff --git a/mysql-test/suite/galera/r/galera_flush_local.result b/mysql-test/suite/galera/r/galera_flush_local.result
index a8e798a693d..146833fc3c8 100644
--- a/mysql-test/suite/galera/r/galera_flush_local.result
+++ b/mysql-test/suite/galera/r/galera_flush_local.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
DROP TABLE IF EXISTS t1, t2, x1, x2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
@@ -45,7 +47,9 @@ UNLOCK TABLES;
FLUSH LOCAL TABLES t1;
ANALYZE LOCAL TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
OPTIMIZE LOCAL TABLE t1, t2;
Table Op Msg_type Msg_text
@@ -120,7 +124,9 @@ UNLOCK TABLES;
FLUSH TABLES t1;
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
OPTIMIZE TABLE t1, t2;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format.result b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
index b94e6530886..a94ac0c112d 100644
--- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result
+++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
@@ -1,5 +1,10 @@
+connection node_2;
connection node_1;
+connection node_1;
+SEt GLOBAL wsrep_on=OFF;
RESET MASTER;
+SEt GLOBAL wsrep_on=ON;
+FLUSH BINARY LOGS;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
@@ -13,18 +18,7 @@ SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
-mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
-mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
-mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
-mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
-mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
-mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
-mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
-mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
-mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
-mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
-mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Rotate 1 <End_log_pos> mysqld-bin.000002;pos=4
DROP TABLE t1;
#
# MDEV-9401: wsrep_forced_binlog_format with binlog causes crash
@@ -43,6 +37,4 @@ GRANT ALL PRIVILEGES ON `testdb_9401`.`t1` TO 'dummy'@'localhost'
REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
DROP USER dummy@localhost;
DROP DATABASE testdb_9401;
-disconnect node_2;
-disconnect node_1;
# End of tests
diff --git a/mysql-test/suite/galera/r/galera_ftwrl.result b/mysql-test/suite/galera/r/galera_ftwrl.result
index 0565781c051..eae8028a7f4 100644
--- a/mysql-test/suite/galera/r/galera_ftwrl.result
+++ b/mysql-test/suite/galera/r/galera_ftwrl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
diff --git a/mysql-test/suite/galera/r/galera_ftwrl_drain.result b/mysql-test/suite/galera/r/galera_ftwrl_drain.result
index 751811b88fd..2342643e745 100644
--- a/mysql-test/suite/galera/r/galera_ftwrl_drain.result
+++ b/mysql-test/suite/galera/r/galera_ftwrl_drain.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
@@ -22,7 +24,7 @@ connection node_2;
SET SESSION lock_wait_timeout = 1;
SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
-INSERT INTO t2 VALUES (2);
+INSERT INTO t1 VALUES (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection node_2a;
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/r/galera_fulltext.result b/mysql-test/suite/galera/r/galera_fulltext.result
index 18e3bff40fc..a22296278fa 100644
--- a/mysql-test/suite/galera/r/galera_fulltext.result
+++ b/mysql-test/suite/galera/r/galera_fulltext.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_gcache_recover.result b/mysql-test/suite/galera/r/galera_gcache_recover.result
index 127bcba39d8..819c595ece3 100644
--- a/mysql-test/suite/galera/r/galera_gcache_recover.result
+++ b/mysql-test/suite/galera/r/galera_gcache_recover.result
@@ -1,18 +1,27 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_sync_wait = 0;
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
+connection node_1;
INSERT INTO t1 VALUES (2);
Killing server ...
+connection node_1;
Performing --wsrep-recover ...
Using --wsrep-start-position when starting mysqld ...
INSERT INTO t1 VALUES (3);
+connection node_2;
Performing --wsrep-recover ...
Using --wsrep-start-position when starting mysqld ...
+connection node_1;
include/diff_servers.inc [servers=1 2]
+connection node_1;
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("Skipped GCache ring buffer recovery");
include/assert_grep.inc [Recovering GCache ring buffer: found gapless sequence]
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
index 30ee5772411..a0d128f5fa3 100644
--- a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
+++ b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result
@@ -1,19 +1,28 @@
+connection node_2;
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB;
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
+connection node_1;
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
Killing server ...
+connection node_1;
Performing --wsrep-recover ...
Using --wsrep-start-position when starting mysqld ...
+connection node_2;
Performing --wsrep-recover ...
Using --wsrep-start-position when starting mysqld ...
+connection node_1;
include/diff_servers.inc [servers=1 2]
+connection node_1;
DROP TABLE t1;
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
-include/assert_grep.inc [IST first seqno 2 not found from cache, falling back to SST]
+include/assert_grep.inc [IST first seqno [24] not found from cache, falling back to SST]
+connection node_2;
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
index 464a8b7ea97..83eaa0fb7aa 100644
--- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
+++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_gcs_fragment.result b/mysql-test/suite/galera/r/galera_gcs_fragment.result
index 0c9c1819f60..bdd749047ee 100644
--- a/mysql-test/suite/galera/r/galera_gcs_fragment.result
+++ b/mysql-test/suite/galera/r/galera_gcs_fragment.result
@@ -1,24 +1,37 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT);
+connection node_2;
SET GLOBAL wsrep_cluster_address='';
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'dbug=d,gcs_core_after_frag_send';
+connection node_1;
SET SESSION wsrep_retry_autocommit=0;
INSERT INTO t1 VALUES (1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+connection node_1a;
SET GLOBAL wsrep_provider_options = 'signal=gcs_core_after_frag_send';
-ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+ERROR HY000: Got error 6 "No such device or address" during COMMIT
INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
SELECT * FROM t1;
f1 f2
2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+connection node_2;
SELECT * FROM t1;
f1 f2
2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result b/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result
index ce74f3db433..b97be5733ff 100644
--- a/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result
+++ b/mysql-test/suite/galera/r/galera_gcs_max_packet_size.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_gra_log.result b/mysql-test/suite/galera/r/galera_gra_log.result
index 777eda42046..33853188965 100644
--- a/mysql-test/suite/galera/r/galera_gra_log.result
+++ b/mysql-test/suite/galera/r/galera_gra_log.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_gtid.result b/mysql-test/suite/galera/r/galera_gtid.result
index acc5eae9876..f27e2590898 100644
--- a/mysql-test/suite/galera/r/galera_gtid.result
+++ b/mysql-test/suite/galera/r/galera_gtid.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_gtid_slave.result b/mysql-test/suite/galera/r/galera_gtid_slave.result
index f8ca6322d22..7a3048231af 100644
--- a/mysql-test/suite/galera/r/galera_gtid_slave.result
+++ b/mysql-test/suite/galera/r/galera_gtid_slave.result
@@ -1,7 +1,9 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
-START SLAVE;
connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_2;
+START SLAVE;
+connection node_3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -11,27 +13,31 @@ insert into t2 values(22);
commit;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4
+2-3-4
connection node_2;
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-2
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+0-2-2,2-3-4
+connection node_1;
INSERT INTO t1 VALUES(4);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-2,2-3-3
-connection node_1;
+1-1-1,2-3-4,2-2-6
+connection node_3;
DROP TABLE t1,t2;
connection node_2;
-connection node_3;
+connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+SET GLOBAL wsrep_on=OFF;
reset master;
-connection node_3;
-reset master;
+SET GLOBAL wsrep_on=ON;
connection node_1;
+SET GLOBAL wsrep_on=OFF;
+reset master;
+SET GLOBAL wsrep_on=ON;
+connection node_3;
reset master;
diff --git a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
index cdf330643c2..7c5519af495 100644
--- a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
+++ b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result
@@ -1,38 +1,40 @@
-connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
#Connection 2
connection node_2;
START SLAVE;
-#Connection 1
-connection node_1;
+#Connection 3
+connection node_3;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 int unique) ENGINE=InnoDB;
INSERT INTO t2 VALUES(1,11);
INSERT INTO t2 VALUES(2,22);
INSERT INTO t2 VALUES(3,33);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4
+2-3-4
include/save_master_gtid.inc
#Connection 2
connection node_2;
include/sync_with_master_gtid.inc
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4
+2-3-4
INSERT INTO t2 VALUES(4,44);
INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-3
-#Connection 3
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+0-2-3,2-3-4
+#Connection 1
+connection node_1;
INSERT INTO t2 VALUES(7,77);
INSERT INTO t2 VALUES(8,88);
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-4,2-2-3,2-3-5
-#Connection 1
-connection node_1;
+1-1-2,2-3-4,2-2-7
+#Connection 3
+connection node_3;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -48,76 +50,78 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-#Connection 3
-connection node_3;
+#Connection 1
+connection node_1;
+connection node_1;
connection node_2;
-connection node_3;
-Shutting down server ...
#Connection 2
connection node_2;
+Shutting down server ...
+#Connection 1
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
-#Connection 3
-connection node_3;
+#Connection 2
+connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node3_committed_after');
-INSERT INTO t1 VALUES ('node3_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
-#Connection 2
-connection node_2;
+#Connection 1
+connection node_1;
Select * from t1 order by f1;
f1
node1_committed_before
node1_committed_before
node1_committed_during
node1_committed_during
+node2_committed_after
+node2_committed_after
node2_committed_before
node2_committed_before
-node3_committed_after
-node3_committed_after
-#Connection 3
-connection node_3;
+#Connection 2
+connection node_2;
Select * from t1 order by f1;
f1
node1_committed_before
node1_committed_before
node1_committed_during
node1_committed_during
+node2_committed_after
+node2_committed_after
node2_committed_before
node2_committed_before
-node3_committed_after
-node3_committed_after
+#Connection 1
+connection node_1;
+SELECT @@global.gtid_binlog_state;
+@@global.gtid_binlog_state
+1-1-3,2-3-6,2-2-9
#Connection 2
connection node_2;
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-6,2-2-7,2-3-8
+0-1-7,0-2-8,2-3-6
#Connection 3
connection node_3;
-SELECT @@global.gtid_binlog_state;
-@@global.gtid_binlog_state
-1-1-6,2-2-7,2-3-8
-#Connection 1
-connection node_1;
SET AUTOCOMMIT=ON;
#Connection 2
connection node_2;
SET AUTOCOMMIT=ON;
-#Connection 3
-connection node_3;
+#Connection 1
+connection node_1;
SET AUTOCOMMIT=ON;
#Connection 2
connection node_2;
STOP slave;
INSERT INTO t1 VALUES ('node2_slave_stoped');
-#Connection 1
-connection node_1;
-INSERT INTO t1 VALUES ('node1_normal_entry');
+#Connection 3
+connection node_3;
+INSERT INTO t1 VALUES ('node3_normal_entry');
include/save_master_gtid.inc
#Connection 2
connection node_2;
@@ -130,30 +134,35 @@ count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-7,2-3-8,2-2-11
-#Connection 3
-connection node_3;
+0-1-7,0-2-11,2-3-7
+#Connection 1
+connection node_1;
SELECT count(*) from t1;
count(*)
12
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
-1-1-7,2-3-8,2-2-11
-#Connection 1
-connection node_1;
+1-1-3,2-3-7,2-2-12
+#Connection 3
+connection node_3;
DROP TABLE t2,t1;
#Connection 2
connection node_2;
-#Connection 3
-connection node_3;
+#Connection 1
+connection node_1;
#Connection 2
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+set global wsrep_on=OFF;
reset master;
-#Connection 3
-connection node_3;
-reset master;
+set global wsrep_on=ON;
+set global gtid_slave_pos="";
#Connection 1
connection node_1;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+#Connection 3
+connection node_3;
reset master;
diff --git a/mysql-test/suite/galera/r/galera_insert_ignore.result b/mysql-test/suite/galera/r/galera_insert_ignore.result
index 7057affaa0e..417524240e7 100644
--- a/mysql-test/suite/galera/r/galera_insert_ignore.result
+++ b/mysql-test/suite/galera/r/galera_insert_ignore.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_sync_wait = 15;
connection node_2;
SET GLOBAL wsrep_sync_wait = 15;
diff --git a/mysql-test/suite/galera/r/galera_insert_multi.result b/mysql-test/suite/galera/r/galera_insert_multi.result
index 913dd42403a..d7a4f01873e 100644
--- a/mysql-test/suite/galera/r/galera_insert_multi.result
+++ b/mysql-test/suite/galera/r/galera_insert_multi.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
@@ -51,7 +53,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
INSERT INTO t1 VALUES (1), (2);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
diff --git a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,release.rdiff b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,release.rdiff
new file mode 100644
index 00000000000..bbd75f5230a
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,release.rdiff
@@ -0,0 +1,114 @@
+--- galera_ist_innodb_flush_logs.result
++++ galera_ist_innodb_flush_logs,release.result
+@@ -94,111 +94,3 @@
+ DROP TABLE t1;
+ COMMIT;
+ SET AUTOCOMMIT=ON;
+-Performing State Transfer on a server that has been killed and restarted
+-while a DDL was in progress on it
+-connection node_1;
+-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+-SET AUTOCOMMIT=OFF;
+-START TRANSACTION;
+-INSERT INTO t1 VALUES ('node1_committed_before');
+-INSERT INTO t1 VALUES ('node1_committed_before');
+-INSERT INTO t1 VALUES ('node1_committed_before');
+-INSERT INTO t1 VALUES ('node1_committed_before');
+-INSERT INTO t1 VALUES ('node1_committed_before');
+-connection node_2;
+-START TRANSACTION;
+-INSERT INTO t1 VALUES ('node2_committed_before');
+-INSERT INTO t1 VALUES ('node2_committed_before');
+-INSERT INTO t1 VALUES ('node2_committed_before');
+-INSERT INTO t1 VALUES ('node2_committed_before');
+-INSERT INTO t1 VALUES ('node2_committed_before');
+-COMMIT;
+-SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+-connection node_1;
+-ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+-connection node_2;
+-SET wsrep_sync_wait = 0;
+-Killing server ...
+-connection node_1;
+-SET AUTOCOMMIT=OFF;
+-START TRANSACTION;
+-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+-COMMIT;
+-START TRANSACTION;
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+-SET AUTOCOMMIT=OFF;
+-START TRANSACTION;
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-connection node_2;
+-Performing --wsrep-recover ...
+-connection node_2;
+-Starting server ...
+-Using --wsrep-start-position when starting mysqld ...
+-SET AUTOCOMMIT=OFF;
+-START TRANSACTION;
+-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+-COMMIT;
+-connection node_1;
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+-COMMIT;
+-SET AUTOCOMMIT=OFF;
+-START TRANSACTION;
+-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+-COMMIT;
+-connection node_1a_galera_st_kill_slave_ddl;
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+-ROLLBACK;
+-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+-COUNT(*) = 2
+-1
+-SELECT COUNT(*) = 35 FROM t1;
+-COUNT(*) = 35
+-1
+-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+-COUNT(*) = 0
+-1
+-COMMIT;
+-SET AUTOCOMMIT=ON;
+-connection node_1;
+-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+-COUNT(*) = 2
+-1
+-SELECT COUNT(*) = 35 FROM t1;
+-COUNT(*) = 35
+-1
+-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+-COUNT(*) = 0
+-1
+-DROP TABLE t1;
+-COMMIT;
+-SET AUTOCOMMIT=ON;
+-SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result
index e3bf407ddaa..cad00aaee48 100644
--- a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result
+++ b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result
@@ -1,4 +1,7 @@
+connection node_2;
+connection node_1;
Performing State Transfer on a server that has been killed and restarted
+connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -8,6 +11,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
@@ -17,6 +21,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
Killing server ...
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
@@ -31,6 +36,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -38,6 +44,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
@@ -49,6 +56,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
+connection node_1;
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
@@ -63,6 +71,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
COMMIT;
+connection node_1a_galera_st_kill_slave;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -77,6 +86,7 @@ COUNT(*) = 0
1
COMMIT;
SET AUTOCOMMIT=ON;
+connection node_1;
SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35
1
@@ -86,3 +96,111 @@ COUNT(*) = 0
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+ROLLBACK;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 35 FROM t1;
+COUNT(*) = 35
+1
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
+connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 35 FROM t1;
+COUNT(*) = 35
+1
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
diff --git a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff
index fa1b67e7ef3..fe54c515395 100644
--- a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup,debug.rdiff
@@ -1,11 +1,12 @@
---- r/galera_ist_innodb_flush_logs.result 2018-09-05 10:34:36.192439933 +0300
-+++ r/galera_ist_innodb_flush_logs.reject 2018-09-17 10:20:06.039150838 +0300
-@@ -86,3 +86,100 @@
+--- galera_ist_mariabackup.result 2018-12-11 13:33:56.728535840 +0100
++++ galera_ist_mariabackup.reject 2018-12-11 13:37:40.572535840 +0100
+@@ -290,3 +290,111 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
++connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
@@ -14,6 +15,7 @@
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
++connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
@@ -22,9 +24,12 @@
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
++connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
@@ -39,6 +44,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -46,7 +52,9 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++connection node_2;
+Performing --wsrep-recover ...
++connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
@@ -57,6 +65,7 @@
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
++connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
@@ -71,6 +80,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -88,6 +98,7 @@
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
++connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
diff --git a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result b/mysql-test/suite/galera/r/galera_ist_mariabackup.result
index 099d944d491..13f7d898a59 100644
--- a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup.result
@@ -1,4 +1,9 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
+connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -8,6 +13,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
@@ -18,6 +24,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
@@ -32,6 +39,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -39,7 +47,11 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_after');
@@ -48,6 +60,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
+connection node_1;
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
@@ -62,6 +75,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
COMMIT;
+connection node_1a_galera_st_disconnect_slave;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -76,6 +90,7 @@ COUNT(*) = 0
1
COMMIT;
SET AUTOCOMMIT=ON;
+connection node_1;
SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35
1
@@ -86,6 +101,7 @@ DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been shut down cleanly and restarted
+connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -95,6 +111,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
@@ -104,6 +121,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
Shutting down server ...
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
@@ -118,6 +136,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -125,6 +144,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
Starting server ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -134,6 +154,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
+connection node_1;
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
@@ -148,6 +169,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
COMMIT;
+connection node_1a_galera_st_shutdown_slave;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -162,6 +184,7 @@ COUNT(*) = 0
1
COMMIT;
SET AUTOCOMMIT=ON;
+connection node_1;
SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35
1
@@ -172,6 +195,7 @@ DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
Performing State Transfer on a server that has been killed and restarted
+connection node_1;
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -181,6 +205,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
@@ -190,6 +215,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
Killing server ...
+connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
@@ -204,6 +230,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -211,6 +238,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
@@ -222,6 +250,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
+connection node_1;
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
@@ -236,6 +265,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
COMMIT;
+connection node_1a_galera_st_kill_slave;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
@@ -250,6 +280,7 @@ COUNT(*) = 0
1
COMMIT;
SET AUTOCOMMIT=ON;
+connection node_1;
SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35
1
diff --git a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff
index 95310b3ffeb..792f98b4427 100644
--- a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs,debug.rdiff
@@ -1,11 +1,12 @@
---- r/galera_ist_xtrabackup-v2.result 2018-09-05 10:34:36.192439933 +0300
-+++ r/galera_ist_xtrabackup-v2.reject 2018-09-17 11:13:33.395264800 +0300
-@@ -259,3 +259,100 @@
+--- r/galera_ist_mariabackup_innodb_flush_logs.result 2018-11-21 21:34:20.157054441 +0200
++++ r/galera_ist_mariabackup_innodb_flush_logs.reject 2018-11-22 09:16:16.824604445 +0200
+@@ -94,3 +94,111 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
++connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
@@ -14,6 +15,7 @@
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
++connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
@@ -22,9 +24,12 @@
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
++connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
@@ -39,6 +44,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -46,7 +52,9 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++connection node_2;
+Performing --wsrep-recover ...
++connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
@@ -57,6 +65,7 @@
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
++connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
@@ -71,6 +80,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -88,6 +98,7 @@
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
++connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
diff --git a/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result
new file mode 100644
index 00000000000..99b9c8d6c1b
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_mariabackup_innodb_flush_logs.result
@@ -0,0 +1,98 @@
+connection node_2;
+connection node_1;
+Performing State Transfer on a server that has been killed and restarted
+connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES ('node1_committed_during');
+INSERT INTO t1 VALUES ('node1_committed_during');
+COMMIT;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 VALUES ('node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES ('node1_committed_after');
+INSERT INTO t1 VALUES ('node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave;
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+ROLLBACK;
+SELECT COUNT(*) = 35 FROM t1;
+COUNT(*) = 35
+1
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
+connection node_1;
+SELECT COUNT(*) = 35 FROM t1;
+COUNT(*) = 35
+1
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+COMMIT;
+SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff
index 74e6abd713f..141b1ebd25f 100644
--- a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff
@@ -1,11 +1,12 @@
---- r/galera_ist_mysqldump.result 2018-09-11 12:38:42.027479411 +0300
-+++ r/galera_ist_mysqldump.reject 2018-09-17 10:28:44.483441364 +0300
-@@ -180,6 +180,103 @@
+--- r/galera_ist_mysqldump.result 2018-11-22 14:25:28.551554055 +0200
++++ r/galera_ist_mysqldump.reject 2018-11-22 15:46:33.119441931 +0200
+@@ -200,6 +200,114 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
++connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
@@ -14,6 +15,7 @@
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
++connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
@@ -22,9 +24,12 @@
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
++connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
@@ -39,6 +44,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -46,7 +52,9 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++connection node_2;
+Performing --wsrep-recover ...
++connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
@@ -57,6 +65,7 @@
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
++connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
@@ -71,6 +80,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -88,6 +98,7 @@
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
++connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
@@ -101,6 +112,6 @@
+COMMIT;
+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
+ connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
- CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump.result b/mysql-test/suite/galera/r/galera_ist_mysqldump.result
index 296ecc2adc7..222eb7704e8 100644
--- a/mysql-test/suite/galera/r/galera_ist_mysqldump.result
+++ b/mysql-test/suite/galera/r/galera_ist_mysqldump.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
Setting SST method to mysqldump ...
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
@@ -210,3 +212,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result
index ed36a217624..9fc7febbea5 100644
--- a/mysql-test/suite/galera/r/galera_ist_progress.result
+++ b/mysql-test/suite/galera/r/galera_ist_progress.result
@@ -1,10 +1,6 @@
-connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
-connection node_1;
-connection node_2;
SET SESSION wsrep_on = OFF;
SET SESSION wsrep_on = ON;
-connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
@@ -16,13 +12,8 @@ INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
-connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
-connection node_1;
-connection node_2;
-connection node_1;
include/assert_grep.inc [Receiving IST: 11 writesets, seqnos]
include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete]
include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete]
-connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_ist_recv_bind.result b/mysql-test/suite/galera/r/galera_ist_recv_bind.result
index ffc751d8672..be72aa60ab0 100644
--- a/mysql-test/suite/galera/r/galera_ist_recv_bind.result
+++ b/mysql-test/suite/galera/r/galera_ist_recv_bind.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'
diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
index c81cecfae1c..80d2c90642b 100644
--- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
+++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
@@ -13,7 +15,6 @@ Loading wsrep_provider ...
SET SESSION wsrep_on=OFF;
SET SESSION wsrep_on=ON;
connection node_1;
-connection node_1;
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_ist_rsync.result b/mysql-test/suite/galera/r/galera_ist_rsync.result
index 8a7c02ab1b6..13f7d898a59 100644
--- a/mysql-test/suite/galera/r/galera_ist_rsync.result
+++ b/mysql-test/suite/galera/r/galera_ist_rsync.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been temporarily disconnected
@@ -47,6 +49,9 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_after');
diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result
index b11353fcbcc..9d66140465c 100644
--- a/mysql-test/suite/galera/r/galera_kill_ddl.result
+++ b/mysql-test/suite/galera/r/galera_kill_ddl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
diff --git a/mysql-test/suite/galera/r/galera_kill_largechanges.result b/mysql-test/suite/galera/r/galera_kill_largechanges.result
index f4de101fef8..a04729d2c87 100644
--- a/mysql-test/suite/galera/r/galera_kill_largechanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_largechanges.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
diff --git a/mysql-test/suite/galera/r/galera_kill_smallchanges.result b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
index 2ee291004b0..206591bbebe 100644
--- a/mysql-test/suite/galera/r/galera_kill_smallchanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
diff --git a/mysql-test/suite/galera/r/galera_lock_table.result b/mysql-test/suite/galera/r/galera_lock_table.result
index ce529deb22c..c3df1749ada 100644
--- a/mysql-test/suite/galera/r/galera_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_lock_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_log_bin.result b/mysql-test/suite/galera/r/galera_log_bin.result
index a6f0ef12be1..12e5e59a426 100644
--- a/mysql-test/suite/galera/r/galera_log_bin.result
+++ b/mysql-test/suite/galera/r/galera_log_bin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -66,4 +68,6 @@ mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1;
DROP TABLE t2;
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_log_output_csv.result b/mysql-test/suite/galera/r/galera_log_output_csv.result
index 5cb61b36332..efe8c73c986 100644
--- a/mysql-test/suite/galera/r/galera_log_output_csv.result
+++ b/mysql-test/suite/galera/r/galera_log_output_csv.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) > 0 FROM mysql.general_log;
diff --git a/mysql-test/suite/galera/r/galera_many_columns.result b/mysql-test/suite/galera/r/galera_many_columns.result
index db8a8f5ec9d..64e97f11fa7 100644
--- a/mysql-test/suite/galera/r/galera_many_columns.result
+++ b/mysql-test/suite/galera/r/galera_many_columns.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
INSERT INTO t1 (f1) VALUES (DEFAULT);
connection node_2;
SELECT f1 = 'ABC', f1017 = 'ABC' FROM t1;
@@ -19,7 +21,7 @@ UPDATE t1 SET f2 = 'CDE' WHERE f1 = 'XYZ' AND f1017 = 'XYZ';
COMMIT;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
connection node_2;
ROLLBACK;
diff --git a/mysql-test/suite/galera/r/galera_many_indexes.result b/mysql-test/suite/galera/r/galera_many_indexes.result
index 5691eef4c00..963d3552252 100644
--- a/mysql-test/suite/galera/r/galera_many_indexes.result
+++ b/mysql-test/suite/galera/r/galera_many_indexes.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(767) PRIMARY KEY) ENGINE=InnoDB;
CREATE UNIQUE INDEX i63 ON t1(f1);
CREATE UNIQUE INDEX i62 ON t1(f1);
@@ -91,6 +93,7 @@ COUNT(*) = 1
INSERT INTO t1 VALUES (REPEAT('b', 767));
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
connection node_1;
SELECT COUNT(*) = 2 FROM t1;
@@ -98,6 +101,7 @@ COUNT(*) = 2
1
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DELETE FROM t1 WHERE f1 = REPEAT('b', 767);
connection node_1;
@@ -129,5 +133,5 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_many_rows.result b/mysql-test/suite/galera/r/galera_many_rows.result
index b06925fea60..26771dc3c24 100644
--- a/mysql-test/suite/galera/r/galera_many_rows.result
+++ b/mysql-test/suite/galera/r/galera_many_rows.result
@@ -1,3 +1,7 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
connection node_1;
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
@@ -35,6 +39,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_many_tables_nopk.result b/mysql-test/suite/galera/r/galera_many_tables_nopk.result
index 573ce758a13..2a226defcc7 100644
--- a/mysql-test/suite/galera/r/galera_many_tables_nopk.result
+++ b/mysql-test/suite/galera/r/galera_many_tables_nopk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -18,6 +20,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP SCHEMA test;
CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera/r/galera_many_tables_pk.result b/mysql-test/suite/galera/r/galera_many_tables_pk.result
index 67624d5edb0..2700df8ebe4 100644
--- a/mysql-test/suite/galera/r/galera_many_tables_pk.result
+++ b/mysql-test/suite/galera/r/galera_many_tables_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't%';
@@ -23,7 +25,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
include/diff_servers.inc [servers=1 2]
DROP SCHEMA test;
CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera/r/galera_mdev_10812.result b/mysql-test/suite/galera/r/galera_mdev_10812.result
index de0a08a3794..16eacc6beab 100644
--- a/mysql-test/suite/galera/r/galera_mdev_10812.result
+++ b/mysql-test/suite/galera/r/galera_mdev_10812.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-10812: On COM_STMT_CLOSE/COM_QUIT, when wsrep_conflict_state
# is ABORTED, it causes wrong response to be sent to the client
diff --git a/mysql-test/suite/galera/r/galera_mdev_13787.result b/mysql-test/suite/galera/r/galera_mdev_13787.result
index b1caec0283c..4d0770918c0 100644
--- a/mysql-test/suite/galera/r/galera_mdev_13787.result
+++ b/mysql-test/suite/galera/r/galera_mdev_13787.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
create table t(a int);
insert into t select 1;
diff --git a/mysql-test/suite/galera/r/galera_mdev_15611.result b/mysql-test/suite/galera/r/galera_mdev_15611.result
index 9ea1684494a..5461f8f03fb 100644
--- a/mysql-test/suite/galera/r/galera_mdev_15611.result
+++ b/mysql-test/suite/galera/r/galera_mdev_15611.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (
id int primary key
diff --git a/mysql-test/suite/galera/r/galera_mdl_race.result b/mysql-test/suite/galera/r/galera_mdl_race.result
index 048b2c46a67..e05c1493322 100644
--- a/mysql-test/suite/galera/r/galera_mdl_race.result
+++ b/mysql-test/suite/galera/r/galera_mdl_race.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a');
@@ -28,7 +30,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
UNLOCK TABLES;
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
COUNT(*) = 1
1
diff --git a/mysql-test/suite/galera/r/galera_multi_database.result b/mysql-test/suite/galera/r/galera_multi_database.result
index f6242de663b..a9d58d5d0e2 100644
--- a/mysql-test/suite/galera/r/galera_multi_database.result
+++ b/mysql-test/suite/galera/r/galera_multi_database.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE DATABASE d1;
CREATE TABLE d1.t1(f1 INTEGER) ENGINE=InnoDB;
CREATE DATABASE d2;
diff --git a/mysql-test/suite/galera/r/galera_myisam_autocommit.result b/mysql-test/suite/galera/r/galera_myisam_autocommit.result
index e9578a261e6..6213e8f6380 100644
--- a/mysql-test/suite/galera/r/galera_myisam_autocommit.result
+++ b/mysql-test/suite/galera/r/galera_myisam_autocommit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
diff --git a/mysql-test/suite/galera/r/galera_myisam_transactions.result b/mysql-test/suite/galera/r/galera_myisam_transactions.result
index 25796c309d1..091c5ffb6f6 100644
--- a/mysql-test/suite/galera/r/galera_myisam_transactions.result
+++ b/mysql-test/suite/galera/r/galera_myisam_transactions.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t3 (f1 INTEGER) ENGINE=MyISAM;
diff --git a/mysql-test/suite/galera/r/galera_nopk_bit.result b/mysql-test/suite/galera/r/galera_nopk_bit.result
index 21da039df09..97ded793c08 100644
--- a/mysql-test/suite/galera/r/galera_nopk_bit.result
+++ b/mysql-test/suite/galera/r/galera_nopk_bit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BIT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),(0),(b'1');
connection node_2;
@@ -28,6 +30,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_nopk_blob.result b/mysql-test/suite/galera/r/galera_nopk_blob.result
index 53e04f72d1e..6a3cee516c9 100644
--- a/mysql-test/suite/galera/r/galera_nopk_blob.result
+++ b/mysql-test/suite/galera/r/galera_nopk_blob.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),('abc');
connection node_2;
@@ -28,6 +30,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_nopk_large_varchar.result b/mysql-test/suite/galera/r/galera_nopk_large_varchar.result
index a83cf7f2d91..6d29306996b 100644
--- a/mysql-test/suite/galera/r/galera_nopk_large_varchar.result
+++ b/mysql-test/suite/galera/r/galera_nopk_large_varchar.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 VARCHAR(8000)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),(CONCAT(REPEAT('x', 7999), 'a'));
connection node_2;
@@ -31,6 +33,6 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_nopk_unicode.result b/mysql-test/suite/galera/r/galera_nopk_unicode.result
index b2a8bb63df9..587ba9285da 100644
--- a/mysql-test/suite/galera/r/galera_nopk_unicode.result
+++ b/mysql-test/suite/galera/r/galera_nopk_unicode.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255),
KEY (f1)
@@ -19,7 +21,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT f1 = 'текÑÑ‚2' FROM t1;
f1 = 'текÑÑ‚2'
1
diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
index ab56a8a2aa6..48625b3ba4a 100644
--- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
@@ -8,10 +10,10 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
connection node_2a;
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committing%';
COUNT(*) = 1
1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
COUNT(*) = 1
1
SELECT COUNT(*) = 0 FROM t1;
@@ -30,7 +32,7 @@ COUNT(*) = 1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committed%';
COUNT(*) = 2
1
SET GLOBAL wsrep_slave_threads = 1;;
diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
index 827b2aa9dac..d2e09d7084f 100644
--- a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
+++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
@@ -1,5 +1,7 @@
+connection node_2;
+connection node_1;
connection node_1;
-CREATE TABLE ten (f1 INTEGER);
+CREATE TABLE ten (f1 INTEGER) engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
connection node_2;
@@ -11,18 +13,26 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_2;
INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+30000
+SELECT COUNT(DISTINCT f1) FROM t1;
+COUNT(DISTINCT f1)
+30000
connection node_1a;
-connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
30000
SELECT COUNT(DISTINCT f1) FROM t1;
COUNT(DISTINCT f1)
30000
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
-USER = 'system user' AND STATE NOT LIKE 'InnoDB%';
+connection node_2;
+SELECT COUNT(*) FROM t1;
COUNT(*)
-3
+30000
+SELECT COUNT(DISTINCT f1) FROM t1;
+COUNT(DISTINCT f1)
+30000
connection default;
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result
index c8c07221cb1..09a415d47eb 100644
--- a/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result
+++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_manytrx.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
@@ -12,7 +14,7 @@ COUNT(*) = 20000
SELECT COUNT(DISTINCT f1) = 20000 FROM t1;
COUNT(DISTINCT f1) = 20000
1
-SELECT COUNT(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
+SELECT COUNT(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'wsrep applier committed%';
COUNT(*) = 4
1
connection default;
diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result
index 3f657a0479e..d95abefdc24 100644
--- a/mysql-test/suite/galera/r/galera_parallel_simple.result
+++ b/mysql-test/suite/galera/r/galera_parallel_simple.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_pc_recovery.result b/mysql-test/suite/galera/r/galera_pc_recovery.result
new file mode 100644
index 00000000000..17a43d17211
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_pc_recovery.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 2
+1
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
+connection node_1;
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
+connection node_2;
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
diff --git a/mysql-test/suite/galera/r/galera_pk_bigint_signed.result b/mysql-test/suite/galera/r/galera_pk_bigint_signed.result
index 807ab62c548..0b538778204 100644
--- a/mysql-test/suite/galera/r/galera_pk_bigint_signed.result
+++ b/mysql-test/suite/galera/r/galera_pk_bigint_signed.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BIGINT SIGNED PRIMARY KEY, f2 VARCHAR(5)) ENGINE=InnoDB;
INSERT INTO t1 VALUES
(-9223372036854775808, 'min'),
@@ -27,6 +29,6 @@ COMMIT;
SET AUTOCOMMIT=ON;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET AUTOCOMMIT=ON;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result b/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
index c94b7e2314a..9442f79cd14 100644
--- a/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
+++ b/mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 BIGINT UNSIGNED PRIMARY KEY, f2 VARCHAR(5)) ENGINE=InnoDB;
INSERT INTO t1 VALUES
(18446744073709551615, 'max')
@@ -24,6 +26,6 @@ COMMIT;
SET AUTOCOMMIT=ON;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET AUTOCOMMIT=ON;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_prepared_statement.result b/mysql-test/suite/galera/r/galera_prepared_statement.result
index d32d412ff46..b84f25e9929 100644
--- a/mysql-test/suite/galera/r/galera_prepared_statement.result
+++ b/mysql-test/suite/galera/r/galera_prepared_statement.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t3 (f1 CHAR(5)) ENGINE=InnoDB;
@@ -28,7 +30,7 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
ALTER TABLE t1 DROP COLUMN f1;
connection node_1;
EXECUTE st1;
-ERROR 22007: Incorrect integer value: 'abc' for column 'f2' at row 1
+ERROR 22007: Incorrect integer value: 'abc' for column `test`.`t1`.`f2` at row 1
connection node_1;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_query_cache.result b/mysql-test/suite/galera/r/galera_query_cache.result
index e64c9438646..8f5bc4b6f37 100644
--- a/mysql-test/suite/galera/r/galera_query_cache.result
+++ b/mysql-test/suite/galera/r/galera_query_cache.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
index 8c9cece9097..4ee910f9169 100644
--- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_read_only.result b/mysql-test/suite/galera/r/galera_read_only.result
index 4c2523f8691..fe8b45fa596 100644
--- a/mysql-test/suite/galera/r/galera_read_only.result
+++ b/mysql-test/suite/galera/r/galera_read_only.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL read_only=TRUE;
diff --git a/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result b/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result
index 2470f59c497..3d421216f93 100644
--- a/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result
+++ b/mysql-test/suite/galera/r/galera_repl_key_format_flat16.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL wsrep_provider_options = 'repl.key_format=FLAT16';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
index da24a741351..0528df7b9f6 100644
--- a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
+++ b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
@@ -1,8 +1,10 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
INSERT INTO t1 VALUES (REPEAT('a', 512));
-ERROR HY000: Got error 90 "Message too long" during COMMIT
+ERROR HY000: Got error 5 "Input/output error" during COMMIT
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
diff --git a/mysql-test/suite/galera/r/galera_restart_nochanges.result b/mysql-test/suite/galera/r/galera_restart_nochanges.result
index b35ae50e2fb..09f8d9a586b 100644
--- a/mysql-test/suite/galera/r/galera_restart_nochanges.result
+++ b/mysql-test/suite/galera/r/galera_restart_nochanges.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
index ba6f30fcf30..6e672c2d444 100644
--- a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
+++ b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result
index bef89acfc92..b1124b597c5 100644
--- a/mysql-test/suite/galera/r/galera_roles.result
+++ b/mysql-test/suite/galera/r/galera_roles.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# Testing CREATE/GRANT role
#
diff --git a/mysql-test/suite/galera/r/galera_rsu_add_pk.result b/mysql-test/suite/galera/r/galera_rsu_add_pk.result
index 4c79da154e2..9b068ba30d1 100644
--- a/mysql-test/suite/galera/r/galera_rsu_add_pk.result
+++ b/mysql-test/suite/galera/r/galera_rsu_add_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_rsu_drop_pk.result b/mysql-test/suite/galera/r/galera_rsu_drop_pk.result
index f64649ef4e2..7d731955691 100644
--- a/mysql-test/suite/galera/r/galera_rsu_drop_pk.result
+++ b/mysql-test/suite/galera/r/galera_rsu_drop_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_rsu_error.result b/mysql-test/suite/galera/r/galera_rsu_error.result
index 5c16e34b492..f78e8fa544c 100644
--- a/mysql-test/suite/galera/r/galera_rsu_error.result
+++ b/mysql-test/suite/galera/r/galera_rsu_error.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 VALUES (1), (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_rsu_simple.result b/mysql-test/suite/galera/r/galera_rsu_simple.result
index d0ddcfb4d64..d75ef094065 100644
--- a/mysql-test/suite/galera/r/galera_rsu_simple.result
+++ b/mysql-test/suite/galera/r/galera_rsu_simple.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_2;
SET SESSION wsrep_OSU_method = "RSU";
diff --git a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
index a103e810588..310611a0e49 100644
--- a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
+++ b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_desync=1;
diff --git a/mysql-test/suite/galera/r/galera_sbr.result b/mysql-test/suite/galera/r/galera_sbr.result
index 0bdaeef5b8a..c5fdecece0e 100644
--- a/mysql-test/suite/galera/r/galera_sbr.result
+++ b/mysql-test/suite/galera/r/galera_sbr.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
diff --git a/mysql-test/suite/galera/r/galera_sbr_binlog.result b/mysql-test/suite/galera/r/galera_sbr_binlog.result
index 0bdaeef5b8a..c5fdecece0e 100644
--- a/mysql-test/suite/galera/r/galera_sbr_binlog.result
+++ b/mysql-test/suite/galera/r/galera_sbr_binlog.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
diff --git a/mysql-test/suite/galera/r/galera_schema_dirty_reads.result b/mysql-test/suite/galera/r/galera_schema_dirty_reads.result
index edf20da92c6..fbac9ff4eb7 100644
--- a/mysql-test/suite/galera/r/galera_schema_dirty_reads.result
+++ b/mysql-test/suite/galera/r/galera_schema_dirty_reads.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
USE information_schema;
SELECT * FROM SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep_dirty_reads";
VARIABLE_NAME VARIABLE_VALUE
diff --git a/mysql-test/suite/galera/r/galera_serializable.result b/mysql-test/suite/galera/r/galera_serializable.result
index be3f93a081f..e3785663271 100644
--- a/mysql-test/suite/galera/r/galera_serializable.result
+++ b/mysql-test/suite/galera/r/galera_serializable.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
@@ -9,7 +11,7 @@ connection node_2;
INSERT INTO t1 VALUES (1,1);
connection node_1;
SELECT * FROM t1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
DELETE FROM t1;
connection node_1;
@@ -22,7 +24,7 @@ connection node_2;
UPDATE t1 SET f2 = 2;
connection node_1;
UPDATE t1 SET f2 = 3;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
DELETE FROM t1;
connection node_1;
@@ -33,5 +35,5 @@ connection node_2;
INSERT INTO t1 VALUES (1,2);
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_server.result b/mysql-test/suite/galera/r/galera_server.result
index cc08b826e82..5130dee3459 100644
--- a/mysql-test/suite/galera/r/galera_server.result
+++ b/mysql-test/suite/galera/r/galera_server.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
# On node_1
CREATE SERVER s1
diff --git a/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result b/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result
index 14407c917a1..e9f81192386 100644
--- a/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result
+++ b/mysql-test/suite/galera/r/galera_sql_log_bin_zero.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION sql_log_bin = 0;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/galera_ssl.result b/mysql-test/suite/galera/r/galera_ssl.result
index 022d06319b8..ec3b717e3f3 100644
--- a/mysql-test/suite/galera/r/galera_ssl.result
+++ b/mysql-test/suite/galera/r/galera_ssl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
diff --git a/mysql-test/suite/galera/r/galera_ssl_compression.result b/mysql-test/suite/galera/r/galera_ssl_compression.result
index 333d646376c..0acc4b97eea 100644
--- a/mysql-test/suite/galera/r/galera_ssl_compression.result
+++ b/mysql-test/suite/galera/r/galera_ssl_compression.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
index 8b091eb370a..819bcba7cac 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
@@ -1,5 +1,5 @@
---- galera_sst_mariabackup.result
-+++ galera_sst_mariabackup,debug.reject
+--- r/galera_sst_mariabackup.result 2018-11-21 16:50:35.766982279 +0200
++++ r/galera_sst_mariabackup.reject 2018-11-22 09:20:10.344408266 +0200
@@ -286,5 +286,113 @@
DROP TABLE t1;
COMMIT;
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup.result b/mysql-test/suite/galera/r/galera_sst_mariabackup.result
index fdb5883b590..4fdc283b286 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
index 8b091eb370a..f06da63561a 100644
--- a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir,debug.rdiff
@@ -1,5 +1,5 @@
---- galera_sst_mariabackup.result
-+++ galera_sst_mariabackup,debug.reject
+--- r/galera_sst_mariabackup_data_dir.result 2018-12-12 13:59:56.525554689 +0100
++++ r/galera_sst_mariabackup_data_dir.reject 2018-12-12 14:33:50.868181956 +0100
@@ -286,5 +286,113 @@
DROP TABLE t1;
COMMIT;
diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
index fdb5883b590..4fdc283b286 100644
--- a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_data_dir.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result
new file mode 100644
index 00000000000..409da775d9a
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_encrypt_with_key.result
@@ -0,0 +1,5 @@
+connection node_2;
+connection node_1;
+SELECT 1;
+1
+1
diff --git a/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result b/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result
new file mode 100644
index 00000000000..568c06de94c
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup_table_options.result
@@ -0,0 +1,999 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+Performing State Transfer on a server that starts from a clean var directory
+This is accomplished by shutting down node #2 and removing its var directory before restarting it
+connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1;
+CREATE TABLE t3 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=NO;
+CREATE TABLE t4 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;
+CREATE TABLE t5 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+CREATE TABLE t6 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=NO;
+CREATE TABLE t7 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES;
+CREATE TABLE t8 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=NO;
+CREATE TABLE t9 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=YES;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+insert into t9 values ('node1_committed_before');
+insert into t9 values ('node1_committed_before');
+insert into t9 values ('node1_committed_before');
+insert into t9 values ('node1_committed_before');
+insert into t9 values ('node1_committed_before');
+insert into t8 values ('node1_committed_before');
+insert into t8 values ('node1_committed_before');
+insert into t8 values ('node1_committed_before');
+insert into t8 values ('node1_committed_before');
+insert into t8 values ('node1_committed_before');
+insert into t7 values ('node1_committed_before');
+insert into t7 values ('node1_committed_before');
+insert into t7 values ('node1_committed_before');
+insert into t7 values ('node1_committed_before');
+insert into t7 values ('node1_committed_before');
+insert into t6 values ('node1_committed_before');
+insert into t6 values ('node1_committed_before');
+insert into t6 values ('node1_committed_before');
+insert into t6 values ('node1_committed_before');
+insert into t6 values ('node1_committed_before');
+insert into t5 values ('node1_committed_before');
+insert into t5 values ('node1_committed_before');
+insert into t5 values ('node1_committed_before');
+insert into t5 values ('node1_committed_before');
+insert into t5 values ('node1_committed_before');
+insert into t4 values ('node1_committed_before');
+insert into t4 values ('node1_committed_before');
+insert into t4 values ('node1_committed_before');
+insert into t4 values ('node1_committed_before');
+insert into t4 values ('node1_committed_before');
+insert into t3 values ('node1_committed_before');
+insert into t3 values ('node1_committed_before');
+insert into t3 values ('node1_committed_before');
+insert into t3 values ('node1_committed_before');
+insert into t3 values ('node1_committed_before');
+insert into t2 values ('node1_committed_before');
+insert into t2 values ('node1_committed_before');
+insert into t2 values ('node1_committed_before');
+insert into t2 values ('node1_committed_before');
+insert into t2 values ('node1_committed_before');
+insert into t1 values ('node1_committed_before');
+insert into t1 values ('node1_committed_before');
+insert into t1 values ('node1_committed_before');
+insert into t1 values ('node1_committed_before');
+insert into t1 values ('node1_committed_before');
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+insert into t9 values ('node2_committed_before');
+insert into t9 values ('node2_committed_before');
+insert into t9 values ('node2_committed_before');
+insert into t9 values ('node2_committed_before');
+insert into t9 values ('node2_committed_before');
+insert into t8 values ('node2_committed_before');
+insert into t8 values ('node2_committed_before');
+insert into t8 values ('node2_committed_before');
+insert into t8 values ('node2_committed_before');
+insert into t8 values ('node2_committed_before');
+insert into t7 values ('node2_committed_before');
+insert into t7 values ('node2_committed_before');
+insert into t7 values ('node2_committed_before');
+insert into t7 values ('node2_committed_before');
+insert into t7 values ('node2_committed_before');
+insert into t6 values ('node2_committed_before');
+insert into t6 values ('node2_committed_before');
+insert into t6 values ('node2_committed_before');
+insert into t6 values ('node2_committed_before');
+insert into t6 values ('node2_committed_before');
+insert into t5 values ('node2_committed_before');
+insert into t5 values ('node2_committed_before');
+insert into t5 values ('node2_committed_before');
+insert into t5 values ('node2_committed_before');
+insert into t5 values ('node2_committed_before');
+insert into t4 values ('node2_committed_before');
+insert into t4 values ('node2_committed_before');
+insert into t4 values ('node2_committed_before');
+insert into t4 values ('node2_committed_before');
+insert into t4 values ('node2_committed_before');
+insert into t3 values ('node2_committed_before');
+insert into t3 values ('node2_committed_before');
+insert into t3 values ('node2_committed_before');
+insert into t3 values ('node2_committed_before');
+insert into t3 values ('node2_committed_before');
+insert into t2 values ('node2_committed_before');
+insert into t2 values ('node2_committed_before');
+insert into t2 values ('node2_committed_before');
+insert into t2 values ('node2_committed_before');
+insert into t2 values ('node2_committed_before');
+insert into t1 values ('node2_committed_before');
+insert into t1 values ('node2_committed_before');
+insert into t1 values ('node2_committed_before');
+insert into t1 values ('node2_committed_before');
+insert into t1 values ('node2_committed_before');
+COMMIT;
+Shutting down server ...
+connection node_1;
+Cleaning var directory ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+insert into t9 values ('node1_committed_during');
+insert into t9 values ('node1_committed_during');
+insert into t9 values ('node1_committed_during');
+insert into t9 values ('node1_committed_during');
+insert into t9 values ('node1_committed_during');
+insert into t8 values ('node1_committed_during');
+insert into t8 values ('node1_committed_during');
+insert into t8 values ('node1_committed_during');
+insert into t8 values ('node1_committed_during');
+insert into t8 values ('node1_committed_during');
+insert into t7 values ('node1_committed_during');
+insert into t7 values ('node1_committed_during');
+insert into t7 values ('node1_committed_during');
+insert into t7 values ('node1_committed_during');
+insert into t7 values ('node1_committed_during');
+insert into t6 values ('node1_committed_during');
+insert into t6 values ('node1_committed_during');
+insert into t6 values ('node1_committed_during');
+insert into t6 values ('node1_committed_during');
+insert into t6 values ('node1_committed_during');
+insert into t5 values ('node1_committed_during');
+insert into t5 values ('node1_committed_during');
+insert into t5 values ('node1_committed_during');
+insert into t5 values ('node1_committed_during');
+insert into t5 values ('node1_committed_during');
+insert into t4 values ('node1_committed_during');
+insert into t4 values ('node1_committed_during');
+insert into t4 values ('node1_committed_during');
+insert into t4 values ('node1_committed_during');
+insert into t4 values ('node1_committed_during');
+insert into t3 values ('node1_committed_during');
+insert into t3 values ('node1_committed_during');
+insert into t3 values ('node1_committed_during');
+insert into t3 values ('node1_committed_during');
+insert into t3 values ('node1_committed_during');
+insert into t2 values ('node1_committed_during');
+insert into t2 values ('node1_committed_during');
+insert into t2 values ('node1_committed_during');
+insert into t2 values ('node1_committed_during');
+insert into t2 values ('node1_committed_during');
+insert into t1 values ('node1_committed_during');
+insert into t1 values ('node1_committed_during');
+insert into t1 values ('node1_committed_during');
+insert into t1 values ('node1_committed_during');
+insert into t1 values ('node1_committed_during');
+COMMIT;
+START TRANSACTION;
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+insert into t9 values ('node1_to_be_rollbacked_after');
+insert into t9 values ('node1_to_be_rollbacked_after');
+insert into t9 values ('node1_to_be_rollbacked_after');
+insert into t9 values ('node1_to_be_rollbacked_after');
+insert into t9 values ('node1_to_be_rollbacked_after');
+insert into t8 values ('node1_to_be_rollbacked_after');
+insert into t8 values ('node1_to_be_rollbacked_after');
+insert into t8 values ('node1_to_be_rollbacked_after');
+insert into t8 values ('node1_to_be_rollbacked_after');
+insert into t8 values ('node1_to_be_rollbacked_after');
+insert into t7 values ('node1_to_be_rollbacked_after');
+insert into t7 values ('node1_to_be_rollbacked_after');
+insert into t7 values ('node1_to_be_rollbacked_after');
+insert into t7 values ('node1_to_be_rollbacked_after');
+insert into t7 values ('node1_to_be_rollbacked_after');
+insert into t6 values ('node1_to_be_rollbacked_after');
+insert into t6 values ('node1_to_be_rollbacked_after');
+insert into t6 values ('node1_to_be_rollbacked_after');
+insert into t6 values ('node1_to_be_rollbacked_after');
+insert into t6 values ('node1_to_be_rollbacked_after');
+insert into t5 values ('node1_to_be_rollbacked_after');
+insert into t5 values ('node1_to_be_rollbacked_after');
+insert into t5 values ('node1_to_be_rollbacked_after');
+insert into t5 values ('node1_to_be_rollbacked_after');
+insert into t5 values ('node1_to_be_rollbacked_after');
+insert into t4 values ('node1_to_be_rollbacked_after');
+insert into t4 values ('node1_to_be_rollbacked_after');
+insert into t4 values ('node1_to_be_rollbacked_after');
+insert into t4 values ('node1_to_be_rollbacked_after');
+insert into t4 values ('node1_to_be_rollbacked_after');
+insert into t3 values ('node1_to_be_rollbacked_after');
+insert into t3 values ('node1_to_be_rollbacked_after');
+insert into t3 values ('node1_to_be_rollbacked_after');
+insert into t3 values ('node1_to_be_rollbacked_after');
+insert into t3 values ('node1_to_be_rollbacked_after');
+insert into t2 values ('node1_to_be_rollbacked_after');
+insert into t2 values ('node1_to_be_rollbacked_after');
+insert into t2 values ('node1_to_be_rollbacked_after');
+insert into t2 values ('node1_to_be_rollbacked_after');
+insert into t2 values ('node1_to_be_rollbacked_after');
+insert into t1 values ('node1_to_be_rollbacked_after');
+insert into t1 values ('node1_to_be_rollbacked_after');
+insert into t1 values ('node1_to_be_rollbacked_after');
+insert into t1 values ('node1_to_be_rollbacked_after');
+insert into t1 values ('node1_to_be_rollbacked_after');
+connection node_2;
+Starting server ...
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+COMMIT;
+connection node_1;
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t9 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t8 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t7 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t6 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t5 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t4 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t3 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t2 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+insert into t1 values ('node1_to_be_committed_after');
+COMMIT;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+insert into t9 values ('node1_committed_after');
+insert into t9 values ('node1_committed_after');
+insert into t9 values ('node1_committed_after');
+insert into t9 values ('node1_committed_after');
+insert into t9 values ('node1_committed_after');
+insert into t8 values ('node1_committed_after');
+insert into t8 values ('node1_committed_after');
+insert into t8 values ('node1_committed_after');
+insert into t8 values ('node1_committed_after');
+insert into t8 values ('node1_committed_after');
+insert into t7 values ('node1_committed_after');
+insert into t7 values ('node1_committed_after');
+insert into t7 values ('node1_committed_after');
+insert into t7 values ('node1_committed_after');
+insert into t7 values ('node1_committed_after');
+insert into t6 values ('node1_committed_after');
+insert into t6 values ('node1_committed_after');
+insert into t6 values ('node1_committed_after');
+insert into t6 values ('node1_committed_after');
+insert into t6 values ('node1_committed_after');
+insert into t5 values ('node1_committed_after');
+insert into t5 values ('node1_committed_after');
+insert into t5 values ('node1_committed_after');
+insert into t5 values ('node1_committed_after');
+insert into t5 values ('node1_committed_after');
+insert into t4 values ('node1_committed_after');
+insert into t4 values ('node1_committed_after');
+insert into t4 values ('node1_committed_after');
+insert into t4 values ('node1_committed_after');
+insert into t4 values ('node1_committed_after');
+insert into t3 values ('node1_committed_after');
+insert into t3 values ('node1_committed_after');
+insert into t3 values ('node1_committed_after');
+insert into t3 values ('node1_committed_after');
+insert into t3 values ('node1_committed_after');
+insert into t2 values ('node1_committed_after');
+insert into t2 values ('node1_committed_after');
+insert into t2 values ('node1_committed_after');
+insert into t2 values ('node1_committed_after');
+insert into t2 values ('node1_committed_after');
+insert into t1 values ('node1_committed_after');
+insert into t1 values ('node1_committed_after');
+insert into t1 values ('node1_committed_after');
+insert into t1 values ('node1_committed_after');
+insert into t1 values ('node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_clean_slave;
+ROLLBACK;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t3;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t4;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t5;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t6;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t7;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t8;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t9;
+COUNT(*)
+30
+SELECT * FROM t1;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t2;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t3;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t4;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t5;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t6;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t7;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t8;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t9;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+COMMIT;
+SET AUTOCOMMIT=ON;
+connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t3;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t4;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t5;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t6;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t7;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t8;
+COUNT(*)
+30
+SELECT COUNT(*) FROM t9;
+COUNT(*)
+30
+SELECT * FROM t1;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t2;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t3;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t4;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t5;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t6;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t7;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t8;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+SELECT * FROM t9;
+f1
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node1_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node2_committed_before
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_committed_during
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_to_be_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+node1_committed_after
+COMMIT;
+DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9;
+COMMIT;
+SET AUTOCOMMIT=ON;
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
index 3eadee615ed..2978411c8f7 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
@@ -1,6 +1,22 @@
---- galera_sst_mysqldump.result
-+++ galera_sst_mysqldump,debug.reject
-@@ -388,6 +388,114 @@
+--- galera_sst_mysqldump.result 2018-11-29 23:54:03.663607613 +0100
++++ galera_sst_mysqldump,debug.reject 2018-11-29 23:55:42.377562815 +0100
+@@ -1,3 +1,5 @@
++connection node_2;
++connection node_1;
+ Setting SST method to mysqldump ...
+ call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
+ call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
+@@ -56,6 +58,9 @@
+ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+ connection node_2;
+ Loading wsrep provider ...
++disconnect node_2;
++connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
++connection node_2;
+ SET AUTOCOMMIT=OFF;
+ START TRANSACTION;
+ INSERT INTO t1 VALUES ('node2_committed_after');
+@@ -390,6 +395,114 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump,release.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump,release.rdiff
new file mode 100644
index 00000000000..3e8fee1b098
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump,release.rdiff
@@ -0,0 +1,18 @@
+--- suite/galera/r/galera_sst_mysqldump.result 2018-12-20 14:22:41.730134062 +0100
++++ suite/galera/r/galera_sst_mysqldump.reject 2019-01-16 22:18:44.139781857 +0100
+@@ -1,3 +1,5 @@
++connection node_2;
++connection node_1;
+ Setting SST method to mysqldump ...
+ call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
+ call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
+@@ -56,6 +58,9 @@
+ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
+ connection node_2;
+ Loading wsrep provider ...
++disconnect node_2;
++connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
++connection node_2;
+ SET AUTOCOMMIT=OFF;
+ START TRANSACTION;
+ INSERT INTO t1 VALUES ('node2_committed_after');
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump.result b/mysql-test/suite/galera/r/galera_sst_mysqldump.result
index 5c530c32ce6..4ed679ba477 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump.result
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump.result
@@ -400,3 +400,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
new file mode 100644
index 00000000000..4a7db96dc22
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
@@ -0,0 +1,106 @@
+--- r/galera_sst_mysqldump_with_key.result 2018-11-19 09:56:30.081976558 +0200
++++ r/galera_sst_mysqldump_with_key.reject 2018-11-19 10:47:41.609299365 +0200
+@@ -183,6 +183,103 @@
+ DROP TABLE t1;
+ COMMIT;
+ SET AUTOCOMMIT=ON;
++Performing State Transfer on a server that has been killed and restarted
++while a DDL was in progress on it
++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES ('node1_committed_before');
++INSERT INTO t1 VALUES ('node1_committed_before');
++START TRANSACTION;
++INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES ('node2_committed_before');
++INSERT INTO t1 VALUES ('node2_committed_before');
++COMMIT;
++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++SET wsrep_sync_wait = 0;
++Killing server ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++INSERT INTO t1 (f1) VALUES ('node1_committed_during');
++COMMIT;
++START TRANSACTION;
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++Performing --wsrep-recover ...
++Starting server ...
++Using --wsrep-start-position when starting mysqld ...
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++INSERT INTO t1 (f1) VALUES ('node2_committed_after');
++COMMIT;
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++COMMIT;
++SET AUTOCOMMIT=OFF;
++START TRANSACTION;
++INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++INSERT INTO t1 (f1) VALUES ('node1_committed_after');
++COMMIT;
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++ROLLBACK;
++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++COUNT(*) = 2
++1
++SELECT COUNT(*) = 35 FROM t1;
++COUNT(*) = 35
++1
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++COMMIT;
++SET AUTOCOMMIT=ON;
++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
++COUNT(*) = 2
++1
++SELECT COUNT(*) = 35 FROM t1;
++COUNT(*) = 35
++1
++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
++COUNT(*) = 0
++1
++DROP TABLE t1;
++COMMIT;
++SET AUTOCOMMIT=ON;
++SET GLOBAL debug_dbug = $debug_orig;
+ CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+ DROP USER sst;
+ CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
index 02dde169911..3de446fec32 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
@@ -204,114 +204,17 @@ COUNT(*) = 0
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
-Performing State Transfer on a server that has been killed and restarted
-while a DDL was in progress on it
connection node_1;
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
connection node_2;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-COMMIT;
-SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
connection node_1;
-ALTER TABLE t1 ADD COLUMN f2 INTEGER;
connection node_2;
-SET wsrep_sync_wait = 0;
-Killing server ...
connection node_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-INSERT INTO t1 (f1) VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
connection node_2;
-Performing --wsrep-recover ...
connection node_2;
-Starting server ...
-Using --wsrep-start-position when starting mysqld ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-INSERT INTO t1 (f1) VALUES ('node2_committed_after');
-COMMIT;
connection node_1;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-INSERT INTO t1 (f1) VALUES ('node1_committed_after');
-COMMIT;
connection node_1a_galera_st_kill_slave_ddl;
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
-SET AUTOCOMMIT=ON;
connection node_1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
-SET GLOBAL debug_dbug = $debug_orig;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync.result b/mysql-test/suite/galera/r/galera_sst_rsync.result
index ff85a7d6c0f..d41d0d34e75 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
index 525156d88da..8ffe51c0cc3 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
@@ -1,6 +1,12 @@
---- suite/galera/r/galera_sst_rsync2.result 2018-09-12 13:09:35.352229478 +0200
-+++ suite/galera/r/galera_sst_rsync2,debug.reject 2018-09-12 17:00:51.601974979 +0200
-@@ -286,3 +286,111 @@
+--- galera_sst_rsync2.result 2018-11-29 17:57:53.288606346 +0100
++++ galera_sst_rsync2,debug.reject 2018-11-29 18:00:01.172512000 +0100
+@@ -1,3 +1,5 @@
++connection node_2;
++connection node_1;
+ connection node_1;
+ connection node_2;
+ Performing State Transfer on a server that has been shut down cleanly and restarted
+@@ -286,3 +288,111 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
index ff85a7d6c0f..d41d0d34e75 100644
--- a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
+++ b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2-options.result b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2-options.result
deleted file mode 100644
index 990e0a29506..00000000000
--- a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2-options.result
+++ /dev/null
@@ -1,3 +0,0 @@
-SELECT 1;
-1
-1
diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result
deleted file mode 100644
index cec0f21ee22..00000000000
--- a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result
+++ /dev/null
@@ -1,262 +0,0 @@
-Performing State Transfer on a server that has been shut down cleanly and restarted
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-COMMIT;
-Shutting down server ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-Starting server ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-COMMIT;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-COMMIT;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
-SET AUTOCOMMIT=ON;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
-Performing State Transfer on a server that starts from a clean var directory
-This is accomplished by shutting down node #2 and removing its var directory before restarting it
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-COMMIT;
-Shutting down server ...
-Cleaning var directory ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-Starting server ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-COMMIT;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-COMMIT;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
-SET AUTOCOMMIT=ON;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
-Performing State Transfer on a server that has been killed and restarted
-CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-INSERT INTO t1 VALUES ('node1_committed_before');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-INSERT INTO t1 VALUES ('node2_committed_before');
-COMMIT;
-Killing server ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-INSERT INTO t1 VALUES ('node1_committed_during');
-COMMIT;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-Performing --wsrep-recover ...
-Starting server ...
-Using --wsrep-start-position when starting mysqld ...
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-INSERT INTO t1 VALUES ('node2_committed_after');
-COMMIT;
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-INSERT INTO t1 VALUES ('node1_to_be_committed_after');
-COMMIT;
-SET AUTOCOMMIT=OFF;
-START TRANSACTION;
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-INSERT INTO t1 VALUES ('node1_committed_after');
-COMMIT;
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
-ROLLBACK;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-COMMIT;
-SET AUTOCOMMIT=ON;
-SELECT COUNT(*) = 35 FROM t1;
-COUNT(*) = 35
-1
-SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
-COUNT(*) = 0
-1
-DROP TABLE t1;
-COMMIT;
-SET AUTOCOMMIT=ON;
diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_encrypt_with_key.result b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_encrypt_with_key.result
deleted file mode 100644
index 990e0a29506..00000000000
--- a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_encrypt_with_key.result
+++ /dev/null
@@ -1,3 +0,0 @@
-SELECT 1;
-1
-1
diff --git a/mysql-test/suite/galera/r/galera_status_cluster.result b/mysql-test/suite/galera/r/galera_status_cluster.result
index ad92a51b775..9db0b88adc9 100644
--- a/mysql-test/suite/galera/r/galera_status_cluster.result
+++ b/mysql-test/suite/galera/r/galera_status_cluster.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
diff --git a/mysql-test/suite/galera/r/galera_status_local_index.result b/mysql-test/suite/galera/r/galera_status_local_index.result
index 8c36b60cc5f..c67498fff9f 100644
--- a/mysql-test/suite/galera/r/galera_status_local_index.result
+++ b/mysql-test/suite/galera/r/galera_status_local_index.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE wsrep_local_indexes (wsrep_local_index INTEGER);
INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index'));
diff --git a/mysql-test/suite/galera/r/galera_status_local_state.result b/mysql-test/suite/galera/r/galera_status_local_state.result
index 65713f1975c..3fe988ee6ac 100644
--- a/mysql-test/suite/galera/r/galera_status_local_state.result
+++ b/mysql-test/suite/galera/r/galera_status_local_state.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state';
VARIABLE_VALUE = 4
1
diff --git a/mysql-test/suite/galera/r/galera_suspend_slave.result b/mysql-test/suite/galera/r/galera_suspend_slave.result
index 07433399081..ce49b491778 100644
--- a/mysql-test/suite/galera/r/galera_suspend_slave.result
+++ b/mysql-test/suite/galera/r/galera_suspend_slave.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result
index def771ff88d..793da3246ff 100644
--- a/mysql-test/suite/galera/r/galera_sync_wait_show.result
+++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result
@@ -1,4 +1,6 @@
connection node_2;
+connection node_1;
+connection node_2;
SET SESSION wsrep_sync_wait = 8;
connection node_1;
CREATE DATABASE db1;
diff --git a/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result b/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result
index 8a86dfd11e2..a23b0523140 100644
--- a/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result
+++ b/mysql-test/suite/galera/r/galera_toi_alter_auto_increment.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_error.result b/mysql-test/suite/galera/r/galera_toi_ddl_error.result
index dafad153867..386dc28bed3 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_error.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_error.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -19,3 +21,6 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
DROP TABLE ten;
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query.");
+connection node_2;
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query.");
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
index 0dbc89978d4..0ecc4a4619f 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result b/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
index a5db90aa965..a7966e36133 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_fk_update.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_locking.result b/mysql-test/suite/galera/r/galera_toi_ddl_locking.result
index 68743c024a0..bbe181ce6f5 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_locking.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_locking.result
@@ -1,32 +1,46 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
connection node_1;
-SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
+SET DEBUG_SYNC= 'RESET';
+SET DEBUG_SYNC = 'alter_table_before_open_tables SIGNAL before_open_tables WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC= 'now WAIT_FOR before_open_tables';
+SET wsrep_retry_autocommit=0;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
-INSERT INTO t1 VALUES (1);
-Got one of the listed errors
+INSERT INTO t1 VALUES (1);;
+connection node_1c;
+SET SESSION wsrep_sync_wait = 0;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t2;
+COUNT(*) = 0
+1
INSERT INTO t2 VALUES (1);
COMMIT;;
connection node_1b;
SET SESSION wsrep_sync_wait = 0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
-COUNT(*) = 1
-1
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
+COUNT(*) = 1
+1
SET DEBUG_SYNC= 'now SIGNAL continue';
connection node_1a;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1c;
connection node_1;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
@@ -34,6 +48,7 @@ COUNT(*) = 0
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
+SET debug_sync='RESET';
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
@@ -41,9 +56,5 @@ COUNT(*) = 0
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
-connection node_1;
-SET DEBUG_SYNC= 'RESET';
-connection node_1b;
-SET DEBUG_SYNC= 'RESET';
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result b/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result
index 3844fa97d82..5412cd3faee 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_nonconflicting.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
connection node_2;
ALTER TABLE t1 ADD COLUMN f3 INTEGER; INSERT INTO t1 (f1, f2) VALUES (DEFAULT, 123);;
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result b/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result
index 722bb9d9e12..db702b1a59e 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_sequential.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_toi_drop_database.result b/mysql-test/suite/galera/r/galera_toi_drop_database.result
index 6d88c8ea230..48056c70126 100644
--- a/mysql-test/suite/galera/r/galera_toi_drop_database.result
+++ b/mysql-test/suite/galera/r/galera_toi_drop_database.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE DATABASE database1;
USE database1;
@@ -14,9 +16,9 @@ INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, te
connection node_2;
DROP DATABASE database1;;
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1a;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
connection node_1;
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
diff --git a/mysql-test/suite/galera/r/galera_toi_ftwrl.result b/mysql-test/suite/galera/r/galera_toi_ftwrl.result
index 0f13e95b689..fdc8b294c1c 100644
--- a/mysql-test/suite/galera/r/galera_toi_ftwrl.result
+++ b/mysql-test/suite/galera/r/galera_toi_ftwrl.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
FLUSH TABLES WITH READ LOCK;
diff --git a/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result b/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
index f5cc14ed0f1..ee8c826fd18 100644
--- a/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
+++ b/mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
@@ -8,7 +10,7 @@ connection node_2a;
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1;
INSERT INTO t1 VALUES (2, 2);
SELECT COUNT(*) = 2 FROM t1;
diff --git a/mysql-test/suite/galera/r/galera_toi_lock_shared.result b/mysql-test/suite/galera/r/galera_toi_lock_shared.result
index 950c4d83c70..fe1c88075d5 100644
--- a/mysql-test/suite/galera/r/galera_toi_lock_shared.result
+++ b/mysql-test/suite/galera/r/galera_toi_lock_shared.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_toi_truncate.result b/mysql-test/suite/galera/r/galera_toi_truncate.result
index 73285d723c1..081a82e6e7d 100644
--- a/mysql-test/suite/galera/r/galera_toi_truncate.result
+++ b/mysql-test/suite/galera/r/galera_toi_truncate.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
@@ -11,7 +13,7 @@ connection node_1;
TRUNCATE TABLE t1;;
connection node_1;
connection node_2;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
diff --git a/mysql-test/suite/galera/r/galera_transaction_read_only.result b/mysql-test/suite/galera/r/galera_transaction_read_only.result
index b388f195fb1..55923f58b65 100644
--- a/mysql-test/suite/galera/r/galera_transaction_read_only.result
+++ b/mysql-test/suite/galera/r/galera_transaction_read_only.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_transaction_replay.result b/mysql-test/suite/galera/r/galera_transaction_replay.result
index 7fd837433d2..272086c4eba 100644
--- a/mysql-test/suite/galera/r/galera_transaction_replay.result
+++ b/mysql-test/suite/galera/r/galera_transaction_replay.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
@@ -9,19 +11,73 @@ SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
f1 f2
2 a
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
connection node_1;
-COMMIT;;
+COMMIT;
connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+wsrep_local_replays
+1
connection node_2;
-UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
COUNT(*) = 1
@@ -46,22 +102,34 @@ SELECT * FROM t1;
i j
1 0
3 0
+SET AUTOCOMMIT=ON;
PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0";
connection node_1a;
-SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
-connection node_1;
-EXECUTE stmt1;;
-connection node_1a;
-SET SESSION wsrep_sync_wait = 0;
-SET SESSION wsrep_on = 0;
-SET SESSION wsrep_on = 1;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
INSERT INTO t1 VALUES(2,2);
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+SET SESSION wsrep_sync_wait=0;
+EXECUTE stmt1;
connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
+SET SESSION wsrep_sync_wait=7;
SELECT * FROM t1;
i j
1 1
@@ -74,5 +142,7 @@ i j
2 2
3 1
connection node_1;
+wsrep_local_replays
+1
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_truncate.result b/mysql-test/suite/galera/r/galera_truncate.result
index 4f3d72dbca7..c649d9bbaf9 100644
--- a/mysql-test/suite/galera/r/galera_truncate.result
+++ b/mysql-test/suite/galera/r/galera_truncate.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_truncate_temporary.result b/mysql-test/suite/galera/r/galera_truncate_temporary.result
index 183ebd9d24a..81373bda739 100644
--- a/mysql-test/suite/galera/r/galera_truncate_temporary.result
+++ b/mysql-test/suite/galera/r/galera_truncate_temporary.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TEMPORARY TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 VALUES (1);
TRUNCATE TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result
index 77848bc751f..5db1be8c910 100644
--- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result
+++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_sync_wait = 15;
connection node_2;
SET GLOBAL wsrep_sync_wait = 15;
diff --git a/mysql-test/suite/galera/r/galera_unicode_pk.result b/mysql-test/suite/galera/r/galera_unicode_pk.result
index 0e8965a76e3..bb36fd4f369 100644
--- a/mysql-test/suite/galera/r/galera_unicode_pk.result
+++ b/mysql-test/suite/galera/r/galera_unicode_pk.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255) PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -18,7 +20,7 @@ connection node_1;
COMMIT;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT f1 = 'текÑÑ‚2' FROM t1;
f1 = 'текÑÑ‚2'
1
@@ -35,6 +37,6 @@ connection node_2;
COMMIT;
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
COMMIT;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_update_limit.result b/mysql-test/suite/galera/r/galera_update_limit.result
index 20a94e6f504..30c89a38dff 100644
--- a/mysql-test/suite/galera/r/galera_update_limit.result
+++ b/mysql-test/suite/galera/r/galera_update_limit.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
diff --git a/mysql-test/suite/galera/r/galera_v1_row_events.result b/mysql-test/suite/galera/r/galera_v1_row_events.result
index b0ea2293119..80fe2fb6d8d 100644
--- a/mysql-test/suite/galera/r/galera_v1_row_events.result
+++ b/mysql-test/suite/galera/r/galera_v1_row_events.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_OSU_method.result b/mysql-test/suite/galera/r/galera_var_OSU_method.result
index 18e8bd2271a..2b0a713e86b 100644
--- a/mysql-test/suite/galera/r/galera_var_OSU_method.result
+++ b/mysql-test/suite/galera/r/galera_var_OSU_method.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
SET SESSION wsrep_OSU_method = "RSU";
diff --git a/mysql-test/suite/galera/r/galera_var_OSU_method2.result b/mysql-test/suite/galera/r/galera_var_OSU_method2.result
index 0e3751645a8..ca4f617d903 100644
--- a/mysql-test/suite/galera/r/galera_var_OSU_method2.result
+++ b/mysql-test/suite/galera/r/galera_var_OSU_method2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
SET SESSION wsrep_OSU_method = "TOI";
diff --git a/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result b/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
index ba117b4c2d5..86c30fa4b23 100644
--- a/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
+++ b/mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL wsrep_auto_increment_control = OFF;
SET GLOBAL auto_increment_increment = 1;
@@ -59,7 +61,7 @@ connection node_1a;
COMMIT;
connection node_2a;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_1a;
SELECT * FROM t1;
f1 node
diff --git a/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result b/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
index b71cf4c831d..48c649b66a8 100644
--- a/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
+++ b/mysql-test/suite/galera/r/galera_var_auto_inc_control_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, node VARCHAR(10)) ENGINE=InnoDB;
SELECT @@auto_increment_increment = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size');
diff --git a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result
index ca3844bf6bf..f5472aa931f 100644
--- a/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result
+++ b/mysql-test/suite/galera/r/galera_var_certify_nonPK_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_certify_nonPK = OFF;
connection node_2;
SET GLOBAL wsrep_certify_nonPK = OFF;
diff --git a/mysql-test/suite/galera/r/galera_var_cluster_address.result b/mysql-test/suite/galera/r/galera_var_cluster_address.result
index 378d8ca84f5..8c1070e43ce 100644
--- a/mysql-test/suite/galera/r/galera_var_cluster_address.result
+++ b/mysql-test/suite/galera/r/galera_var_cluster_address.result
@@ -1,7 +1,11 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_2;
SET GLOBAL wsrep_cluster_address = 'foo://';
+SHOW STATUS;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET SESSION wsrep_sync_wait=0;
SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
COUNT(*) > 0
@@ -11,7 +15,7 @@ Variable_name Value
wsrep_ready OFF
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
-wsrep_cluster_status non-Primary
+wsrep_cluster_status Disconnected
SHOW STATUS LIKE 'wsrep_local_state';
Variable_name Value
wsrep_local_state 0
@@ -39,7 +43,7 @@ CALL mtr.add_suppression("Failed to initialize backend using 'foo");
CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
CALL mtr.add_suppression("gcs connect failed: Socket type not supported");
CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
-CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)");
+CALL mtr.add_suppression("gcs_caused\\(\\) returned -[0-9]+ \\(Software caused connection abort\\)");
CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110");
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result
index 26798e51926..6a2e501eee2 100644
--- a/mysql-test/suite/galera/r/galera_var_desync_on.result
+++ b/mysql-test/suite/galera/r/galera_var_desync_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
index 049aa5be3cc..33536d95186 100644
--- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result
+++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result
@@ -1,6 +1,6 @@
-connection node_1;
connection node_2;
connection node_1;
+connection node_1;
connection node_2;
connection node_2;
CREATE TABLE t1(i INT) ENGINE=INNODB;
@@ -16,7 +16,7 @@ Variable_name Value
wsrep_ready OFF
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
-wsrep_cluster_status non-Primary
+wsrep_cluster_status Disconnected
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
SELECT 1 FROM t1;
@@ -52,4 +52,3 @@ i
DROP TABLE t1;
disconnect node_2;
disconnect node_1;
-# End of test
diff --git a/mysql-test/suite/galera/r/galera_var_fkchecks.result b/mysql-test/suite/galera/r/galera_var_fkchecks.result
index 8b1b913a584..42f8085ee1a 100644
--- a/mysql-test/suite/galera/r/galera_var_fkchecks.result
+++ b/mysql-test/suite/galera/r/galera_var_fkchecks.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE parent (
id INT PRIMARY KEY,
KEY (id)
diff --git a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
index 1a8733e2e1a..d2faf5ff463 100644
--- a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
+++ b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
list of GTID variables :
diff --git a/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result
new file mode 100644
index 00000000000..48c845a4c2b
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result
@@ -0,0 +1,186 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 1;
+connection node_1;
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+DROP TABLE t1;
+SET GLOBAL wsrep_on = OFF;
+CREATE SCHEMA s1;
+SET GLOBAL wsrep_on = ON;
+DROP SCHEMA s1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+DROP INDEX idx1 ON t1;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+ALTER TABLE t1 DROP INDEX idx1;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+SET GLOBAL wsrep_on = ON;
+ALTER TABLE t1 DROP COLUMN f2;
+DROP TABLE t1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+DELETE FROM t1 WHERE f1 = 1;
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+connection node_1;
+DELETE FROM t1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+DELETE FROM t1 WHERE f1 = 4;
+DELETE FROM t1 WHERE f1 = 5;
+COMMIT;
+SET AUTOCOMMIT=ON;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM t2 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+connection node_1;
+DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1,t2;
+connection node_1;
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+INSERT INTO parent VALUES (1),(2),(3);
+CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE) ENGINE=INNODB;
+INSERT INTO child VALUES (1,1),(2,2),(3,3);
+connection node_2;
+SET SESSION wsrep_on = OFF;
+DELETE FROM child WHERE parent_id = 2;
+SET SESSION wsrep_on = ON;
+connection node_1;
+DELETE FROM parent;
+SELECT COUNT(*) = 0 FROM parent;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM child;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE = 'Primary'
+1
+SELECT COUNT(*) = 0 FROM parent;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM child;
+COUNT(*) = 0
+1
+DROP TABLE child, parent;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 4;
+connection node_2;
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 INTEGER);
+DROP TABLE t1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+CALL mtr.add_suppression("Can't find record in 't.*'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query.");
diff --git a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result
index 4db4e539c50..f5ec473fea4 100644
--- a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result
+++ b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_var_load_data_splitting.result b/mysql-test/suite/galera/r/galera_var_load_data_splitting.result
index 3e451abbed1..7c5fd44356e 100644
--- a/mysql-test/suite/galera/r/galera_var_load_data_splitting.result
+++ b/mysql-test/suite/galera/r/galera_var_load_data_splitting.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL wsrep_load_data_splitting = TRUE;
diff --git a/mysql-test/suite/galera/r/galera_var_log_bin.result b/mysql-test/suite/galera/r/galera_var_log_bin.result
index b0ea2293119..80fe2fb6d8d 100644
--- a/mysql-test/suite/galera/r/galera_var_log_bin.result
+++ b/mysql-test/suite/galera/r/galera_var_log_bin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
index 6bf67a3fb60..16e868f0485 100644
--- a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
+++ b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_size.result b/mysql-test/suite/galera/r/galera_var_max_ws_size.result
index 53bac04fa86..89c9698eed4 100644
--- a/mysql-test/suite/galera/r/galera_var_max_ws_size.result
+++ b/mysql-test/suite/galera/r/galera_var_max_ws_size.result
@@ -1,8 +1,10 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine=InnoDB;
SET GLOBAL wsrep_max_ws_size = 1024;
INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
-ERROR HY000: Got error 90 "Message too long" during COMMIT
+ERROR HY000: Got error 5 "Input/output error" during COMMIT
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
diff --git a/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result b/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result
index 202633a020e..d7a38d24722 100644
--- a/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result
+++ b/mysql-test/suite/galera/r/galera_var_mysql_replication_bundle.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
SET GLOBAL wsrep_mysql_replication_bundle = 2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_var_node_address.result b/mysql-test/suite/galera/r/galera_var_node_address.result
index 7696d1e3f4f..cf45861c8ad 100644
--- a/mysql-test/suite/galera/r/galera_var_node_address.result
+++ b/mysql-test/suite/galera/r/galera_var_node_address.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored.");
call mtr.add_suppression("WSREP: Sending JOIN failed: -[0-9]+ (Transport endpoint is not connected). Will retry in new primary component.");
diff --git a/mysql-test/suite/galera/r/galera_var_reject_queries.result b/mysql-test/suite/galera/r/galera_var_reject_queries.result
index 98380238fcb..b95e5773830 100644
--- a/mysql-test/suite/galera/r/galera_var_reject_queries.result
+++ b/mysql-test/suite/galera/r/galera_var_reject_queries.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
@@ -7,7 +9,6 @@ SET GLOBAL wsrep_reject_queries = ALL;
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
SET GLOBAL wsrep_reject_queries = ALL_KILL;
-ERROR HY000: Lost connection to MySQL server during query
connection node_1a;
SELECT * FROM t1;
Got one of the listed errors
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
index 382466b1387..8968f89d11b 100644
--- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
+++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SET GLOBAL wsrep_replicate_myisam = FALSE;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=MyISAM;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
index 87f8862df7e..716af033e7a 100644
--- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
+++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_1;
SET GLOBAL wsrep_replicate_myisam = TRUE;
diff --git a/mysql-test/suite/galera/r/galera_var_retry_autocommit.result b/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
index c0bf6035184..b8943464cb7 100644
--- a/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
+++ b/mysql-test/suite/galera/r/galera_var_retry_autocommit.result
@@ -1,15 +1,17 @@
+connection node_2;
+connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 0;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
INSERT INTO t1 (f1) VALUES (2);
connection node_1a;
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
@@ -18,10 +20,10 @@ DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
-INSERT INTO t1 (f1) VALUES (2);
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
+INSERT INTO t1 (f1) VALUES (3);
connection node_1a;
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1;
@@ -34,10 +36,10 @@ connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 2';
-INSERT INTO t1 VALUES (2);;
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 2';
+INSERT INTO t1 VALUES (4);;
connection node_1a;
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
@@ -45,7 +47,7 @@ SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
-SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
connection node_2;
TRUNCATE TABLE t1;
connection node_1a;
@@ -53,7 +55,7 @@ SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
connection node_1;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
DROP TABLE t1;
@@ -61,8 +63,8 @@ connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 64;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 64';
-INSERT INTO t1 VALUES (2);
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
+INSERT INTO t1 VALUES (5);
connection node_1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result
index c28cc091ae9..168b45154b8 100644
--- a/mysql-test/suite/galera/r/galera_var_slave_threads.result
+++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result
@@ -1,3 +1,7 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB;
@@ -13,6 +17,9 @@ SELECT @@wsrep_slave_threads = 1;
@@wsrep_slave_threads = 1
1
SET GLOBAL wsrep_slave_threads = 1;
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
+COUNT(*)
+3
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
COUNT(*)
1
@@ -20,8 +27,11 @@ SET GLOBAL wsrep_slave_threads = 64;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 1;
connection node_1;
@@ -32,26 +42,42 @@ COUNT(*)
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
COUNT(*)
1
+SET GLOBAL wsrep_slave_threads = 5;
SET GLOBAL wsrep_slave_threads = 1;
-DROP TABLE t1;
-DROP TABLE t2;
-#
-# lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
-#
+connection node_2;
+Shutting down server ...
+connection node_1;
+show status like 'wsrep_cluster_size';
+Variable_name Value
+wsrep_cluster_size 1
+SET GLOBAL wsrep_slave_threads = 6;
+SET GLOBAL wsrep_slave_threads = 1;
+SET GLOBAL wsrep_cluster_address='';
+SET GLOBAL wsrep_cluster_address='gcomm://';
+SET GLOBAL wsrep_slave_threads = 10;
+connection node_2;
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
+COUNT(*)
+3
connection node_1;
-CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
+SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
-SET GLOBAL wsrep_slave_threads = 4;
SET GLOBAL wsrep_slave_threads = 1;
connection node_1;
-INSERT INTO t1 VALUES (DEFAULT);
-INSERT INTO t1 VALUES (DEFAULT);
-INSERT INTO t1 VALUES (DEFAULT);
-DROP TABLE t1;
connection node_2;
-SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
-NAME
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+192
+connection node_1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+192
+DROP TABLE t1;
+DROP TABLE t2;
# End of tests
diff --git a/mysql-test/suite/galera/r/galera_var_sst_auth.result b/mysql-test/suite/galera/r/galera_var_sst_auth.result
index 1db83197870..6a5683e2633 100644
--- a/mysql-test/suite/galera/r/galera_var_sst_auth.result
+++ b/mysql-test/suite/galera/r/galera_var_sst_auth.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
#
diff --git a/mysql-test/suite/galera/r/galera_var_sync_wait.result b/mysql-test/suite/galera/r/galera_var_sync_wait.result
index 3dfe902767c..80fbd3f3e05 100644
--- a/mysql-test/suite/galera/r/galera_var_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_var_sync_wait.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-10161: wsrep_sync_wait not enabled when set to 1 in config file
#
diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result b/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result
index 36340f505ff..5323bc9bf60 100644
--- a/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result
+++ b/mysql-test/suite/galera/r/galera_var_wsrep_on_off.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_on = FALSE;
diff --git a/mysql-test/suite/galera/r/galera_wan.result b/mysql-test/suite/galera/r/galera_wan.result
index 41b915fa5bf..bc4113ffb1c 100644
--- a/mysql-test/suite/galera/r/galera_wan.result
+++ b/mysql-test/suite/galera/r/galera_wan.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*");
CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*");
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
diff --git a/mysql-test/suite/galera/r/galera_wan_restart_ist.result b/mysql-test/suite/galera/r/galera_wan_restart_ist.result
index 8a2a7d0818e..7b87d534d92 100644
--- a/mysql-test/suite/galera/r/galera_wan_restart_ist.result
+++ b/mysql-test/suite/galera/r/galera_wan_restart_ist.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_wan_restart_sst.result b/mysql-test/suite/galera/r/galera_wan_restart_sst.result
index 71786cdd023..1296744a9c1 100644
--- a/mysql-test/suite/galera/r/galera_wan_restart_sst.result
+++ b/mysql-test/suite/galera/r/galera_wan_restart_sst.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
diff --git a/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result b/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result
index 99c680c7b12..e01825fd944 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_desync_wsrep_on.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result b/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
index fa49d8c57c2..59883f1ca7e 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (
f1 VARCHAR(255) PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -20,6 +22,6 @@ connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
connection node_2;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
include/assert_grep.inc [cluster conflict due to high priority abort for threads]
DROP TABLE t1;
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 ca388496794..8edf1a02e9d 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
index f19dc40205b..0f7cd134156 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'");
call mtr.add_suppression("WSREP\: Set options returned 7");
SET GLOBAL wsrep_provider_options="gmcasts.segment=1";
diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
index d56d9340474..7a645407004 100644
--- a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
+++ b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_zero_length_column.result b/mysql-test/suite/galera/r/galera_zero_length_column.result
index 572d94d6756..fa29264704f 100644
--- a/mysql-test/suite/galera/r/galera_zero_length_column.result
+++ b/mysql-test/suite/galera/r/galera_zero_length_column.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY , f2 VARCHAR(0)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 VARCHAR(0)) ENGINE=InnoDB;
diff --git a/mysql-test/suite/galera/r/grant.result b/mysql-test/suite/galera/r/grant.result
index a2ca72ee8ec..56f56d3b023 100644
--- a/mysql-test/suite/galera/r/grant.result
+++ b/mysql-test/suite/galera/r/grant.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV#6266: Changing password fails on galera cluster
#
@@ -13,7 +15,7 @@ SET PASSWORD FOR 'user_6266'@'localhost' = PASSWORD('newpass');
# On node_2
connection node_2;
SELECT user FROM mysql.user WHERE user='user_6266';
-user
+User
user_6266
DROP USER 'user_6266'@'localhost';
disconnect node_2;
diff --git a/mysql-test/suite/galera/r/lp1276424.result b/mysql-test/suite/galera/r/lp1276424.result
index 363758e0d66..be27ee5374f 100644
--- a/mysql-test/suite/galera/r/lp1276424.result
+++ b/mysql-test/suite/galera/r/lp1276424.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INT DEFAULT NULL, UNIQUE KEY i1 (f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (NULL);
diff --git a/mysql-test/suite/galera/r/lp1347768.result b/mysql-test/suite/galera/r/lp1347768.result
index 7beb167d538..49c8894c081 100644
--- a/mysql-test/suite/galera/r/lp1347768.result
+++ b/mysql-test/suite/galera/r/lp1347768.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE `r8kmb_redirect_links` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`old_url` varchar(255) DEFAULT NULL,
diff --git a/mysql-test/suite/galera/r/lp1376747-2.result b/mysql-test/suite/galera/r/lp1376747-2.result
index b85e130f4f4..5e5b5be6c86 100644
--- a/mysql-test/suite/galera/r/lp1376747-2.result
+++ b/mysql-test/suite/galera/r/lp1376747-2.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/lp1376747-3.result b/mysql-test/suite/galera/r/lp1376747-3.result
index a2c55b5f1f6..62893b85bcf 100644
--- a/mysql-test/suite/galera/r/lp1376747-3.result
+++ b/mysql-test/suite/galera/r/lp1376747-3.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/lp1376747-4.result b/mysql-test/suite/galera/r/lp1376747-4.result
index f1d32aa8f69..d6884cc3746 100644
--- a/mysql-test/suite/galera/r/lp1376747-4.result
+++ b/mysql-test/suite/galera/r/lp1376747-4.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/suite/galera/r/lp1376747.result b/mysql-test/suite/galera/r/lp1376747.result
index 16d4fa3fc52..1b9dd545409 100644
--- a/mysql-test/suite/galera/r/lp1376747.result
+++ b/mysql-test/suite/galera/r/lp1376747.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
diff --git a/mysql-test/suite/galera/r/lp1438990.result b/mysql-test/suite/galera/r/lp1438990.result
index d48d2435faa..a324121d7da 100644
--- a/mysql-test/suite/galera/r/lp1438990.result
+++ b/mysql-test/suite/galera/r/lp1438990.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
diff --git a/mysql-test/suite/galera/r/lp959512.result b/mysql-test/suite/galera/r/lp959512.result
index 55adfa360b0..589030002db 100644
--- a/mysql-test/suite/galera/r/lp959512.result
+++ b/mysql-test/suite/galera/r/lp959512.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
DROP TABLE IF EXISTS variable;
Warnings:
Note 1051 Unknown table 'test.variable'
diff --git a/mysql-test/suite/galera/r/mdev_10518.result b/mysql-test/suite/galera/r/mdev_10518.result
index 4ccd5fd1d23..252aa244f77 100644
--- a/mysql-test/suite/galera/r/mdev_10518.result
+++ b/mysql-test/suite/galera/r/mdev_10518.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
list of GTID variables :
diff --git a/mysql-test/suite/galera/r/mdev_9290.result b/mysql-test/suite/galera/r/mdev_9290.result
index 276ab9e8ecb..d8fc35b02f4 100644
--- a/mysql-test/suite/galera/r/mdev_9290.result
+++ b/mysql-test/suite/galera/r/mdev_9290.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
# InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#110.result b/mysql-test/suite/galera/r/mysql-wsrep#110.result
index 6d4031d71cd..344185f4f4e 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#110.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#110.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#198.result b/mysql-test/suite/galera/r/mysql-wsrep#198.result
index 33f36d407db..5b569ffae27 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#198.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#198.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result
index fe5725cab27..e55c38ea7cc 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#201.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#216.result b/mysql-test/suite/galera/r/mysql-wsrep#216.result
new file mode 100644
index 00000000000..b07589d0c04
--- /dev/null
+++ b/mysql-test/suite/galera/r/mysql-wsrep#216.result
@@ -0,0 +1,11 @@
+SET GLOBAL wsrep_debug = ON;
+CREATE USER u1 IDENTIFIED BY 'plaintext_password';
+CREATE USER u1 IDENTIFIED BY 'plaintext_password';
+ERROR HY000: Operation CREATE USER failed for 'u1'@'%'
+0
+0
+2
+1
+DROP USER u1;
+CALL mtr.add_suppression('Operation CREATE USER failed');
+ \ No newline at end of file
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#237.result b/mysql-test/suite/galera/r/mysql-wsrep#237.result
index 19503dd5781..bc348613d25 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#237.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#237.result
@@ -1,6 +1,8 @@
+connection node_2;
+connection node_1;
CREATE TABLE t (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
-SET DEBUG_SYNC = 'wsrep_before_replication WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue';
INSERT INTO t values (1);;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#247.result b/mysql-test/suite/galera/r/mysql-wsrep#247.result
index e59c6d1a299..704f0ba923c 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#247.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#247.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
SET GLOBAL wsrep_desync=1;
SET wsrep_OSU_method=RSU;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#31.result b/mysql-test/suite/galera/r/mysql-wsrep#31.result
index 1092f4ddb0c..d1d2861ec3a 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#31.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#31.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#33.result b/mysql-test/suite/galera/r/mysql-wsrep#33.result
index 6a5251204b9..5589faad8b1 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#33.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#33.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
Setting SST method to mysqldump ...
@@ -56,6 +58,9 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
connection node_2;
Loading wsrep provider ...
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_after');
@@ -114,5 +119,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
connection node_2;
Restarting server ...
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#332.result b/mysql-test/suite/galera/r/mysql-wsrep#332.result
index 8667f5e9c41..565979a93ae 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#332.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#332.result
@@ -1,26 +1,38 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER) ENGINE=INNODB;
INSERT INTO p VALUES (1, 0);
INSERT INTO p VALUES (2, 0);
INSERT INTO c VALUES (1, 1);
INSERT INTO c VALUES (2, 2);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p SET f1 = f1 + 100;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1);
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
SELECT * FROM p;
f1 f2
1 0
@@ -31,6 +43,7 @@ f1 p_id
2 2
DROP TABLE c;
DROP TABLE p;
+connection node_1;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB;
@@ -38,23 +51,31 @@ INSERT INTO p1 VALUES (1, 0), (2, 0);
INSERT INTO p2 VALUES (1, 0), (2, 0);
INSERT INTO c VALUES (1, 1, 1);
INSERT INTO c VALUES (2, 2, 2);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p1 SET f1 = f1 + 100;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1);
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
SELECT * FROM p1;
f1 f2
1 0
@@ -70,6 +91,7 @@ f1 p_id1 p_id2
DROP TABLE c;
DROP TABLE p1;
DROP TABLE p2;
+connection node_1;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB;
@@ -77,23 +99,31 @@ INSERT INTO p1 VALUES (1, 0), (2, 0);
INSERT INTO p2 VALUES (1, 0), (2, 0);
INSERT INTO c VALUES (1, 1, 1);
INSERT INTO c VALUES (2, 2, 2);
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE p2 SET f1 = f1 + 100;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1);
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
-SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
COMMIT;
+connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
-SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2;
SELECT * FROM p1;
f1 f2
1 0
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#90.result b/mysql-test/suite/galera/r/mysql-wsrep#90.result
index 0b8f55e6219..b0fa06ffaf8 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#90.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#90.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
connection node_1;
SET GLOBAL wsrep_OSU_method = "RSU";
diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result
index 3835de514aa..e34028ab04f 100644
--- a/mysql-test/suite/galera/r/partition.result
+++ b/mysql-test/suite/galera/r/partition.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV#4953 Galera: DELETE from a partitioned table is not replicated
#
@@ -119,11 +121,11 @@ SET GLOBAL wsrep_load_data_splitting = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
-SELECT COUNT(*) = 20002 FROM t1;
-COUNT(*) = 20002
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+20002
wsrep_last_committed_diff
-1
+AS_EXPECTED_3_or_5
DROP TABLE t1;
# Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries.
connection node_1;
@@ -131,9 +133,9 @@ SET GLOBAL wsrep_load_data_splitting = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
-SELECT COUNT(*) = 101 FROM t1;
-COUNT(*) = 101
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+101
wsrep_last_committed_diff
1
DROP TABLE t1;
@@ -144,11 +146,11 @@ SET GLOBAL wsrep_load_data_splitting = OFF;
CREATE TABLE t1 (pk INT PRIMARY KEY)
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
connection node_2;
-SELECT COUNT(*) = 20002 FROM t1;
-COUNT(*) = 20002
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+20002
wsrep_last_committed_diff
-1
+AS_EXPECTED_1_or_2
DROP TABLE t1;
connection node_1;
SET GLOBAL wsrep_load_data_splitting = 1;;
diff --git a/mysql-test/suite/galera/r/pxc-421.result b/mysql-test/suite/galera/r/pxc-421.result
index a317b3e40e1..058af15c098 100644
--- a/mysql-test/suite/galera/r/pxc-421.result
+++ b/mysql-test/suite/galera/r/pxc-421.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_1;
diff --git a/mysql-test/suite/galera/r/query_cache.result b/mysql-test/suite/galera/r/query_cache.result
index 8592a68141c..5dabd38a982 100644
--- a/mysql-test/suite/galera/r/query_cache.result
+++ b/mysql-test/suite/galera/r/query_cache.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# Execute FLUSH/RESET commands.
# On node-1
diff --git a/mysql-test/suite/galera/r/rename.result b/mysql-test/suite/galera/r/rename.result
index a7ec431657b..3ad715fa38c 100644
--- a/mysql-test/suite/galera/r/rename.result
+++ b/mysql-test/suite/galera/r/rename.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-8598 : Failed MySQL DDL commands and Galera replication
#
diff --git a/mysql-test/suite/galera/r/rpl_row_annotate.result b/mysql-test/suite/galera/r/rpl_row_annotate.result
index 23de06f015b..61fa2bc286c 100644
--- a/mysql-test/suite/galera/r/rpl_row_annotate.result
+++ b/mysql-test/suite/galera/r/rpl_row_annotate.result
@@ -1,9 +1,15 @@
+connection node_2;
+connection node_1;
# On node_2
connection node_2;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
# On node_1
connection node_1;
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
CREATE TABLE t1(i INT)ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
DELETE FROM t1 WHERE i = 1;
@@ -68,6 +74,4 @@ mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1)
mysqld-bin.000001 # Delete_rows_v1 2 # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid 2 # COMMIT /* xid= */
DROP TABLE t1;
-disconnect node_2;
-disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/sql_log_bin.result b/mysql-test/suite/galera/r/sql_log_bin.result
index c175a0a0e7a..6efd70ca8b8 100644
--- a/mysql-test/suite/galera/r/sql_log_bin.result
+++ b/mysql-test/suite/galera/r/sql_log_bin.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
# On node_1
connection node_1;
diff --git a/mysql-test/suite/galera/r/unique_key.result b/mysql-test/suite/galera/r/unique_key.result
index 9f1fc858389..bb7e22014d9 100644
--- a/mysql-test/suite/galera/r/unique_key.result
+++ b/mysql-test/suite/galera/r/unique_key.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV#5552 Deadlock when inserting NULL column value in column with
# UNIQUE index
diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result
index f15916e51a5..232cca202c0 100644
--- a/mysql-test/suite/galera/r/versioning_trx_id.result
+++ b/mysql-test/suite/galera/r/versioning_trx_id.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning;
diff --git a/mysql-test/suite/galera/r/view.result b/mysql-test/suite/galera/r/view.result
index f8da811f9cc..45d5b422f3f 100644
--- a/mysql-test/suite/galera/r/view.result
+++ b/mysql-test/suite/galera/r/view.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
#
# MDEV-7222: Cluster Node Crash at CREATE DEFINER statement
#
diff --git a/mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result b/mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result
new file mode 100644
index 00000000000..4139ecd6472
--- /dev/null
+++ b/mysql-test/suite/galera/r/wsrep_trx_fragment_size_sr.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+SELECT variable_value FROM information_schema.session_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+variable_value
+0
+SET SESSION wsrep_trx_fragment_size = 0;
+SET SESSION wsrep_trx_fragment_size = 123;
+SELECT variable_value FROM information_schema.global_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+variable_value
+0
+SET GLOBAL wsrep_trx_fragment_size = 0;
+SET GLOBAL wsrep_trx_fragment_size = 123;
+SET GLOBAL wsrep_trx_fragment_size = default;
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index 233aa020a94..a9fd1568f9c 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -9,9 +9,9 @@ return "Not run for embedded server" if $::opt_embedded_server;
return "WSREP is not compiled in" unless defined $::mysqld_variables{'wsrep-on'};
my ($provider) = grep { -f $_ } $ENV{WSREP_PROVIDER},
- "/usr/lib64/galera-3/libgalera_smm.so",
+ "/usr/lib64/galera-4/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so",
- "/usr/lib/galera-3/libgalera_smm.so",
+ "/usr/lib/galera-4/libgalera_smm.so",
"/usr/lib/galera/libgalera_smm.so";
return "No wsrep provider library" unless -f $provider;
@@ -81,6 +81,8 @@ push @::global_suppressions,
qr|WSREP: .*core_handle_uuid_msg.*|,
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
+ qr|Query apply failed:*|,
+ qr(WSREP: Ignoring error*),
qr(WSREP: Failed to remove page file .*),
qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*),
);
@@ -98,10 +100,8 @@ if (which(socat)) {
sub skip_combinations {
my %skip = ();
- $skip{'include/have_xtrabackup.inc'} = 'Need innobackupex'
- unless which(innobackupex);
- $skip{'include/have_xtrabackup.inc'} = 'Need socat or nc'
- unless $ENV{MTR_GALERA_TFMT};
+ $skip{'include/have_filekeymanagement.inc'} = 'needs file_key_management plugin'
+ unless $ENV{FILE_KEY_MANAGEMENT_SO};
$skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
unless which(mariabackup);
$skip{'include/have_mariabackup.inc'} = 'Need ss'
diff --git a/mysql-test/suite/galera/t/GAL-419.test b/mysql-test/suite/galera/t/GAL-419.test
index e50b948bf35..07abcbcc47b 100644
--- a/mysql-test/suite/galera/t/GAL-419.test
+++ b/mysql-test/suite/galera/t/GAL-419.test
@@ -5,11 +5,11 @@
--source include/galera_cluster.inc
--source include/big_test.inc
---connection node_2
+--connection node_1
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
---connection node_1
+--connection node_2
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
diff --git a/mysql-test/suite/galera/t/GCF-1081.test b/mysql-test/suite/galera/t/GCF-1081.test
new file mode 100644
index 00000000000..8296c55f1b6
--- /dev/null
+++ b/mysql-test/suite/galera/t/GCF-1081.test
@@ -0,0 +1,72 @@
+#
+# GCF-1081 - Assertion `!thd->sp_runtime_ctx`
+#
+# Test replaying of stored procedures
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0), (3, 0);
+
+DELIMITER |;
+CREATE PROCEDURE proc_update ()
+BEGIN
+ UPDATE t1 SET f2 = 1 where f1 > 0;
+END|
+DELIMITER ;|
+
+# Block the SP
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+--send CALL proc_update ();
+
+# Wait until SP is blocked
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--source include/galera_wait_sync_point.inc
+
+# Issue a conflicting insert on node #2
+--connection node_1a
+SET GLOBAL DEBUG = 'd,sync.wsrep_before_BF_victim_unlock';
+
+--connection node_2
+--send INSERT INTO t1 VALUES (2, 2);
+
+# Wait until it BF aborts the SP
+--connection node_1a
+SET SESSION DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached';
+SET GLOBAL DEBUG = '';
+
+# Unblock the SP
+--connection node_1a
+--source include/galera_clear_sync_point.inc
+--source include/galera_signal_sync_point.inc
+
+--connection node_2
+--reap
+SELECT * FROM t1;
+
+# SP succeeds
+--connection node_1
+--reap
+SELECT * FROM t1;
+
+# wsrep_local_replays has increased by 1
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old AS wsrep_local_replays;
+--enable_query_log
+
+DROP PROCEDURE proc_update;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/GCF-939.test b/mysql-test/suite/galera/t/GCF-939.test
new file mode 100644
index 00000000000..637d656996e
--- /dev/null
+++ b/mysql-test/suite/galera/t/GCF-939.test
@@ -0,0 +1,31 @@
+#
+# GCF-939 Avoid creation of GRA log files when applier is successfull
+#
+
+--source include/galera_cluster.inc
+
+--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
+
+--connection node_1
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+# Expect only one GRA_*.log file
+# TODO replace_regex is somehow broken, it will filter out
+# result totally if replacement string is already in result
+# fixed this temporarily by calling list_files twice
+# to get GRA_.log two times, this works for some reason
+#
+--replace_regex /GRA_.+\.log/GRA_.log/
+--list_files $MYSQLTEST_VARDIR/mysqld.2/data GRA_*.log
+--replace_regex /GRA_.+\.log/GRA_.log/
+--list_files $MYSQLTEST_VARDIR/mysqld.2/data GRA_*.log
+
+DROP TABLE t1;
+CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query");
+--connection node_2
+CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query");
+
diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test
index 5e17baa1bdb..b52db4c68b0 100644
--- a/mysql-test/suite/galera/t/MW-284.test
+++ b/mysql-test/suite/galera/t/MW-284.test
@@ -63,7 +63,9 @@ CALL mtr.add_suppression('failed registering on master');
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
--connection node_1
+set global wsrep_on=OFF;
RESET MASTER;
+set global wsrep_on=ON;
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
--connection node_2
diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test
index 426b4493bb7..9c849861001 100644
--- a/mysql-test/suite/galera/t/MW-286.test
+++ b/mysql-test/suite/galera/t/MW-286.test
@@ -4,31 +4,55 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/big_test.inc
-
+--source include/have_debug_sync.inc
+
--connection node_1
-CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
-INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
-
# Insert some values before the ALTER
-INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
-
-# Insert more values while the ALTER is running
---send INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+INSERT INTO t1 (f1) VALUES (1), (2), (3);
+#
+# run ALTER with no wsrep replication
+#
--connection node_2
SET GLOBAL wsrep_desync = TRUE;
SET wsrep_on = FALSE;
---error 0,ER_QUERY_INTERRUPTED
-ALTER TABLE t1 ADD PRIMARY KEY (f1);
+#
+# stop ALTER processing after it has acquired exclusive MDL lock
+#
+SET SESSION debug_sync = "alter_table_inplace_after_lock_upgrade SIGNAL mdl_locked WAIT_FOR mdl_continue";
+
+--send ALTER TABLE t1 ADD PRIMARY KEY (f1);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION debug_sync = "now WAIT_FOR mdl_locked";
+
+#
+# replicate conflicting insert from node_1
+#
+--connection node_1
+INSERT INTO t1(f1) VALUES (11);
+
+#
+# let parked ALTER processing to continue after the conflict
+#
+--connection node_2a
+SET debug_sync = "now SIGNAL mdl_continue";
+SET debug_sync='RESET';
+
+#
+# ALTER should have been aborted with query interupted error code
+#
+--connection node_2
+--error ER_QUERY_INTERRUPTED
+--reap
SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;
--connection node_1
-reap;
+
DROP TABLE t1;
-DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/MW-292.test b/mysql-test/suite/galera/t/MW-292.test
index ecb1273759e..9580d53d85c 100644
--- a/mysql-test/suite/galera/t/MW-292.test
+++ b/mysql-test/suite/galera/t/MW-292.test
@@ -9,7 +9,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
@@ -25,37 +25,51 @@ START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
-# Block the commit
+# Block the applier on node #1 and issue a conflicting update on node #2
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---let $galera_sync_point = commit_monitor_enter_sync
+SET SESSION wsrep_sync_wait=0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc
---connection node_1
---send COMMIT;
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
-# Wait until commit is blocked
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
-# Issue a conflicting update on node #2
---connection node_2
-UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+# Block the commit, send the COMMIT and wait until it gets blocked
-# Wait for both transactions to be blocked
---connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
---source include/wait_condition.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
---source include/wait_condition.inc
+--connection node_1
+--send COMMIT
-# Unblock the commit
--connection node_1a
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
+
+# Let the conflicting UPDATE proceed and wait until it hits abort_trx_end.
+# The victim transaction still sits in commit_monitor_master_sync_point.
+
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# Let the transactions proceed
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
-# Commit succeeds via replay
+# Commit succeeds
--connection node_1
--reap
diff --git a/mysql-test/suite/galera/t/MW-328A.test b/mysql-test/suite/galera/t/MW-328A.test
index 09aad1bcf60..097d4ac4ff6 100644
--- a/mysql-test/suite/galera/t/MW-328A.test
+++ b/mysql-test/suite/galera/t/MW-328A.test
@@ -3,8 +3,13 @@
#
#
-# Attempt to insert into t2 and check if insert actually inserted rows if
-# a success was reported.
+# test phase 1 is not deterministic
+#
+# Here we attempt to insert into t2 and check if insert actually
+# inserted rows if a success was reported.
+#
+# However, deadlocks may or may not happen in this test execution
+# it all depends on timing.
#
--source include/big_test.inc
@@ -25,7 +30,7 @@ while ($count)
{
TRUNCATE TABLE t2;
- --error 0,1213
+ --error 0,ER_LOCK_DEADLOCK
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
if ($mysql_errno != 1213) {
--inc $successes
@@ -44,14 +49,31 @@ while ($count)
--enable_query_log
+
+--source suite/galera/t/MW-328-footer.inc
+
#
-# Check that the test produced both deadlocks and successes
+# Test phase 2 is deterministic
+# Here we generate a sure conflict in node 1 and verify that
+# insert failed in both nodes
#
+--connection node_1
+CREATE TABLE t1 (i int primary key, j int) engine=innodb;
+INSERT INTO t1 values (1,0);
---disable_query_log
---eval SELECT $successes > 0 AS have_successes
---eval SELECT $deadlocks > 0 AS have_deadlocks
---enable_query_log
+BEGIN;
+UPDATE t1 SET j=1 WHERE i=1;
+--connection node_2
+UPDATE t1 SET j=2 WHERE i=1;
---source suite/galera/t/MW-328-footer.inc
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SELECT * FROM t1;
+--connection node_2
+SELECT * FROM t1;
+--connection node_1
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test
index 5baa4d14966..78755fc3b42 100644
--- a/mysql-test/suite/galera/t/MW-329.test
+++ b/mysql-test/suite/galera/t/MW-329.test
@@ -11,11 +11,6 @@ CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
# We start with a populated table
INSERT INTO t1 (f1) VALUES (1),(65535);
-# Clear the wsrep_local_replays counter
-
-FLUSH STATUS;
-SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
-
#
# Run concurrent INSERTs
#
@@ -42,8 +37,9 @@ DELIMITER ;|
#
--connection node_2
-CALL mtr.add_suppression("WSREP: Failed to report last committed .*");
---let $count = 200
+--let $count = 10
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
while ($count)
{
--let $signature = `SELECT LEFT(MD5(RAND()), 10)`
@@ -57,14 +53,28 @@ while ($count)
--die ROW_COUNT() = 0
}
}
- --dec $count
+
+ #
+ # Ensure at least one replay happens
+ #
+
+ --let $wsrep_replays = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+ --disable_query_log
+ if (`SELECT $wsrep_replays - $wsrep_local_replays_old > 0`) {
+ --dec $count
+ }
+ --enable_query_log
}
#
# Confirm that some transaction replays occurred
#
-SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old > 0 AS wsrep_local_replays;
+--enable_query_log
+
#
# Terminate the stored procedure
diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test
index 4bdbfb2ecff..67715c24992 100644
--- a/mysql-test/suite/galera/t/MW-336.test
+++ b/mysql-test/suite/galera/t/MW-336.test
@@ -11,9 +11,8 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
-
--let $wait_timeout=600
---let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
+--let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
@@ -31,11 +30,11 @@ while ($count)
--connection node_1
SET GLOBAL wsrep_slave_threads = 10;
---let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
+--let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 20;
---let $wait_condition = SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
+--let $wait_condition = SELECT COUNT(*) = 22 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 1;
@@ -62,7 +61,7 @@ while ($count)
}
--connection node_1
---let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
+--let $wait_condition = SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 1;
diff --git a/mysql-test/suite/galera/t/MW-360-master.opt b/mysql-test/suite/galera/t/MW-360-master.opt
new file mode 100644
index 00000000000..e51c49c3808
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-360-master.opt
@@ -0,0 +1,2 @@
+--gtid-domain-id=1 --log-bin --log-slave-updates
+
diff --git a/mysql-test/suite/galera/t/MW-360.test b/mysql-test/suite/galera/t/MW-360.test
new file mode 100644
index 00000000000..b776631cfff
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-360.test
@@ -0,0 +1,100 @@
+#
+# MW-360 DROP TABLE containing temporary tables results in binlog divergence
+#
+
+--source include/galera_cluster.inc
+--source include/have_binlog_format_row.inc
+
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connection node_1
+
+#
+# Straightforward temporary table
+#
+
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+
+--let $local_uuid = `SELECT LEFT(@@global.gtid_executed, 36)`
+
+#
+# A mix of normal and temporary tables
+#
+
+# Temp table first, normal table second
+
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+
+DROP TABLE t1, t2;
+
+# Normal table first, temporary table second
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+
+DROP TABLE t1, t2;
+
+# Temporary table first, normal table second, temp table third
+
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+
+CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (3);
+
+DROP TABLE t1, t2, t3;
+
+# Normal table first, temporary table second, normal table third
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (2);
+
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t3 VALUES (3);
+
+DROP TABLE t1, t2, t3;
+
+#
+# A temporary table masking a normal one
+#
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (2);
+
+DROP TABLE t1;
+DROP TABLE t1;
+
+--connection node_2
+--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
+
+--connection node_1
+--disable_query_log
+# Node 1 has extra GTID set generated by the temporary table drop
+--eval SELECT GTID_SUBSET('$gtid_executed_node2', @@global.gtid_executed) AS gtid_executed_equal;
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc
index 5fd9ef150ae..71df979d6ba 100644
--- a/mysql-test/suite/galera/t/MW-369.inc
+++ b/mysql-test/suite/galera/t/MW-369.inc
@@ -24,7 +24,6 @@
--connection node_1
SET AUTOCOMMIT=ON;
START TRANSACTION;
-
--eval $mw_369_parent_query
#
@@ -51,7 +50,7 @@ SET SESSION wsrep_sync_wait = 0;
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
---let $galera_sync_point = local_monitor_enter_sync
+--let $galera_sync_point = local_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
@@ -61,7 +60,7 @@ SET SESSION wsrep_sync_wait = 0;
# Wait until both sync points have been reached
#
--connection node_1a
---let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
#
@@ -70,6 +69,6 @@ SET SESSION wsrep_sync_wait = 0;
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc
---let $galera_sync_point = local_monitor_enter_sync
+--let $galera_sync_point = local_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
--source include/galera_clear_sync_point.inc
diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test
index 720d6daf518..c8f8c974019 100644
--- a/mysql-test/suite/galera/t/MW-369.test
+++ b/mysql-test/suite/galera/t/MW-369.test
@@ -24,7 +24,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
@@ -244,3 +244,101 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
+--echo #
+--echo # Start of 10.4 tests
+--echo #
+#
+# Test F Outline:
+# ===============
+#
+# Test two concurrent INSERTs on the child table.
+#
+# The pf table will originally have row (1)
+# The cf table will originally be empty
+#
+# A new row (10, 1) pointing to parent row (1) is inserted from
+# connection node_2. A transaction which tries to INSERT another child
+# row (20, 1), pointing to the same parent, is run from connection node_1.
+#
+# Expected Outcome:
+# =================
+# Both INSERTs should succeed since they don't modify the common parent
+# key.
+#
+# At the end of the test:
+# parent table should have row (1)
+# child table should have rows (10, 1), (20, 1)
+
+--connection node_1
+
+CREATE TABLE pf (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
+CREATE TABLE cf (
+ f1 INTEGER PRIMARY KEY,
+ p_id INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pf (f1)
+);
+
+INSERT INTO pf VALUES (1);
+
+# This is run on node1:
+--let $mw_369_parent_query = INSERT INTO cf (f1, p_id) VALUES (10, 1)
+# This is run on node2:
+--let $mw_369_child_query = INSERT INTO cf (f1, p_id) VALUES (20, 1)
+--source MW-369.inc
+
+--connection node_1
+--reap
+
+--connection node_2
+SELECT * FROM pf;
+SELECT * FROM cf;
+
+DROP TABLE cf;
+DROP TABLE pf;
+
+#
+# Test G Outline:
+# ===============
+#
+# This test is similar to test B where a existing
+# child table row is updated concurrently from another node
+# with a transaction which updates the parent table, except
+# that here the child table row is inserted, not updated.
+#
+# The pg table will originally have rows (1, 0), (2, 0).
+# The cg table will originally be empty
+#
+# Expected outcome:
+# ================
+#
+# Both UPDATE and INSERT should succeed since they are done to separate tables
+# and UPDATE to parent row does not touch the foreign key referenced by the
+# child row INSERT. The parent table shall contain rows (1, 1), (2, 0).
+# The child table shall contain row (1, 1, 0) which points to parent table
+# row (1, 0).
+#
+
+--connection node_1
+CREATE TABLE pg (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE cg (f1 INTEGER PRIMARY KEY, p_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pg (f1)) ;
+
+INSERT INTO pg VALUES (1, 0);
+INSERT INTO pg VALUES (2, 0);
+
+--let mw_369_parent_query = UPDATE pg SET f2 = 1 WHERE f1 = 1
+--let $mw_369_child_query = INSERT INTO cg VALUES (1, 1, 0)
+--source MW-369.inc
+
+# Commit succeeds
+--connection node_1
+--reap
+
+--connection node_2
+SELECT * FROM pg;
+SELECT * FROM cg;
+
+DROP TABLE cg;
+DROP TABLE pg;
+
diff --git a/mysql-test/suite/galera/t/MW-388.test b/mysql-test/suite/galera/t/MW-388.test
index de1ac52bf3e..9cf176434ba 100644
--- a/mysql-test/suite/galera/t/MW-388.test
+++ b/mysql-test/suite/galera/t/MW-388.test
@@ -2,7 +2,6 @@
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
-
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
@@ -41,11 +40,11 @@ SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
--connection node_1
SET SESSION wsrep_sync_wait = 0;
-SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue';
+SET SESSION DEBUG_SYNC = 'wsrep_after_certification SIGNAL wsrep_after_certification_reached WAIT_FOR wsrep_after_certification_continue';
--send CALL insert_proc ();
--connection node_1a
-SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached";
+SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_certification_reached";
SET GLOBAL DEBUG_DBUG = "";
diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test
index 36b691c6295..4b83e25dc50 100644
--- a/mysql-test/suite/galera/t/MW-402.test
+++ b/mysql-test/suite/galera/t/MW-402.test
@@ -1,6 +1,6 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
#
# we must open connection node_1a here, MW-369.inc will use it later
@@ -135,7 +135,6 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
-
#
# CASCADE DELETE tests with two parent tables
# Here we cause cascaded operation on child table through
@@ -151,10 +150,11 @@ DROP TABLE p;
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
-CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
- CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
-
INSERT INTO p1 VALUES (1, 0);
INSERT INTO p2 VALUES (1, 0);
@@ -171,7 +171,51 @@ INSERT INTO c VALUES (1, 1, 1, 0);
--connection node_1
--reap
-# same as previous, but statements in different order
+--connection node_2
+SELECT * FROM p1;
+SELECT * FROM p2;
+SELECT * FROM c;
+
+DROP TABLE c;
+DROP TABLE p1;
+DROP TABLE p2;
+
+#
+# CASCADE DELETE tests with two parent tables
+# Here we cause cascaded operation on child table through
+# one parent table and issue other delete operation through the
+# other parent table. The cascade progresses to same child table row where
+# we should see the conflict to happen
+#
+# As a result, the update on p2 should fail
+#
+--connection node_1
+
+CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
+CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
+ f2 INTEGER,
+ CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
+ ON DELETE CASCADE,
+ CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
+ ON DELETE CASCADE);
+
+INSERT INTO p1 VALUES (1, 0);
+INSERT INTO p2 VALUES (1, 0);
+
+INSERT INTO c VALUES (1, 1, 1, 0);
+
+--let $mw_369_parent_query = DELETE FROM p2 WHERE f1=1
+--let $mw_369_child_query = DELETE FROM p1 WHERE f1=1
+
+--connection node_1a
+--source MW-369.inc
+
+# Commit succeeds
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
--connection node_2
SELECT * FROM p1;
SELECT * FROM p2;
diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test
index df4fa35abc7..48eada95cb8 100644
--- a/mysql-test/suite/galera/t/MW-416.test
+++ b/mysql-test/suite/galera/t/MW-416.test
@@ -2,11 +2,10 @@
--source include/have_innodb.inc
--source include/wait_until_ready.inc
-
CREATE USER 'userMW416'@'localhost';
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost';
-SHOW GLOBAL STATUS LIKE 'wsrep_replicated';
+--let $wsrep_replicated_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_replicated'`
--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1
--connection userMW416
@@ -131,4 +130,7 @@ UNINSTALL PLUGIN plg;
--connection node_1
DROP USER 'userMW416'@'localhost';
SHOW DATABASES;
-SHOW GLOBAL STATUS LIKE 'wsrep_replicated';
+--let $wsrep_replicated_after = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_replicated'`
+--disable_query_log
+--eval SELECT $wsrep_replicated_after - $wsrep_replicated_before AS wsrep_replicated_after_diff
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test
index 6c0982ad8b3..aee5a0b2486 100644
--- a/mysql-test/suite/galera/t/MW-86-wait1.test
+++ b/mysql-test/suite/galera/t/MW-86-wait1.test
@@ -6,13 +6,15 @@
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--source include/have_debug_sync.inc
+SET @orig_debug=@@debug;
--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
SELECT @@debug_sync;
+set debug_sync='RESET';
SET SESSION wsrep_sync_wait = 1;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
@@ -90,17 +92,16 @@ SHOW WARNINGS;
--enable_result_log
# Unblock the background INSERT and remove the sync point.
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
-SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+#SET GLOBAL debug_dbug = "-d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = @orig_debug;
+SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
# This will wait for the background INSERT to complete before we quit
# from the test.
DROP TABLE t_wait1;
-SET GLOBAL debug = NULL;
-SET debug_sync='RESET';
-
# Make sure no pending signals are leftover to surprise subsequent tests.
SELECT @@debug_sync;
diff --git a/mysql-test/suite/galera/t/MW-86-wait8.test b/mysql-test/suite/galera/t/MW-86-wait8.test
index 65e612c5c8e..c40cd8b77c7 100644
--- a/mysql-test/suite/galera/t/MW-86-wait8.test
+++ b/mysql-test/suite/galera/t/MW-86-wait8.test
@@ -4,13 +4,14 @@
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--source include/have_debug_sync.inc
+SET @orig_debug=@@debug;
--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
SELECT @@debug_sync;
SET SESSION wsrep_sync_wait = 8;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
@@ -112,8 +113,11 @@ SHOW WARNINGS;
--enable_query_log
# Unblock the background INSERT and remove the sync point.
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
+#SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = @orig_debug;
+
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET debug_sync='RESET';
SET SESSION wsrep_sync_wait = default;
@@ -121,8 +125,5 @@ SET SESSION wsrep_sync_wait = default;
# from the test.
DROP TABLE t_wait8;
-SET GLOBAL debug = NULL;
-SET debug_sync='RESET';
-
# Make sure no pending signals are leftover to surprise subsequent tests.
SELECT @@debug_sync;
diff --git a/mysql-test/suite/galera/t/galera#500.test b/mysql-test/suite/galera/t/galera#500.test
index 3c8490b6907..60f303b7103 100644
--- a/mysql-test/suite/galera/t/galera#500.test
+++ b/mysql-test/suite/galera/t/galera#500.test
@@ -8,6 +8,10 @@
--source include/galera_cluster.inc
--source include/galera_have_debug_sync.inc
+--let $node_1=node_1
+--let $node_2=node_2
+--source suite/galera/include/auto_increment_offset_save.inc
+
# Force node_2 gcomm background thread to terminate via exception.
--connection node_2
--let $wsrep_cluster_address = `SELECT @@wsrep_cluster_address`
@@ -36,3 +40,5 @@ SET SESSION wsrep_on=0;
--connection node_2
CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
+
+--source suite/galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test b/mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test
new file mode 100644
index 00000000000..02322fc02ec
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_FK_duplicate_client_insert.test
@@ -0,0 +1,161 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+#
+# This test will reproduce regressions of bugs
+# https://github.com/codership/mysql-wsrep/issues/335
+# https://github.com/codership/mysql-wsrep/issues/336
+#
+# The test will issue duplicate inserts into a table, which has foreign key
+# constraint for a parent table.
+# The inserts happen in separate nodes, and the
+# The test outline is as follows:
+# 1. in node 1, an update is done for the FK parent row, in a transaction,
+# which is left open. The purpose of this is just to establish a X lock on
+# the parent row.
+# 2. in node 1, an insert for the child table is sent. The insert will have to wait
+# for the parent row X lock, because it needs S lock on the same row.
+# However, we have set an DBUG sync point just before the insert will call for
+# innodb suspend
+# 3. in node 2, a similar insert is issued. This will replicate to node 1 and try to
+# abort the conflicting update and blocked insert
+# 4. the inserts dbug sync point is relased, and insert should continue and abort
+# gracefully
+# 5. update is continued to commit, and it should also observe the deadlock
+#
+# This test is run in 3 phases:
+#
+# 1. with plain SQL statement
+# 2. as SQL prepared statements
+# 3. as SQl stored procedures
+#
+# The test phase 3 is for reproducing the issue in bug #336 specifically
+#
+
+#
+# create the test tables and foreign key constraint between them
+#
+CREATE TABLE user(id int primary key, j int) ENGINE=InnoDB;
+CREATE TABLE user_session(id int primary key, fk1 int, fk2 int) ENGINE=InnoDB;
+alter table user_session add foreign key (fk1) references user(id);
+
+# populate a few initial rows
+INSERT INTO user values (1,0), (2,0), (3,0), (4,0);
+INSERT INTO user_session values (1,1,1);
+
+#
+# prepare test connections, for:
+# update of parent row in node1
+# insert of child row in node1
+# insert of child row in node2
+
+--connect node_1_u, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1_i, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2_i, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+
+#
+# test phase 1: plain SQL statements
+#
+--echo "Phase 1: plain SQL statements"
+
+
+--connection node_1
+let $counter=10;
+let $sleep_period=1;
+
+while($counter > 0)
+{
+ --connection node_1_u
+ begin;
+ update user set j = j + 1 WHERE id > 0;
+
+ --connection node_1_i
+ set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+ send insert into user_session(id,fk1,fk2) values (2, 2, 2);
+
+ --connection node_1
+ set debug_sync='now WAIT_FOR ins_waiting';
+
+ --connection node_2_i
+ insert into user_session(id,fk1,fk2) values (2, 2, 3);
+
+ --connection node_1
+ set debug_sync='now SIGNAL cont_ins';
+
+ --connection node_1_i
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ reap;
+
+ --connection node_1_u
+ --error 0,ER_LOCK_DEADLOCK
+ commit;
+
+ --connection node_1
+ --error 0,ER_LOCK_DEADLOCK
+ truncate user_session;
+ set debug_sync = reset;
+
+ dec $counter;
+}
+
+#
+# test phase 2: prepared statements
+#
+--echo "Phase 2: prepared statements"
+
+--connection node_1_u
+prepare upd from 'update user set j = j + 1 WHERE id > 0';
+
+--connection node_1_i
+prepare ins1 from 'insert into user_session(id,fk1,fk2) values (2, 2, 2)';
+
+--connection node_2_i
+prepare ins2 from 'insert into user_session(id,fk1,fk2) values (2, 2, 3)';
+
+--connection node_1
+let $counter=10;
+let $sleep_period=1;
+
+while($counter > 0)
+{
+ --connection node_1_u
+ begin;
+ execute upd;
+ #update user set j = j + 1 WHERE id > 0;
+
+ --connection node_1_i
+ set debug_sync='lock_wait_suspend_thread_enter SIGNAL ins_waiting WAIT_FOR cont_ins';
+ send execute ins1;
+
+ --connection node_1
+ set debug_sync='now WAIT_FOR ins_waiting';
+
+ --connection node_2_i
+ execute ins2;
+
+ --connection node_1
+ set debug_sync='now SIGNAL cont_ins';
+
+ --connection node_1_i
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+ reap;
+
+ --connection node_1_u
+ --error 0,ER_LOCK_DEADLOCK
+ commit;
+
+ --connection node_1
+
+ --error 0,ER_LOCK_DEADLOCK
+ truncate user_session;
+ set debug_sync = reset;
+
+ dec $counter;
+}
+
+
+--connection node_1
+
+drop table user_session,user;
diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt
index d8ecaacaa4c..6f688b39fd5 100644
--- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt
+++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt
@@ -1 +1 @@
---lock_wait_timeout=5 --innodb_lock_wait_timeout=5 --wait_timeout=5
+--lock_wait_timeout=5 --innodb_lock_wait_timeout=5 --wait_timeout=60
diff --git a/mysql-test/suite/galera/t/galera_as_master.test b/mysql-test/suite/galera/t/galera_as_master.test
index 49f3c993256..1c439ffff63 100644
--- a/mysql-test/suite/galera/t/galera_as_master.test
+++ b/mysql-test/suite/galera/t/galera_as_master.test
@@ -64,4 +64,6 @@ RESET SLAVE ALL;
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
--connection node_1
+set global wsrep_on=OFF;
RESET MASTER;
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera/t/galera_as_master_gtid.cnf b/mysql-test/suite/galera/t/galera_as_master_gtid.cnf
index 19517556331..75caba5420a 100644
--- a/mysql-test/suite/galera/t/galera_as_master_gtid.cnf
+++ b/mysql-test/suite/galera/t/galera_as_master_gtid.cnf
@@ -1,8 +1,6 @@
!include ../galera_2nodes_as_master.cnf
[mysqld]
-gtid-mode=ON
log-bin=mysqld-bin
log-slave-updates
-enforce-gtid-consistency
binlog-format=ROW
diff --git a/mysql-test/suite/galera/t/galera_as_master_gtid.test b/mysql-test/suite/galera/t/galera_as_master_gtid.test
index 9db104b7cab..9be065e448b 100644
--- a/mysql-test/suite/galera/t/galera_as_master_gtid.test
+++ b/mysql-test/suite/galera/t/galera_as_master_gtid.test
@@ -27,10 +27,6 @@ INSERT INTO t1 VALUES(1);
--eval SELECT '$effective_uuid' != @@global.server_uuid AS uuids_do_not_match;
--enable_query_log
---replace_result $effective_uuid <effective_uuid>
---replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
-SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 120;
-
--connection node_2
INSERT INTO t1 VALUES(2);
@@ -39,10 +35,6 @@ INSERT INTO t1 VALUES(2);
--eval SELECT '$effective_uuid' = LEFT(@@global.gtid_executed, 36) AS uuids_match;
--enable_query_log
---replace_result $effective_uuid <effective_uuid>
---replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
-SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 120;
-
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
@@ -55,10 +47,6 @@ SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 120;
--eval SELECT '$effective_uuid' = LEFT(@@global.gtid_executed, 36) AS uuids_match;
--enable_query_log
---replace_result $effective_uuid <effective_uuid>
---replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
-SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
-
--connection node_1
DROP TABLE t1;
@@ -66,5 +54,17 @@ DROP TABLE t1;
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
+--connection node_1
+--let $gtid_executed_node1 = `SELECT @@global.gtid_executed;`
+
+--connection node_2
+--disable_query_log
+--eval SELECT '$gtid_executed_node1' = @@global.gtid_executed AS gtid_executed_equal
+--enable_query_log
+--connection node_3
+--disable_query_log
+--eval SELECT '$gtid_executed_node1' = @@global.gtid_executed AS gtid_executed_equal
+--enable_query_log
+
STOP SLAVE;
RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.cnf b/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.cnf
index 19517556331..75caba5420a 100644
--- a/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.cnf
+++ b/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.cnf
@@ -1,8 +1,6 @@
!include ../galera_2nodes_as_master.cnf
[mysqld]
-gtid-mode=ON
log-bin=mysqld-bin
log-slave-updates
-enforce-gtid-consistency
binlog-format=ROW
diff --git a/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.test b/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.test
index 23606d7ac4c..61c7eed6543 100644
--- a/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.test
+++ b/mysql-test/suite/galera/t/galera_as_master_gtid_change_master.test
@@ -24,6 +24,8 @@ INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
STOP SLAVE;
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_2, MASTER_AUTO_POSITION=1;
diff --git a/mysql-test/suite/galera/t/galera_as_slave.test b/mysql-test/suite/galera/t/galera_as_slave.test
index 849b75eadd1..da92437b118 100644
--- a/mysql-test/suite/galera/t/galera_as_slave.test
+++ b/mysql-test/suite/galera/t/galera_as_slave.test
@@ -5,18 +5,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -29,14 +30,14 @@ INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES (2);
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
SELECT COUNT(*) = 2 FROM t1;
INSERT INTO t1 VALUES (3);
--connection node_2
SELECT COUNT(*) = 3 FROM t1;
---connection node_1
+--connection node_3
DROP TABLE t1;
--connection node_2
@@ -46,5 +47,5 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
---connection node_1
+--connection node_3
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
index 59483d0591c..e0c8bf29682 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
@@ -5,18 +5,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
##
## Verify the correct operation of the auto-increment when
@@ -62,14 +63,13 @@ select * from t1;
show variables like 'binlog_format';
show variables like 'auto_increment_increment';
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
-
+--connection node_1
select * from t1;
show variables like 'binlog_format';
show variables like 'auto_increment_increment';
---connection node_1
+--connection node_3
DROP TABLE t1;
--connection node_2
@@ -79,5 +79,5 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
---connection node_1
+--connection node_3
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid.test b/mysql-test/suite/galera/t/galera_as_slave_gtid.test
index c2331a2ae05..3b0f191ad83 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_gtid.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid.test
@@ -8,18 +8,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -34,17 +35,21 @@ SELECT LENGTH(@@global.gtid_binlog_state) > 1;
--source include/wait_condition.inc
--disable_query_log
+
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
+#--eval SELECT GTID_SUBSET('$gtid_executed_node1', @@global.gtid_executed) AS gtid_executed_equal;
+
--enable_query_log
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
SELECT COUNT(*) = 1 FROM t1;
--disable_query_log
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
+#--eval SELECT GTID_SUBSET('$gtid_executed_node1', @@global.gtid_executed) AS gtid_executed_equal;
--enable_query_log
---connection node_1
+--connection node_3
DROP TABLE t1;
#
@@ -55,7 +60,7 @@ DROP TABLE t1;
--sleep 1
---connection node_3
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf
new file mode 100644
index 00000000000..e0852c50c44
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf
@@ -0,0 +1,17 @@
+!include ../galera_2nodes_as_slave.cnf
+
+[mysqld]
+#gtid-mode=ON
+log-bin=master-bin
+log-bin-index=master-bin
+log-slave-updates
+#enforce-gtid-consistency
+binlog-format=ROW
+
+[mysqld.2]
+replicate-do-db=test1
+replicate-wild-do-table=test1.%
+
+[mysqld.3]
+replicate-do-db=test1
+replicate-wild-do-table=test1.%
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test
new file mode 100644
index 00000000000..81b6d446ba6
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test
@@ -0,0 +1,150 @@
+#
+# Test Galera as a slave to a MySQL master using GTIDs
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+--source include/have_log_bin.inc
+
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+--connection node_1
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+
+--connection node_3
+RESET MASTER;
+
+--connection node_2
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+--disable_query_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_3, MASTER_USER='root';
+--enable_query_log
+START SLAVE;
+
+--connection node_3
+CREATE SCHEMA test1;
+CREATE SCHEMA test2;
+USE test1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
+USE test2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
+
+#
+# First , some autocommit stuff
+#
+
+# Simple inserts
+
+INSERT INTO test1.t1 (f1) VALUES (1);
+INSERT INTO test2.t1 (f1) VALUES (1);
+
+INSERT INTO test1.t1 (f1) VALUES (2);
+INSERT INTO test2.t1 (f1) VALUES (2);
+
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+
+# Update that only covers test2.t1
+
+UPDATE test2.t1 SET test2.t1.f2 = 'cde';
+
+# Multi-table UPDATE
+
+UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz';
+
+# Multi-table DELETE
+
+DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3;
+
+#
+# Multi-statement transactions
+#
+
+# Transaction which is not replicated at all
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO test2.t1 (f1) VALUES (999);
+INSERT INTO test2.t1 (f1) VALUES (9999);
+COMMIT;
+
+# Transaction that is completely replicated
+START TRANSACTION;
+INSERT INTO test1.t1 (f1) VALUES (111);
+INSERT INTO test1.t1 (f1) VALUES (222);
+COMMIT;
+
+# Transaction that is partially replicated
+
+START TRANSACTION;
+INSERT INTO test1.t1 (f1) VALUES (333);
+INSERT INTO test2.t1 (f1) VALUES (99999);
+COMMIT;
+
+#
+# Make sure binary logs and gtid_executed strings are equal
+#
+
+--sleep 2
+--connection node_2
+--let $effective_uuid = `SELECT LEFT(@@global.gtid_current_pos, 36)`
+--let $gtid_executed_node2 = `SELECT @@global.gtid_current_pos;`
+
+--replace_result $effective_uuid <effective_uuid>
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
+
+--connection node_1
+
+--disable_query_log
+--eval SELECT '$gtid_executed_node2' = @@global.gtid_current_pos AS gtid_executed_equal;
+--enable_query_log
+
+--replace_result $effective_uuid <effective_uuid>
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
+
+#
+# Final consistency checks
+#
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2);
+SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333);
+SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm';
+
+--error 1049
+USE test2;
+
+#
+# Cleanup
+#
+
+--connection node_3
+DROP SCHEMA test1;
+DROP SCHEMA test2;
+
+--sleep 1
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+STOP SLAVE;
+RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test
new file mode 100644
index 00000000000..1604016f3c3
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test
@@ -0,0 +1,176 @@
+#
+# Test the case where a Galera slave to async replication goes non-prim while
+# a stream of replication events including filtered events is arriving
+#
+
+--source include/have_innodb.inc
+--source include/have_log_bin.inc
+--source include/big_test.inc
+
+# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--source include/galera_cluster.inc
+
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+
+--connection node_2
+SET global wsrep_on=OFF;
+RESET MASTER;
+SET global wsrep_on=ON;
+
+--connection node_2
+--disable_query_log
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
+--enable_query_log
+START SLAVE USER='root';
+
+--connection node_1
+CREATE SCHEMA test1;
+CREATE SCHEMA test2;
+USE test1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+USE test2;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+INSERT INTO test1.t1 (f1) VALUES (1);
+INSERT INTO test2.t1 (f1) VALUES (1);
+
+INSERT INTO test1.t1 (f1) VALUES (2);
+INSERT INTO test2.t1 (f1) VALUES (2);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 2 FROM test1.t1;
+--source include/wait_condition.inc
+
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_1
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+INSERT INTO test1.t1 (f1) VALUES (3);
+INSERT INTO test2.t1 (f1) VALUES (3);
+
+--connection node_2
+SET SESSION wsrep_on=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+--let $slave_sql_errno = 1047
+--source include/wait_for_slave_sql_error.inc
+
+--connection node_1
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+INSERT INTO test1.t1 (f1) VALUES (4);
+INSERT INTO test2.t1 (f1) VALUES (4);
+
+--connection node_2
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+--connection node_1
+INSERT INTO test1.t1 (f1) VALUES (5);
+INSERT INTO test2.t1 (f1) VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+SET SESSION wsrep_on=ON;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_ready';
+--source include/wait_condition.inc
+
+--connection node_1
+INSERT INTO test1.t1 (f1) VALUES (6);
+INSERT INTO test2.t1 (f1) VALUES (6);
+
+--connection node_2
+START SLAVE;
+
+#
+# Consistency checks
+#
+
+--sleep 2
+--connection node_2
+--let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1;
+--source include/wait_condition.inc
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1;
+--source include/wait_condition.inc
+
+--connection node_2
+--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
+
+--let $effective_uuid_1 = `SELECT SUBSTRING_INDEX(@@global.gtid_executed, ':', 1)`
+--let $effective_uuid_2 = `SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(@@global.gtid_executed, '\n', -1), ':', 1)`
+
+--replace_result $effective_uuid_1 <effective_uuid_1> $effective_uuid_2 <effective_uuid_2>
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
+
+--error 1049
+USE test2;
+
+--connection node_3
+
+--disable_query_log
+--eval SELECT '$gtid_executed_node2' = @@global.gtid_executed AS gtid_executed_equal;
+--enable_query_log
+
+--error 1049
+USE test2;
+
+--replace_result $effective_uuid_1 <effective_uuid_1> $effective_uuid_2 <effective_uuid_2>
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
+
+#
+# Cleanup
+#
+
+--connection node_1
+DROP SCHEMA test1;
+DROP SCHEMA test2;
+
+--sleep 1
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_2
+STOP SLAVE;
+RESET SLAVE ALL;
+CALL mtr.add_suppression("GTID replication failed");
+CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed");
+CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
+CALL mtr.add_suppression("TO isolation failed for");
+CALL mtr.add_suppression("Slave SQL: Error 'Deadlock found when trying to get lock; try restarting transaction' on query");
+CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query");
+CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047");
diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
index 46a93458271..31c0b9ca162 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
@@ -7,22 +7,23 @@
--source include/have_innodb.inc
--source include/big_test.inc
+--source include/galera_cluster.inc
# Step #1. Establish replication
#
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
-#
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
---source include/galera_cluster.inc
+# As node 4 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_4 connection here
+--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root';
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_4, MASTER_USER='root';
--enable_query_log
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
---connection node_1
+--connection node_4
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
@@ -34,22 +35,21 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
+--connection node_1
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
# Step #3. Force async replication to fail by creating a replication event while the slave is non-prim
---connection node_1
+--connection node_4
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
--connection node_2
--sleep 5
--let $value = query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1)
---connection node_3
+--connection node_1
--disable_query_log
--eval SELECT "$value" IN ("Error 'Unknown command' on query. Default database: 'test'. Query: 'BEGIN'", "Node has dropped from cluster") AS expected_error
--enable_query_log
@@ -58,7 +58,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
---connection node_3
+--connection node_1
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
@@ -74,7 +74,7 @@ START SLAVE;
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc
---connection node_1
+--connection node_4
DROP TABLE t1;
--sleep 2
@@ -92,5 +92,5 @@ CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
---connection node_1
+--connection node_4
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_preordered.test b/mysql-test/suite/galera/t/galera_as_slave_preordered.test
index 6f221f83b3a..5b3c78b2cb1 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_preordered.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_preordered.test
@@ -6,14 +6,15 @@
--source include/have_innodb.inc
--source include/have_log_bin.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE USER='root';
@@ -21,7 +22,7 @@ START SLAVE USER='root';
# Issue many large-ish transaction on the async master
#
---connection node_1
+--connection node_3
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
@@ -63,8 +64,7 @@ while ($count)
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
---connection node_3
+--connection node_1
SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
@@ -72,7 +72,7 @@ SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
# Cleanup
#
---connection node_1
+--connection node_3
DROP TABLE t1;
DROP TABLE ten;
@@ -80,5 +80,8 @@ DROP TABLE ten;
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'ten';
+--source include/wait_condition.inc
+
STOP SLAVE;
RESET SLAVE ALL;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test b/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test
index 460e040c010..fa5f3f9c7c6 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_replication_bundle.test
@@ -5,18 +5,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
@@ -36,7 +37,7 @@ INSERT INTO t1 VALUES(5);
SELECT COUNT(*) = 4 FROM t1;
# Bundle is now complete, the last INSERT and the DROP are delivered
---connection node_1
+--connection node_3
DROP TABLE t1;
--connection node_2
diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
index b4bf5f02171..cddb8e0e174 100644
--- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf
+++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.cnf
@@ -1,12 +1,11 @@
!include ../galera_2nodes.cnf
[mysqld]
-wsrep_sst_method=xtrabackup-v2
+wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
[mysqld.1]
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;pc.ignore_sb=true'
[mysqld.2]
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
-
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;pc.ignore_sb=true'
diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
index cd7621bfa6e..ed3674ad0e0 100644
--- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test
+++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
@@ -6,7 +6,11 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/have_xtrabackup.inc
+--source include/have_mariabackup.inc
+
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
--let $connection_id = `SELECT CONNECTION_ID()`
@@ -41,6 +45,8 @@ DELIMITER ;|
--connection node_2a
--source include/kill_galera.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+
--sleep 10
--source include/start_mysqld.inc
--sleep 25
@@ -55,7 +61,6 @@ INSERT INTO t1 VALUES (DEFAULT);
--disable_query_log
--eval KILL CONNECTION $connection_id
--enable_query_log
-
INSERT INTO t1 VALUES (DEFAULT);
--connection node_1
@@ -94,3 +99,7 @@ DROP TABLE t1;
CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
+
+--let $node_1=node_1a
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf
new file mode 100644
index 00000000000..612418c17c0
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.cnf
@@ -0,0 +1,15 @@
+!include ../galera_2nodes.cnf
+
+# We set repl.commit_order=1 in order to disable provider commit
+# ordering.
+
+[mysqld.1]
+log-bin
+log-slave-updates
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;repl.commit_order=1'
+
+[mysqld.2]
+
+log-bin
+log-slave-updates
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;repl.commit_order=1' \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test
new file mode 100644
index 00000000000..a828701cd0e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test
@@ -0,0 +1,77 @@
+#
+# This test uses galera_sr_bf_abort.inc to probe various BF abort points
+# for SR transactions with wsrep provider commit ordering disabled.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/galera_have_debug_sync.inc
+
+# Control connection for manipulating sync points on node 1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+# SR bf abort on fragment
+--let $wsrep_trx_fragment_size = 1
+--echo galera_sr_bf_abort_at_commit = 0
+--let $galera_sr_bf_abort_at_commit = 0
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+# SR bf abort on commit fragment
+--let $wsrep_trx_fragment_size = 1
+--echo galera_sr_bf_abort_at_commit = 1
+--let $galera_sr_bf_abort_at_commit = 1
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source suite/galera/t/galera_sr_bf_abort.inc
+
+# Normal bf abort on commit
+--let $wsrep_trx_fragment_size = 0
+--echo galera_sr_bf_abort_at_commit = 1
+--let $galera_sr_bf_abort_at_commit = 1
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc
+
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test
new file mode 100644
index 00000000000..c7af8375b3f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test
@@ -0,0 +1,33 @@
+#
+# This test verifies that the server can be shut down even if
+# some of the wsrep transactions are in QUERY_COMMITTING state.
+# In this case the shutdown sequence may do a BF abort for the
+# connection.
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+--source include/have_debug_sync.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_1
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+
+--connection node_2
+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
+
+# 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_commit_empty.test b/mysql-test/suite/galera/t/galera_commit_empty.test
new file mode 100644
index 00000000000..4e1a1e4eb2c
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_commit_empty.test
@@ -0,0 +1,35 @@
+# Test empty transactions.
+#
+# Check that the empty transaction gets terminated by starting and new
+# transaction after it. If the empty transaction is not terminated
+# appropriately, the following START TRANSACTION will fail.
+#
+# Also check that empty transactions don't generate any write sets.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+START TRANSACTION;
+COMMIT;
+
+START TRANSACTION;
+COMMIT;
+
+START TRANSACTION READ ONLY;
+COMMIT;
+
+START TRANSACTION;
+COMMIT;
+
+START TRANSACTION;
+START TRANSACTION;
+COMMIT;
+
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--disable_query_log
+--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before AS wsrep_last_committed_diff
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_create_table_as_select.test b/mysql-test/suite/galera/t/galera_create_table_as_select.test
new file mode 100644
index 00000000000..a6c1f657280
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_create_table_as_select.test
@@ -0,0 +1,145 @@
+#
+# CREATE TABLE AS SELECT tests
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+SET SESSION default_storage_engine=InnoDB;
+
+# Left table already exists
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+--error ER_TABLE_EXISTS_ERROR
+CREATE TABLE t1 AS SELECT * FROM t2;
+DROP TABLE t1,t2;
+
+# Right table does not exist
+--error ER_NO_SUCH_TABLE
+CREATE TABLE t1 AS SELECT * FROM t2;
+
+# No right table at all
+CREATE TABLE t1 AS SELECT 1 FROM DUAL;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+# Empty right table
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 AS SELECT * FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+# Right table is MyISAM
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT * FROM t2;
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+# Right side is a subquery
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT f1 = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1,t2;
+
+# Inside a stored procedure
+
+--connection node_1
+DELIMITER |;
+CREATE PROCEDURE sp1 ()
+BEGIN
+ CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+ INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+ CREATE TABLE t1 AS SELECT * FROM t2;
+END|
+DELIMITER ;|
+CALL sp1();
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1, t2;
+DROP PROCEDURE sp1;
+
+# Inside a prepared statement
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+
+#
+# Multi-master conflict
+#
+
+--connection node_1
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+LOCK TABLE t2 WRITE;
+
+--connection node_1
+--send CREATE TABLE t1 AS SELECT * FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t2;
+CREATE TABLE t1 AS SELECT * FROM t2;
+
+--connection node_1a
+UNLOCK TABLES;
+
+--connection node_1
+--error ER_TABLE_EXISTS_ERROR,ER_LOCK_DEADLOCK
+--reap
+
+DROP TABLE t1, t2;
+
+#
+# Temporary table
+#
+
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
+
+CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2;
+
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t1;
+
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query");
+
+--connection node_1
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test
index 0ad97916302..3f8be268135 100644
--- a/mysql-test/suite/galera/t/galera_defaults.test
+++ b/mysql-test/suite/galera/t/galera_defaults.test
@@ -19,7 +19,7 @@ source ../wsrep/include/check_galera_version.inc;
# Global Variables
-SELECT COUNT(*) = 43 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+SELECT COUNT(*) `expect 48` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -36,26 +36,3 @@ AND VARIABLE_NAME NOT IN (
'WSREP_PATCH_VERSION'
)
ORDER BY VARIABLE_NAME;
-
-# wsrep_provider_options
-#
-# We replace the ones that vary from run to run with placeholders
-
---let _WSREP_PROVIDER_OPTIONS = `SELECT @@wsrep_provider_options`
---perl
- use strict;
- my $wsrep_provider_options = $ENV{'_WSREP_PROVIDER_OPTIONS'};
- $wsrep_provider_options =~ s/base_dir = .*?;/<BASE_DIR>;/sgio;
- $wsrep_provider_options =~ s/base_host = .*?;/<BASE_HOST>;/sgio;
- $wsrep_provider_options =~ s/base_port = .*?;/<BASE_PORT>;/sgio;
- $wsrep_provider_options =~ s/gcache\.dir = .*?;/<GCACHE_DIR>;/sgio;
- $wsrep_provider_options =~ s/gcache\.name = .*?;/<GCACHE_NAME>;/sgio;
- $wsrep_provider_options =~ s/gmcast\.listen_addr = .*?;/<GMCAST_LISTEN_ADDR>;/sgio;
- $wsrep_provider_options =~ s/gcs\.recv_q_hard_limit = .*?;/<GCS_RECV_Q_HARD_LIMIT>;/sgio;
- $wsrep_provider_options =~ s/ist\.recv_addr = .*?;/<IST_RECV_ADDR>;/sgio;
- $wsrep_provider_options =~ s/evs\.evict = .*?;/<EVS_EVICT>;/sgio;
- $wsrep_provider_options =~ s/signal = .*?;\s*//sgio;
- $wsrep_provider_options =~ s/dbug = .*?;\s*//sgio;
- $wsrep_provider_options =~ s/repl.proto_max = .*?;\s*/<REPL_PROTO_MAX>;/sgio;
- print $wsrep_provider_options."\n";
-EOF
diff --git a/mysql-test/suite/galera/t/galera_drop_database.test b/mysql-test/suite/galera/t/galera_drop_database.test
index 47fe8315198..12d9efea2f9 100644
--- a/mysql-test/suite/galera/t/galera_drop_database.test
+++ b/mysql-test/suite/galera/t/galera_drop_database.test
@@ -9,6 +9,7 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
+# Create test database with two sets of the FTS indexes:
CREATE DATABASE fts;
USE fts;
CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
@@ -23,34 +24,19 @@ DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';
+# Restart the second node:
--connection node_2
-let $wsrep_cluster_address = `SELECT @@global.wsrep_node_incoming_address`;
--source include/restart_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
---let $galera_connection_name = node_2a
---let $galera_server_number = 2
---source include/galera_connect.inc
---connection node_2a
+--connection node_2
--source include/wait_until_ready.inc
+# Drop the tables and database after nodes restarted:
--connection node_1
---let $restart_parameters = --wsrep-cluster-address=gcomm://$wsrep_cluster_address
---source include/restart_mysqld.inc
-
---connection node_2a
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
-
---let $galera_connection_name = node_1a
---let $galera_server_number = 1
---source include/galera_connect.inc
---connection node_1a
---source include/wait_until_ready.inc
-
USE fts;
DROP TABLE fts_t1;
DROP TABLE fts_t2;
@@ -58,8 +44,4 @@ SHOW TABLES;
DROP DATABASE fts;
# Restore original auto_increment_offset values.
---let $node_1=node_1a
---let $node_2=node_2a
--source include/auto_increment_offset_restore.inc
-
---source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/galera_forced_binlog_format.test b/mysql-test/suite/galera/t/galera_forced_binlog_format.test
index 364f41529a4..e9d7fa1c3a3 100644
--- a/mysql-test/suite/galera/t/galera_forced_binlog_format.test
+++ b/mysql-test/suite/galera/t/galera_forced_binlog_format.test
@@ -7,7 +7,10 @@
--source include/galera_cluster.inc
--connection node_1
+SEt GLOBAL wsrep_on=OFF;
RESET MASTER;
+SEt GLOBAL wsrep_on=ON;
+FLUSH BINARY LOGS;
SET SESSION binlog_format = 'STATEMENT';
@@ -40,6 +43,6 @@ REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
DROP USER dummy@localhost;
DROP DATABASE testdb_9401;
---source include/galera_end.inc
+#--source include/galera_end.inc
--echo # End of tests
diff --git a/mysql-test/suite/galera/t/galera_ftwrl_drain.test b/mysql-test/suite/galera/t/galera_ftwrl_drain.test
index 690e890cdea..ee64e147f65 100644
--- a/mysql-test/suite/galera/t/galera_ftwrl_drain.test
+++ b/mysql-test/suite/galera/t/galera_ftwrl_drain.test
@@ -12,7 +12,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--connection node_1
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
@@ -55,7 +55,7 @@ SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
--error ER_LOCK_WAIT_TIMEOUT
-INSERT INTO t2 VALUES (2);
+INSERT INTO t1 VALUES (2);
--connection node_2a
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test b/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
index b7fd9cf3aed..d728a094f10 100644
--- a/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
+++ b/mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test
@@ -13,6 +13,14 @@ SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
--connection node_1
+
+#
+# Wait until the configuration change is over in order to avoid
+# replication error due to configuration change.
+#
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
INSERT INTO t1 (f2) VALUES (REPEAT('x', 1024 * 1024 * 10));
@@ -48,8 +56,8 @@ DROP TABLE t1;
CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
# Confirm that IST did not take place
---let $assert_text = IST first seqno 2 not found from cache, falling back to SST
---let $assert_select = IST first seqno 2 not found from cache, falling back to SST
+--let $assert_text = IST first seqno [24] not found from cache, falling back to SST
+--let $assert_select = IST first seqno [24] not found from cache, falling back to SST
--let $assert_count = 1
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = starting as process
diff --git a/mysql-test/suite/galera/t/galera_gcs_fragment.test b/mysql-test/suite/galera/t/galera_gcs_fragment.test
index 80d3a5cb659..d2593fec8c8 100644
--- a/mysql-test/suite/galera/t/galera_gcs_fragment.test
+++ b/mysql-test/suite/galera/t/galera_gcs_fragment.test
@@ -1,7 +1,7 @@
# Test fragmentation over configuration changes
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
@@ -54,7 +54,7 @@ INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# Deadlock error should be returned since write set send was
# interrupted by gcs
--connection node_1
---error ER_LOCK_DEADLOCK
+--error ER_ERROR_DURING_COMMIT
--reap
# Do additional insert to verify that node_1 remain operational
diff --git a/mysql-test/suite/galera/t/galera_gtid-master.opt b/mysql-test/suite/galera/t/galera_gtid-master.opt
index 8a755e98b00..30317469ae7 100644
--- a/mysql-test/suite/galera/t/galera_gtid-master.opt
+++ b/mysql-test/suite/galera/t/galera_gtid-master.opt
@@ -1 +1 @@
---log-bin --log-slave-updates
+--log-bin --log-slave-updates --loose-new-servers-for-galera_gtid-test
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave.test b/mysql-test/suite/galera/t/galera_gtid_slave.test
index 19bfd8e17db..df55ea03cb0 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave.test
+++ b/mysql-test/suite/galera/t/galera_gtid_slave.test
@@ -8,18 +8,19 @@
#
--source include/have_innodb.inc
-
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
--enable_query_log
START SLAVE;
---connection node_1
+--connection node_3
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
@@ -49,31 +50,43 @@ INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
SELECT @@global.gtid_binlog_state;
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 3 FROM t1;
--source include/wait_condition.inc
INSERT INTO t1 VALUES(4);
SELECT @@global.gtid_binlog_state;
---connection node_1
+--connection node_3
DROP TABLE t1,t2;
+#
+# Unfortunately without the sleep below the following statement fails with "query returned no rows", which
+# is difficult to understand given that it is an aggregate query. A "query execution was interrupted"
+# warning is also reported by MTR, which is also weird.
+#
+
+--sleep 1
+
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
---connection node_3
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
+SET GLOBAL wsrep_on=OFF;
reset master;
+SET GLOBAL wsrep_on=ON;
---connection node_3
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
reset master;
+SET GLOBAL wsrep_on=ON;
---connection node_1
+--connection node_3
reset master;
diff --git a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
index 3fe94ad16b7..d03445d537a 100644
--- a/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
+++ b/mysql-test/suite/galera/t/galera_gtid_slave_sst_rsync.test
@@ -8,21 +8,21 @@
--source include/big_test.inc
--source include/have_innodb.inc
-# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
+# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
+# we open the node_3 connection here
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--echo #Connection 2
--connection node_2
--disable_query_log
---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1,master_use_gtid=slave_pos;
+--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3,master_use_gtid=slave_pos;
--enable_query_log
START SLAVE;
--sleep 1
-
---echo #Connection 1
---connection node_1
+--echo #Connection 3
+--connection node_3
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 int unique) ENGINE=InnoDB;
INSERT INTO t2 VALUES(1,11);
INSERT INTO t2 VALUES(2,22);
@@ -30,7 +30,6 @@ INSERT INTO t2 VALUES(3,33);
SELECT @@global.gtid_binlog_state;
--source include/save_master_gtid.inc
-
--echo #Connection 2
--connection node_2
--source include/sync_with_master_gtid.inc
@@ -40,9 +39,8 @@ INSERT INTO t2 VALUES(4,44);
INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
-
---echo #Connection 3
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't2';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 6 FROM t2;
@@ -53,8 +51,8 @@ INSERT INTO t2 VALUES(8,88);
SELECT @@global.gtid_binlog_state;
#Perform SST
---echo #Connection 1
---connection node_1
+--echo #Connection 3
+--connection node_3
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
@@ -62,7 +60,6 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
--source include/save_master_gtid.inc
-
--echo #Connection 2
--connection node_2
--source include/sync_with_master_gtid.inc
@@ -71,22 +68,21 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
---let $node_1= node_2
---let $node_2= node_3
+--let $node_1= node_1
+--let $node_2= node_2
--source include/auto_increment_offset_save.inc
---echo Shutting down server ...
---source include/shutdown_mysqld.inc
-
-
--echo #Connection 2
--connection node_2
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+--echo #Connection 1
+--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
SET AUTOCOMMIT=OFF;
@@ -94,51 +90,46 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 2
+--connection node_2
--echo Starting server ...
--source include/start_mysqld.inc
+
--source include/wait_until_ready.inc
--source include/auto_increment_offset_restore.inc
SET AUTOCOMMIT=OFF;
START TRANSACTION;
-INSERT INTO t1 VALUES ('node3_committed_after');
-INSERT INTO t1 VALUES ('node3_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
+INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
-
---echo #Connection 2
---connection node_2
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
--source include/wait_condition.inc
Select * from t1 order by f1;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 2
+--connection node_2
Select * from t1 order by f1;
#SST Done
--sleep 1
+--echo #Connection 1
+--connection node_1
+SELECT @@global.gtid_binlog_state;
--echo #Connection 2
--connection node_2
SELECT @@global.gtid_binlog_state;
-
--echo #Connection 3
--connection node_3
-SELECT @@global.gtid_binlog_state;
-
---echo #Connection 1
---connection node_1
SET AUTOCOMMIT=ON;
#drop table t1;
#CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
-
--echo #Connection 2
--connection node_2
SET AUTOCOMMIT=ON;
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
SET AUTOCOMMIT=ON;
#
@@ -148,10 +139,9 @@ SET AUTOCOMMIT=ON;
STOP slave;
--sleep 1
INSERT INTO t1 VALUES ('node2_slave_stoped');
-
---echo #Connection 1
---connection node_1
-INSERT INTO t1 VALUES ('node1_normal_entry');
+--echo #Connection 3
+--connection node_3
+INSERT INTO t1 VALUES ('node3_normal_entry');
--source include/save_master_gtid.inc
#start slave
@@ -163,16 +153,14 @@ start slave;
INSERT INTO t1 VALUES ('node2_slave_started');
SELECT count(*) from t1;
SELECT @@global.gtid_binlog_state;
-
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 12 FROM t1;
--source include/wait_condition.inc
SELECT count(*) from t1;
SELECT @@global.gtid_binlog_state;
-
---echo #Connection 1
---connection node_1
+--echo #Connection 3
+--connection node_3
DROP TABLE t2,t1;
# Unfortunately without the sleep below the following statement fails with "query returned no rows", which
@@ -181,27 +169,31 @@ DROP TABLE t2,t1;
#
--sleep 3
-
--echo #Connection 2
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
--source include/wait_condition.inc
-
---echo #Connection 3
---connection node_3
+--echo #Connection 1
+--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
-
--echo #Connection 2
--connection node_2
STOP SLAVE;
RESET SLAVE ALL;
+set global wsrep_on=OFF;
reset master;
+set global wsrep_on=ON;
---echo #Connection 3
---connection node_3
-reset master;
+--disable_warnings
+set global gtid_slave_pos="";
+--enable_warnings
--echo #Connection 1
--connection node_1
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+--echo #Connection 3
+--connection node_3
reset master;
diff --git a/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.cnf b/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.cnf
index 41a1aab382b..7979b23e085 100644
--- a/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld]
-wsrep_sst_method=xtrabackup-v2
+wsrep_sst_method=mariabackup
wsrep_sst_auth=root:
innodb_flush_log_at_trx_commit=0
@@ -11,4 +11,3 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
-
diff --git a/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.test b/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.test
index 07838702deb..fd362a26840 100644
--- a/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.test
+++ b/mysql-test/suite/galera/t/galera_ist_innodb_flush_logs.test
@@ -7,6 +7,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/have_mariabackup.inc
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
diff --git a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf
index a762b939f69..75dff78149d 100644
--- a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld]
-wsrep_sst_method=xtrabackup-v2
+wsrep_sst_method=mariabackup
wsrep_sst_auth=root:
[mysqld.1]
diff --git a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test b/mysql-test/suite/galera/t/galera_ist_mariabackup.test
index 34961765008..6ef4f65ccd4 100644
--- a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup.test
@@ -1,7 +1,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/have_xtrabackup.inc
+--source include/have_mariabackup.inc
--let $node_1=node_1
--let $node_2=node_2
@@ -12,4 +12,5 @@
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
+
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf
new file mode 100644
index 00000000000..1542376b2b8
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.cnf
@@ -0,0 +1,14 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+wsrep_sst_method=mariabackup
+wsrep_sst_auth=root:
+
+innodb_flush_log_at_trx_commit=0
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+
diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test
new file mode 100644
index 00000000000..fd362a26840
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_innodb_flush_logs.test
@@ -0,0 +1,13 @@
+#
+# This test performs server kill and IST while innodb_flush_logs_on_trx_commit = 0
+# This confirms that IST can properly catch up even in the face of relaxed single-node durability
+#
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_mariabackup.inc
+
+--source suite/galera/include/galera_st_kill_slave.inc
+--source suite/galera/include/galera_st_kill_slave_ddl.inc
diff --git a/mysql-test/suite/galera/t/galera_ist_progress.test b/mysql-test/suite/galera/t/galera_ist_progress.test
index 3ba63415c28..dd93161eab8 100644
--- a/mysql-test/suite/galera/t/galera_ist_progress.test
+++ b/mysql-test/suite/galera/t/galera_ist_progress.test
@@ -58,8 +58,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
--let $assert_only_after = Need state transfer
---let $assert_text = Receiving IST: 11 writesets, seqnos
---let $assert_select = Receiving IST: 11 writesets, seqnos
+--let $assert_text = Receiving IST: 1[13] writesets
+--let $assert_select = Receiving IST: 1[13] writesets
--source include/assert_grep.inc
--let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
index 633318629a6..42f210170bc 100644
--- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
+++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
@@ -7,7 +7,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
# This could cause out of storage if run /dev/shm
--source include/big_test.inc
@@ -43,8 +43,6 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
# ... and restart provider to force IST
--echo Loading wsrep_provider ...
--disable_query_log
-# base_port setting is lost for some reason when unloading provider, so we need to restore it
---eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2';
--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
# Make sure IST will block ...
--let $galera_sync_point = recv_IST_after_apply_trx
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index d04b72bce0a..b66e0bcbbd0 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -6,7 +6,6 @@
--source include/have_innodb.inc
--connection node_1
---sleep 2
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE IS NULL LIMIT 1`
--disable_query_log
diff --git a/mysql-test/suite/galera/t/galera_log_bin.test b/mysql-test/suite/galera/t/galera_log_bin.test
index 2f0faa761c5..57df53e29b1 100644
--- a/mysql-test/suite/galera/t/galera_log_bin.test
+++ b/mysql-test/suite/galera/t/galera_log_bin.test
@@ -36,4 +36,6 @@ DROP TABLE t1;
DROP TABLE t2;
--connection node_1
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/t/galera_many_rows.cnf b/mysql-test/suite/galera/t/galera_many_rows.cnf
new file mode 100644
index 00000000000..24c4cc1c60d
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_many_rows.cnf
@@ -0,0 +1,10 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+innodb-status-output=ON
+innodb-status-output-locks=ON
+
+[mysqld.2]
+innodb-status-output=ON
+innodb-status-output-locks=ON
+
diff --git a/mysql-test/suite/galera/t/galera_many_rows.test b/mysql-test/suite/galera/t/galera_many_rows.test
index 58ba85e1b9e..67e2eb6edbf 100644
--- a/mysql-test/suite/galera/t/galera_many_rows.test
+++ b/mysql-test/suite/galera/t/galera_many_rows.test
@@ -3,6 +3,11 @@
--source include/galera_cluster.inc
--source include/have_innodb.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_1
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
@@ -52,3 +57,5 @@ COMMIT;
DROP TABLE t1;
DROP TABLE ten;
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_migrate.cnf b/mysql-test/suite/galera/t/galera_migrate.cnf
index ed48f208e52..2e1e9f161a9 100644
--- a/mysql-test/suite/galera/t/galera_migrate.cnf
+++ b/mysql-test/suite/galera/t/galera_migrate.cnf
@@ -29,11 +29,13 @@ wsrep_sync_wait = 15
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+log-slave-updates
[mysqld.4]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+log-slave-updates
[ENV]
NODE_MYPORT_1= @mysqld.1.port
diff --git a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
index 08ed3fac67e..5a33c16c86e 100644
--- a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
+++ b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
@@ -32,8 +32,8 @@ INSERT INTO t2 VALUES (1);
--connection node_2a
--sleep 1
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%';
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committing%';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM t2;
@@ -44,7 +44,7 @@ UNLOCK TABLES;
--eval SET SESSION wsrep_sync_wait = $wsrep_sync_wait_orig;
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
index 644b4687cb3..203d18b85a6 100644
--- a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
+++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
@@ -12,13 +12,16 @@
--source include/galera_connect.inc
--connection node_1
-CREATE TABLE ten (f1 INTEGER);
+CREATE TABLE ten (f1 INTEGER) engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
+
--connection node_2
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
SET GLOBAL wsrep_slave_threads = 4;
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--source include/wait_condition.inc
--connection node_1
--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
@@ -31,16 +34,18 @@ SET GLOBAL wsrep_slave_threads = 4;
--connection node_1
--reap
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(DISTINCT f1) FROM t1;
--connection node_1a
--reap
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(DISTINCT f1) FROM t1;
--connection node_2
--reap
SELECT COUNT(*) FROM t1;
SELECT COUNT(DISTINCT f1) FROM t1;
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
- USER = 'system user' AND STATE NOT LIKE 'InnoDB%';
--disable_query_log
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
index 8680d62a36d..d2156cb3577 100644
--- a/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
+++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
@@ -42,7 +42,7 @@ while ($count)
SELECT COUNT(*) = 20000 FROM t1;
SELECT COUNT(DISTINCT f1) = 20000 FROM t1;
-SELECT COUNT(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
+SELECT COUNT(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'wsrep applier committed%';
--disable_query_log
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test
index 2cd840123cf..51bb1355ba4 100644
--- a/mysql-test/suite/galera/t/galera_parallel_simple.test
+++ b/mysql-test/suite/galera/t/galera_parallel_simple.test
@@ -47,7 +47,7 @@ SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%';
--source include/wait_condition.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%';
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committing%';
--source include/wait_condition.inc
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/galera_pc_recovery.test b/mysql-test/suite/galera/t/galera_pc_recovery.test
new file mode 100644
index 00000000000..1621414aff5
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_pc_recovery.test
@@ -0,0 +1,102 @@
+#
+# Test the pc.recovery=1 option. Killing all nodes simultaneously and
+# restarting them should succeed and the cluster should re-form.
+#
+
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+# Save galera ports
+--connection node_1
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
+
+--connection node_2
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+# Instruct MTR to not restart the nodes automatically when they are killed
+
+--let $NODE_1_PIDFILE = `SELECT @@pid_file`
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+--let $NODE_2_PIDFILE = `SELECT @@pid_file`
+
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--exec kill -9 `cat $NODE_1_PIDFILE` `cat $NODE_2_PIDFILE`
+
+# Perform --wsrep-recover and preserve the positions into variables by placing them in $MYSQL_TMP_DIR/galera_wsrep_start_position.inc and then --source'ing it
+
+--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.1.log > $MYSQL_TMP_DIR/galera_wsrep_recover.1.log 2>&1
+--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-recover --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.2.log > $MYSQL_TMP_DIR/galera_wsrep_recover.2.log 2>&1
+
+--perl
+ use strict;
+ my $wsrep_start_position1 = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.1.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
+ chomp($wsrep_start_position1);
+
+ my $wsrep_start_position2 = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.2.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
+ chomp($wsrep_start_position2);
+
+ die if $wsrep_start_position1 eq '' || $wsrep_start_position2 eq '';
+
+ open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
+ print FILE "--let \$galera_wsrep_start_position1 = $wsrep_start_position1\n";
+ print FILE "--let \$galera_wsrep_start_position2 = $wsrep_start_position2\n";
+ close FILE;
+EOF
+
+--source $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
+
+if ($galera_wsrep_start_position1 == '') {
+ --die "Could not obtain wsrep_start_position."
+}
+
+if ($galera_wsrep_start_position2 == '') {
+ --die "Could not obtain wsrep_start_position."
+}
+
+--remove_file $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
+
+# Instruct MTR to perform the actual restart using --wsrep-start-position . Proper --wsrep_cluster_address is used as my.cnf only contains 'gcomm://' for node #1
+
+--exec echo "restart: --wsrep-start-position=$galera_wsrep_start_position1 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart: --wsrep-start-position=$galera_wsrep_start_position2 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+
+--sleep 5
+--connection node_1
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+# Confirm that the cluster has re-formed and data is present
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_2
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
+
+--connection node_1
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
+
+--connection node_2
+CALL mtr.add_suppression("points to own listening address, blacklisting");
+CALL mtr.add_suppression("non weight changing install in S_PRIM");
+CALL mtr.add_suppression("No re-merged primary component found");
diff --git a/mysql-test/suite/galera/t/galera_split_brain.test b/mysql-test/suite/galera/t/galera_split_brain.test
index a85a2ad9b8d..91a2cc326a2 100644
--- a/mysql-test/suite/galera/t/galera_split_brain.test
+++ b/mysql-test/suite/galera/t/galera_split_brain.test
@@ -1,6 +1,8 @@
#
-# Confirm that with two nodes, killing one causes the other to stop accepting connections
-# The pc.ignore_sb=true wsrep_provider option is tested in the galera_kill_* tests.
+# Confirm that with two nodes, killing one causes the other to stop accepting
+# connections.
+# The pc.ignore_sb=true wsrep_provider option is tested in the galera_kill_*
+# tests.
#
--source include/galera_cluster.inc
diff --git a/mysql-test/suite/galera/t/galera_ssl.cnf b/mysql-test/suite/galera/t/galera_ssl.cnf
index 1c22580cc15..de57c9ffbf0 100644
--- a/mysql-test/suite/galera/t/galera_ssl.cnf
+++ b/mysql-test/suite/galera/t/galera_ssl.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld.1]
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem'
[mysqld.2]
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem'
diff --git a/mysql-test/suite/galera/t/galera_ssl_compression.cnf b/mysql-test/suite/galera/t/galera_ssl_compression.cnf
index d6fd2c4d510..4dffe99bd5a 100644
--- a/mysql-test/suite/galera/t/galera_ssl_compression.cnf
+++ b/mysql-test/suite/galera/t/galera_ssl_compression.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld.1]
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem;socket.ssl_compression=YES'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem;socket.ssl_compression=YES'
[mysqld.2]
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem;socket.ssl_compression=YES'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem;socket.ssl_compression=YES'
diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.cnf b/mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
index 2954ae0f4cb..3fd1c650c05 100644
--- a/mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
+++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld.1]
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem'
[mysqld.2]
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem'
diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-test/suite/galera/t/galera_ssl_upgrade.test
index a424942da30..2ce932b5398 100644
--- a/mysql-test/suite/galera/t/galera_ssl_upgrade.test
+++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.test
@@ -14,7 +14,7 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--connection node_1
--source include/shutdown_mysqld.inc
---let $start_mysqld_params = --wsrep-cluster-address=gcomm://127.0.0.1:$NODE_GALERAPORT_2 --wsrep_provider_options=base_port=$NODE_GALERAPORT_1;socket.ssl=yes;socket.ssl_ca=$MYSQL_TEST_DIR/std_data/galera-upgrade-ca-cert.pem;socket.ssl_cert=$MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=$MYSQL_TEST_DIR/std_data/galera-key.pem
+--let $start_mysqld_params = --wsrep-cluster-address=gcomm://127.0.0.1:$NODE_GALERAPORT_2 --wsrep_provider_options=base_port=$NODE_GALERAPORT_1;socket.ssl=yes;socket.ssl_ca=$MYSQL_TEST_DIR/std_data/galera-upgrade-ca-cert.pem;socket.ssl_cert=$MYSQL_TEST_DIR/std_data/cacert.pem;socket.ssl_key=$MYSQL_TEST_DIR/std_data/cakey.pem
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
@@ -46,4 +46,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+# 5. Make sure node_2 is ready as well
+--connection node_2
+--source include/galera_wait_ready.inc
+
# Upgrade complete. Both nodes now use the new key and certificate
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
index 89f23d24d87..aeb2301925e 100644
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld]
-wsrep_sst_method=xtrabackup-v2
+wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_debug=ON
@@ -9,8 +9,9 @@ wsrep_debug=ON
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
-innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/rsync_test_2
+innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/data_dir_test
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT
+streamfmt=xbstream
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.test
index 135bc2a39f7..aad68460c34 100644
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.test
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_data_dir.test
@@ -1,7 +1,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/have_xtrabackup.inc
+--source include/have_mariabackup.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
@@ -20,4 +20,4 @@
--source include/galera_end.inc
# cleanup temporary database files:
---remove_files_wildcard $MYSQL_TMP_DIR/rsync_test_2 *
+--remove_files_wildcard $MYSQL_TMP_DIR/data_dir_test *
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
new file mode 100644
index 00000000000..646d7322b41
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.cnf
@@ -0,0 +1,12 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+wsrep_sst_method=mariabackup
+wsrep_sst_auth="root:"
+wsrep_debug=ON
+
+[SST]
+tkey=@ENV.MYSQL_TEST_DIR/std_data/cakey.pem
+tcert=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
+encrypt=3
+transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.test
index 2f685ca7184..4449ea43c43 100644
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.test
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_encrypt_with_key.test
@@ -1,12 +1,12 @@
#
-# This test checks that key and cert encryption options can be passed to xtrabackup via the my.cnf file
-# Initial SST happens via xtrabackup, so there is not much to do in the body of the test
+# This test checks that key and cert encryption options can be passed to mariabackup via the my.cnf file
+# Initial SST happens via mariabackup, so there is not much to do in the body of the test
#
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/have_xtrabackup.inc
+--source include/have_mariabackup.inc
SELECT 1;
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
index 0025b259ec5..336296e9bfe 100644
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf
@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld]
-wsrep_sst_method=xtrabackup-v2
+wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_debug=ON
@@ -13,3 +13,4 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT
+streamfmt=xbstream
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test
new file mode 100644
index 00000000000..9d4f50f66ee
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.test
@@ -0,0 +1,229 @@
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_filekeymanagement.inc
+--source include/innodb_encrypt_tables.inc
+--source include/innodb_page_size_small.inc
+--source include/have_mariabackup.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--echo Performing State Transfer on a server that starts from a clean var directory
+--echo This is accomplished by shutting down node #2 and removing its var directory before restarting it
+
+--connection node_1
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1;
+CREATE TABLE t3 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=NO;
+CREATE TABLE t4 (f1 CHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES;
+CREATE TABLE t5 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+CREATE TABLE t6 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=NO;
+CREATE TABLE t7 (f1 CHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES;
+CREATE TABLE t8 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=NO;
+CREATE TABLE t9 (f1 CHAR(255)) ENGINE=InnoDB ENCRYPTED=YES;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_committed_before');
+ dec $rows;
+ }
+ dec $tables;
+}
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t7;
+--source include/wait_condition.inc
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node2_committed_before');
+ dec $rows;
+ }
+ dec $tables;
+}
+COMMIT;
+
+--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
+
+--echo Cleaning var directory ...
+--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
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_committed_during');
+ dec $rows;
+ }
+ dec $tables;
+}
+COMMIT;
+
+START TRANSACTION;
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_to_be_committed_after');
+ dec $rows;
+ }
+ dec $tables;
+}
+
+--connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_to_be_rollbacked_after');
+ dec $rows;
+ }
+ dec $tables;
+}
+
+--connection node_2
+--echo Starting server ...
+--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node2_committed_after');
+ dec $rows;
+ }
+ dec $tables;
+}
+COMMIT;
+
+--connection node_1
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_to_be_committed_after');
+ dec $rows;
+ }
+ dec $tables;
+}
+COMMIT;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+let $tables = 9;
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_committed_after');
+ dec $rows;
+ }
+ dec $tables;
+}
+COMMIT;
+
+--connection node_1a_galera_st_clean_slave
+while ($tables)
+{
+ let $rows = 5;
+ while($rows)
+ {
+ eval insert into t$tables values ('node1_to_be_rollbacked_after');
+ dec $rows;
+ }
+ dec $tables;
+}
+ROLLBACK;
+
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+SELECT COUNT(*) FROM t3;
+SELECT COUNT(*) FROM t4;
+SELECT COUNT(*) FROM t5;
+SELECT COUNT(*) FROM t6;
+SELECT COUNT(*) FROM t7;
+SELECT COUNT(*) FROM t8;
+SELECT COUNT(*) FROM t9;
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+SELECT * FROM t4;
+SELECT * FROM t5;
+SELECT * FROM t6;
+SELECT * FROM t7;
+SELECT * FROM t8;
+SELECT * FROM t9;
+COMMIT;
+SET AUTOCOMMIT=ON;
+
+--connection node_1
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+SELECT COUNT(*) FROM t3;
+SELECT COUNT(*) FROM t4;
+SELECT COUNT(*) FROM t5;
+SELECT COUNT(*) FROM t6;
+SELECT COUNT(*) FROM t7;
+SELECT COUNT(*) FROM t8;
+SELECT COUNT(*) FROM t9;
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+SELECT * FROM t4;
+SELECT * FROM t5;
+SELECT * FROM t6;
+SELECT * FROM t7;
+SELECT * FROM t8;
+SELECT * FROM t9;
+COMMIT;
+
+DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9;
+COMMIT;
+SET AUTOCOMMIT=ON;
+
+# Restore original auto_increment_offset values.
+--source include/auto_increment_offset_restore.inc
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf b/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf
index 574ae28b54a..0d05038f2fb 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump.cnf
@@ -5,7 +5,7 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
-
+wsrep_sync_wait=0
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
-
+wsrep_sync_wait=0
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump.test b/mysql-test/suite/galera/t/galera_sst_mysqldump.test
index 835fac94a68..cce4d374a6d 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump.test
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump.test
@@ -1,6 +1,5 @@
--source include/big_test.inc
--source include/galera_cluster.inc
-
--source suite/galera/include/galera_sst_set_mysqldump.inc
--let $node_1=node_1
@@ -14,7 +13,6 @@
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_clean_slave.inc
-
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
index 44e5573b3e6..b7bca487fc5 100644
--- a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
@@ -5,9 +5,13 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_causal_reads=0
+wsrep_sync_wait=0
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_causal_reads=0
+wsrep_sync_wait=0
[mysqld]
wsrep_debug=ON
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf
deleted file mode 100644
index 3abf2549aae..00000000000
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf
+++ /dev/null
@@ -1,25 +0,0 @@
-!include ../galera_2nodes.cnf
-
-[mysqld]
-wsrep_sst_method=xtrabackup-v2
-wsrep_sst_auth="root:"
-wsrep_debug=ON
-
-[xtrabackup]
-backup-locks
-close-files
-#compact - disabled in xtrabackup 2.4, https://bugs.launchpad.net/percona-xtrabackup/+bug/1192834/comments/29
-# compression requires qpress from the Percona repositories
-# compress
-# compress-threads=2
-encryption=AES256
-encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4
-galera-info
-history=backup
-parallel=2
-
-[SST]
-encrypt=1
-encrypt-algo=AES256
-encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4
-transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.test b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.test
deleted file mode 100644
index db2b706b6b8..00000000000
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.test
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# This test checks that various options can be passed to xtrabackup via the my.cnf file
-# Initial SST happens via xtrabackup, so there is not much to do in the body of the test
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/have_xtrabackup.inc
-
-SELECT 1;
-
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
---source include/wait_condition.inc
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test
deleted file mode 100644
index c270e4d0b19..00000000000
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test
+++ /dev/null
@@ -1,20 +0,0 @@
---source include/big_test.inc
---source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/have_xtrabackup.inc
-
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---source include/auto_increment_offset_save.inc
-
---source suite/galera/include/galera_st_shutdown_slave.inc
---source suite/galera/include/galera_st_clean_slave.inc
-
---source suite/galera/include/galera_st_kill_slave.inc
---source suite/galera/include/galera_st_kill_slave_ddl.inc
-
-# Restore original auto_increment_offset values.
---source include/auto_increment_offset_restore.inc
-
---source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf
deleted file mode 100644
index 63d05104a37..00000000000
--- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_encrypt_with_key.cnf
+++ /dev/null
@@ -1,12 +0,0 @@
-!include ../galera_2nodes.cnf
-
-[mysqld]
-wsrep_sst_method=xtrabackup-v2
-wsrep_sst_auth="root:"
-wsrep_debug=ON
-
-[SST]
-tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem
-tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
-encrypt=3
-transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_error.test b/mysql-test/suite/galera/t/galera_toi_ddl_error.test
index c586d97bdb5..6ee2a6e9b16 100644
--- a/mysql-test/suite/galera/t/galera_toi_ddl_error.test
+++ b/mysql-test/suite/galera/t/galera_toi_ddl_error.test
@@ -27,3 +27,8 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
DROP TABLE ten;
+
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query.");
+
+--connection node_2
+CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_locking.test b/mysql-test/suite/galera/t/galera_toi_ddl_locking.test
index 12c83a1f87a..22a45316306 100644
--- a/mysql-test/suite/galera/t/galera_toi_ddl_locking.test
+++ b/mysql-test/suite/galera/t/galera_toi_ddl_locking.test
@@ -11,20 +11,31 @@
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
---connection node_1
-SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
---send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-
--let $galera_connection_name = node_1a
--let $galera_server_number = 1
--source include/galera_connect.inc
+SET SESSION wsrep_sync_wait = 0;
--let $galera_connection_name = node_1b
--let $galera_server_number = 1
--source include/galera_connect.inc
+# node_1c tests write to unrelated table trough a transaction
+--let $galera_connection_name = node_1c
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+--connection node_1
+SET DEBUG_SYNC= 'RESET';
+SET DEBUG_SYNC = 'alter_table_before_open_tables SIGNAL before_open_tables WAIT_FOR continue';
+--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC= 'now WAIT_FOR before_open_tables';
+
+# if we would retry the insert, it would fail for wrong column count
+# on second try
+SET wsrep_retry_autocommit=0;
# Allowed
SELECT COUNT(*) = 0 FROM t1;
@@ -32,45 +43,56 @@ SELECT COUNT(*) = 0 FROM t1;
# Allowed
SELECT COUNT(*) = 0 FROM t2;
-# Not allowed
---error ER_LOCK_DEADLOCK,ER_ERROR_DURING_COMMIT
-INSERT INTO t1 VALUES (1);
+# Not allowed, this will hang because of ALTER
+--send INSERT INTO t1 VALUES (1);
+
+--connection node_1c
+SET SESSION wsrep_sync_wait = 0;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
# Allowed
+SELECT COUNT(*) = 0 FROM t1;
+
+# Allowed
+SELECT COUNT(*) = 0 FROM t2;
+
+# Allowed (until commit)
INSERT INTO t2 VALUES (1);
# Hangs
--send COMMIT;
---sleep 1
--connection node_1b
SET SESSION wsrep_sync_wait = 0;
# The Commit issued above is still not done
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
+--sleep 1
SELECT COUNT(*) = 0 FROM t2;
+
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'Commit';
+
SET DEBUG_SYNC= 'now SIGNAL continue';
--connection node_1a
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1c
+# this will succeeed, becaus the query will be replayed
--reap
--connection node_1
--reap
+
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
+SET debug_sync='RESET';
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
---connection node_1
-SET DEBUG_SYNC= 'RESET';
-
---connection node_1b
-SET DEBUG_SYNC= 'RESET';
-
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/t/galera_transaction_replay.test b/mysql-test/suite/galera/t/galera_transaction_replay.test
index 29870829ba3..655714f26c9 100644
--- a/mysql-test/suite/galera/t/galera_transaction_replay.test
+++ b/mysql-test/suite/galera/t/galera_transaction_replay.test
@@ -1,12 +1,25 @@
#
-# This test tests the operation of transaction replay. If a potentially conflicting remote transaction arrives at
-# just the right time during the commit of a local transaction, the local transaction will be aborted and replayed.
+# This test tests the operation of transaction replay. If a potentially
+# conflicting remote transaction arrives at just the right time during
+# the commit of a local transaction, the local transaction will be aborted
+# and replayed.
+#
+# Because the write set with higher sequence number cannot BF abort
+# the victim with lower sequence number, the conflicting remote transaction
+# must be executed first and must be allowed to proceed up to the apply
+# monitor before sending the COMMIT for the transaction to be replayed.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+######################################################################
+#
+# Scenario #1, the victim will have higher seqno and will be replayed
+#
+######################################################################
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
@@ -21,34 +34,123 @@ START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
-# Block the commit
+# Block the applier on node #1 and issue a conflicting update on node #2
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---let $galera_sync_point = commit_monitor_enter_sync
+SET SESSION wsrep_sync_wait=0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Block the commit, send the COMMIT and wait until it gets blocked
+
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
---send COMMIT;
+--send COMMIT
-# Wait until commit is blocked
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Let the conflicting UPDATE proceed and wait until it hits abort_trx_end.
+# The victim transaction still sits in commit_monitor_master_sync_point.
+
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
-# Issue a conflicting update on node #2
+# Let the transactions proceed
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+# Commit succeeds
+--connection node_1
+--reap
+
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+# wsrep_local_replays has increased by 1
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
--connection node_2
-UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+DROP TABLE t1;
+
+#########################################################################
+#
+# Scenario #2, the victim will have lower seqno and will not be replayed
+#
+#########################################################################
+
+--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+# Block the commit, send the COMMIT and wait until it gets blocked
+
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+--send COMMIT
-# Wait for both transactions to be blocked
--connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
---source include/wait_condition.inc
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
---source include/wait_condition.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+
+# Set sync point at the end of BF abort, issue a conflicting update
+# and wait for the conflicting update to hit the sync point.
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
-# Unblock the commit
--connection node_1a
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+# Let the transactions proceed
--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
# Commit succeeds
@@ -58,10 +160,10 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
-# wsrep_local_replays has increased by 1
+# wsrep_local_replays should have not increased
--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
--disable_query_log
---eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 0 AS wsrep_local_replays;
--enable_query_log
--connection node_2
@@ -70,55 +172,84 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
DROP TABLE t1;
-#echo "# test for PS replaying"
+########################################
#
# test replaying of prepared statements
#
+########################################
+
--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
CREATE TABLE t1 (i int primary key, j int) ENGINE=INNODB;
INSERT INTO t1 VALUES (1, 0), (3, 0);
SELECT * FROM t1;
-
+SET AUTOCOMMIT=ON;
PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0";
-# block the commit of PS
+
+# Block the applier on node #1 and issue a conflicting update on node #2
--connection node_1a
---let $galera_sync_point = commit_monitor_enter_sync
+SET SESSION wsrep_sync_wait=0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc
---connection node_1
---send EXECUTE stmt1;
+--connection node_2
+INSERT INTO t1 VALUES(2,2);
-# Wait until commit is blocked
--connection node_1a
-SET SESSION wsrep_sync_wait = 0;
--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
-# Issue a conflicting update on node_2
---connection node_2
-#UPDATE t1 SET j=2;
-INSERT INTO t1 VALUES(2,2);
+# Block the commit, send the EXECUTE stmt1 and wait until it gets blocked
+--let $galera_sync_point = commit_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
-# Wait until applying begins in node_1
---connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Write_rows_log_event::write_row%';
---source include/wait_condition.inc
+--connection node_1
+SET SESSION wsrep_sync_wait=0;
+--send EXECUTE stmt1
-# Unblock the PS commit
--connection node_1a
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
+
+# Let the conflicting INSERT proceed and wait until it hits abort_trx_end.
+# The victim transaction still sits in commit_monitor_master_sync_point.
+
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+# Let the transactions proceed
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
# Commit succeeds
--connection node_1
--reap
+SET SESSION wsrep_sync_wait=7;
SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
--connection node_1
+# wsrep_local_replays has increased by 1
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_cluster_address.test b/mysql-test/suite/galera/t/galera_var_cluster_address.test
index 6d99d35cdac..85ae73ffda4 100644
--- a/mysql-test/suite/galera/t/galera_var_cluster_address.test
+++ b/mysql-test/suite/galera/t/galera_var_cluster_address.test
@@ -19,8 +19,8 @@
SET GLOBAL wsrep_cluster_address = 'foo://';
# With wsrep_sync_wait, this returns an error
-#--error ER_LOCK_WAIT_TIMEOUT
-#SHOW STATUS;
+--error ER_LOCK_WAIT_TIMEOUT
+SHOW STATUS;
SET SESSION wsrep_sync_wait=0;
@@ -29,7 +29,7 @@ SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS;
# Must return 'OFF'
SHOW STATUS LIKE 'wsrep_ready';
-# Must return 'Non-primary'
+# Must return 'Disconnected'
SHOW STATUS LIKE 'wsrep_cluster_status';
# Must return 0 = 'Initialized'
@@ -49,10 +49,9 @@ SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VA
--connection node_2
--disable_query_log
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node2';
+--source include/galera_wait_ready.inc
--enable_query_log
---source include/wait_until_connected_again.inc
-
--connection node_1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
@@ -63,7 +62,7 @@ CALL mtr.add_suppression("Failed to initialize backend using 'foo");
CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo");
CALL mtr.add_suppression("gcs connect failed: Socket type not supported");
CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7");
-CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)");
+CALL mtr.add_suppression("gcs_caused\\(\\) returned -[0-9]+ \\(Software caused connection abort\\)");
CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110");
CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)");
CALL mtr.add_suppression("gcs connect failed: Connection timed out");
diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
index 1f01c4aac07..859642a6fdf 100644
--- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test
+++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
@@ -11,11 +11,6 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.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
--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address`
@@ -32,7 +27,7 @@ SET SESSION wsrep_sync_wait=0;
# Must return 'OFF'
SHOW STATUS LIKE 'wsrep_ready';
-# Must return 'Non-primary'
+# Must return 'Disconnected'
SHOW STATUS LIKE 'wsrep_cluster_status';
--error ER_UNKNOWN_COM_ERROR
@@ -53,6 +48,7 @@ SET @@session.wsrep_dirty_reads=OFF;
--error ER_UNKNOWN_COM_ERROR
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
+
SELECT 1;
USE information_schema;
@@ -65,6 +61,7 @@ SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
--eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved'
--enable_query_log
--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
--connection node_1
USE test;
@@ -72,8 +69,7 @@ SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
+# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
---echo # End of test
-
diff --git a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test
new file mode 100644
index 00000000000..ddf561c8784
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test
@@ -0,0 +1,235 @@
+#
+# Test option wsrep_ignore_apply_errors
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+
+#
+# Ignore reconciling DDL errors on node_2
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 1;
+
+# Drop table that does not exist
+--connection node_1
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+DROP TABLE t1;
+
+# Drop schema that does not exist
+SET GLOBAL wsrep_on = OFF;
+CREATE SCHEMA s1;
+SET GLOBAL wsrep_on = ON;
+DROP SCHEMA s1;
+
+# Drop index that does not exist using DROP INDEX
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+DROP INDEX idx1 ON t1;
+DROP TABLE t1;
+
+# Drop index that does not exist using ALTER TABLE
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+CREATE INDEX idx1 ON t1 (f1);
+SET GLOBAL wsrep_on = ON;
+ALTER TABLE t1 DROP INDEX idx1;
+DROP TABLE t1;
+
+# Drop column that does not exist
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+SET GLOBAL wsrep_on = ON;
+ALTER TABLE t1 DROP COLUMN f2;
+DROP TABLE t1;
+
+
+#
+# Ignore reconciling DML errors on node_2
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+
+# Delete row that does not exist
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+DELETE FROM t1 WHERE f1 = 1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+DROP TABLE t1;
+
+# Delete row that does not exist in a multi statement transaction
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 1 FROM t1;
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
+
+#
+# Multi-row delete where only one row does not exist
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+--connection node_1
+DELETE FROM t1;
+
+SELECT COUNT(*) = 0 FROM t1;
+--connection node_2
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 0 FROM t1;
+DROP TABLE t1;
+
+#
+# Multi-statement delete where only one row does not exist
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+--connection node_1
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+DELETE FROM t1 WHERE f1 = 4;
+DELETE FROM t1 WHERE f1 = 5;
+COMMIT;
+SET AUTOCOMMIT=ON;
+
+SELECT COUNT(*) = 0 FROM t1;
+--connection node_2
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 0 FROM t1;
+DROP TABLE t1;
+
+#
+# Multi-table delete
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 3 FROM t2;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM t2 WHERE f1 = 2;
+DELETE FROM t1 WHERE f1 = 3;
+SET SESSION wsrep_on = ON;
+
+--connection node_1
+DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_2
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 0 FROM t1;
+DROP TABLE t1,t2;
+
+#
+# Foreign keys
+#
+
+--connection node_1
+CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+INSERT INTO parent VALUES (1),(2),(3);
+CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE) ENGINE=INNODB;
+INSERT INTO child VALUES (1,1),(2,2),(3,3);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 3 FROM child;
+--source include/wait_condition.inc
+
+SET SESSION wsrep_on = OFF;
+DELETE FROM child WHERE parent_id = 2;
+SET SESSION wsrep_on = ON;
+
+--connection node_1
+DELETE FROM parent;
+SELECT COUNT(*) = 0 FROM parent;
+SELECT COUNT(*) = 0 FROM child;
+
+--connection node_2
+SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT COUNT(*) = 0 FROM parent;
+SELECT COUNT(*) = 0 FROM child;
+DROP TABLE child, parent;
+
+#
+# Ignore all DDL errors on node_2
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 4;
+
+# Create a table that already exists
+--connection node_2
+SET GLOBAL wsrep_on = OFF;
+CREATE TABLE t1 (f1 INTEGER);
+SET GLOBAL wsrep_on = ON;
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 INTEGER);
+DROP TABLE t1;
+
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+
+CALL mtr.add_suppression("Can't find record in 't.*'");
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091");
+CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query.");
diff --git a/mysql-test/suite/galera/t/galera_var_log_bin.cnf b/mysql-test/suite/galera/t/galera_var_log_bin.cnf
index f7f17e3720a..30ccee2024e 100644
--- a/mysql-test/suite/galera/t/galera_var_log_bin.cnf
+++ b/mysql-test/suite/galera/t/galera_var_log_bin.cnf
@@ -3,3 +3,8 @@
[mysqld]
log-bin
+[mysqld.1]
+log-slave-updates
+
+[mysqld.2]
+log-slave-updates
diff --git a/mysql-test/suite/galera/t/galera_var_reject_queries.test b/mysql-test/suite/galera/t/galera_var_reject_queries.test
index 6859855c35f..8b80c04e3be 100644
--- a/mysql-test/suite/galera/t/galera_var_reject_queries.test
+++ b/mysql-test/suite/galera/t/galera_var_reject_queries.test
@@ -18,8 +18,11 @@ SET GLOBAL wsrep_reject_queries = ALL;
--error ER_UNKNOWN_COM_ERROR
SELECT * FROM t1;
-# Lost connection
---error 2013
+#
+# Original behavior was lost connection,
+# but since 10.1, we allow controlling connection to remain alive
+#
+--error 0,2013
SET GLOBAL wsrep_reject_queries = ALL_KILL;
--connection node_1a
diff --git a/mysql-test/suite/galera/t/galera_var_retry_autocommit.test b/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
index 142f02546b4..df541b774a4 100644
--- a/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
+++ b/mysql-test/suite/galera/t/galera_var_retry_autocommit.test
@@ -16,11 +16,11 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 0;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
--send INSERT INTO t1 (f1) VALUES (2)
--connection node_1a
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
@@ -42,11 +42,11 @@ DROP TABLE t1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue';
---send INSERT INTO t1 (f1) VALUES (2)
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
+--send INSERT INTO t1 (f1) VALUES (3)
--connection node_1a
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
@@ -68,12 +68,12 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 2';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 2';
---send INSERT INTO t1 VALUES (2);
+--send INSERT INTO t1 VALUES (4);
--connection node_1a
-SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
@@ -81,7 +81,7 @@ TRUNCATE TABLE t1;
--connection node_1a
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) = 0 FROM t1;
-SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_rep';
+SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
@@ -107,9 +107,9 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 64;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
-SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue EXECUTE 64';
+SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
---send INSERT INTO t1 VALUES (2)
+--send INSERT INTO t1 VALUES (5)
--disable_query_log
--disable_result_log
@@ -117,7 +117,7 @@ SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL before_rep WAIT_FOR continue E
while ($count)
{
--connection node_1a
- SET DEBUG_SYNC = 'now WAIT_FOR before_rep';
+ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2
TRUNCATE TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.cnf b/mysql-test/suite/galera/t/galera_var_slave_threads.cnf
new file mode 100644
index 00000000000..889c81b4a0a
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+auto_increment_offset=1
+
+[mysqld.2]
+auto_increment_offset=2
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test
index 80edcb2aff9..12d8006db4b 100644
--- a/mysql-test/suite/galera/t/galera_var_slave_threads.test
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test
@@ -8,6 +8,11 @@
--source include/have_innodb.inc
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+# 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_1
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB;
@@ -21,6 +26,7 @@ SELECT @@wsrep_slave_threads = 1;
SET GLOBAL wsrep_slave_threads = 1;
# There is a separate wsrep_aborter thread at all times
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
@@ -33,13 +39,15 @@ SET GLOBAL wsrep_slave_threads = 64;
INSERT INTO t1 VALUES (1);
--connection node_2
---let $wait_timeout=600
---let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
---source include/wait_condition.inc
+SELECT COUNT(*) FROM t1;
-SELECT COUNT(*) = 1 FROM t1;
+#
+# note, in wsrep API #26, we have 2 rollbacker threads, counted as system user's
+#
---let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
#
@@ -65,49 +73,122 @@ while ($count)
--connection node_2
SELECT COUNT(*) FROM t2;
---let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%')
---source include/wait_condition.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--source include/wait_condition.inc
---eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
+--let $wsrep_cluster_address_node2 = `SELECT @@wsrep_cluster_address`
+--let $wsrep_provider_node2 = `SELECT @@wsrep_provider`
-DROP TABLE t1;
-DROP TABLE t2;
+SET GLOBAL wsrep_slave_threads = 5;
---echo #
---echo # lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
---echo #
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--source include/wait_condition.inc
---connection node_1
-CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
+SET GLOBAL wsrep_slave_threads = 1;
+#
+# test phase for bug https://github.com/codership/mysql-wsrep/issues/319
+#
+
+# shutdown node 2
--connection node_2
-SET GLOBAL wsrep_slave_threads = 4;
---let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%')
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+# wait until node_1 is ready as one node cluster
+--connection node_1
+
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
+show status like 'wsrep_cluster_size';
+# step up slave threads to 6, and make sure all appliers and rollbacker thread are running
+SET GLOBAL wsrep_slave_threads = 6;
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--source include/wait_condition.inc
+
+# change to invalid cluster address
SET GLOBAL wsrep_slave_threads = 1;
+SET GLOBAL wsrep_cluster_address='';
---connection node_1
-INSERT INTO t1 VALUES (DEFAULT);
-INSERT INTO t1 VALUES (DEFAULT);
-INSERT INTO t1 VALUES (DEFAULT);
-DROP TABLE t1;
+# join back to single node cluster
+SET GLOBAL wsrep_cluster_address='gcomm://';
+--source include/wait_until_connected_again.inc
---connection node_2
+# we should have 1 applier thread now
+--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'
+--source include/wait_condition.inc
-# Wait until above DDL is replicated
---let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+# test if we can increase applier count now (fails in bug #319)
+SET GLOBAL wsrep_slave_threads = 10;
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
-SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+# restart node 2
+--connection node_2
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
+#
#
-# make sure that we are left with exactly one applier thread before we leaving the test
+# cleanup to original state
#
---let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%')
+--connection node_1
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
+
+--connection node_2
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
+
+
+--disable_result_log
+--disable_query_log
+# Generate 64 replication events, to help node 1 to purge excessive applier threads
+--let $count = 64
+while ($count)
+{
+ INSERT INTO t2 VALUES (DEFAULT);
+ --dec $count
+}
+--enable_query_log
+--enable_result_log
+
+--connection node_1
+--disable_result_log
+--disable_query_log
+# Generate 64 replication events, to help node 2 to purge excessive applier threads
+--let $count = 64
+while ($count)
+{
+ INSERT INTO t2 VALUES (DEFAULT);
+ --dec $count
+}
+--enable_query_log
+--enable_result_log
+
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+
+--connection node_1
+
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+# Restore original auto_increment_offset values.
+--source include/auto_increment_offset_restore.inc
--echo # End of tests
diff --git a/mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt b/mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt
new file mode 100644
index 00000000000..beae84b3862
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_vote_drop_temporary-master.opt
@@ -0,0 +1 @@
+--log-bin
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 6ba8ce786c8..28025363019 100644
--- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
+++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
@@ -5,7 +5,6 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected';
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#198-master.opt b/mysql-test/suite/galera/t/mysql-wsrep#198-master.opt
new file mode 100644
index 00000000000..beae84b3862
--- /dev/null
+++ b/mysql-test/suite/galera/t/mysql-wsrep#198-master.opt
@@ -0,0 +1 @@
+--log-bin
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#237.test b/mysql-test/suite/galera/t/mysql-wsrep#237.test
index cba8dfeb275..174266bdbc5 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#237.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#237.test
@@ -7,13 +7,13 @@
CREATE TABLE t (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
--connection node_1
-SET DEBUG_SYNC = 'wsrep_before_replication WAIT_FOR continue';
+SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue';
--send INSERT INTO t values (1);
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET SESSION wsrep_sync_wait = 0;
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: wsrep_before_replication'
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: wsrep_before_certification'
--source include/wait_condition.inc
--connection node_2
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-test/suite/galera/t/mysql-wsrep#332.test
index 2da01ba900e..674a5c3de52 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#332.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#332.test
@@ -1,7 +1,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
# Open connection node_1a here, MW-369.inc will use it later
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
diff --git a/mysql-test/suite/galera/t/partition.test b/mysql-test/suite/galera/t/partition.test
index bb5a02411c3..13e09a4e3e6 100644
--- a/mysql-test/suite/galera/t/partition.test
+++ b/mysql-test/suite/galera/t/partition.test
@@ -129,11 +129,17 @@ CREATE TABLE t1 (pk INT PRIMARY KEY)
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_2
-SELECT COUNT(*) = 20002 FROM t1;
+--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1;
+--source include/wait_condition.inc
-# LOAD-ing 20002 rows causes 3 commits to be registered
+SELECT COUNT(*) FROM t1;
+
+# LOAD-ing 20002 rows causes
+# 3 commits to be registered when the Galera library does not support streaming replication and
+# 5 commits to be registered when the Galera library supports streaming replication
--disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 3 AS wsrep_last_committed_diff;
+--replace_result 3 AS_EXPECTED_3_or_5 5 AS_EXPECTED_3_or_5
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
@@ -157,11 +163,14 @@ CREATE TABLE t1 (pk INT PRIMARY KEY)
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_2
-SELECT COUNT(*) = 101 FROM t1;
+--let $wait_condition = SELECT COUNT(*) = 101 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) FROM t1;
# LOAD-ing 101 rows causes 1 commit to be registered
--disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
@@ -186,11 +195,16 @@ CREATE TABLE t1 (pk INT PRIMARY KEY)
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_2
-SELECT COUNT(*) = 20002 FROM t1;
+--let $wait_condition = SELECT COUNT(*) = 20002 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) FROM t1;
-# LOAD-ing 20002 rows causes 1 commit to be registered
+# LOAD-ing 20002 rows causes
+# 1 commit to be registered when the Galera library does not support streaming replication and
+# 2 commits to be registered when the Galera library supports streaming replication
--disable_query_log
---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
+--replace_result 1 AS_EXPECTED_1_or_2 2 AS_EXPECTED_1_or_2
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/rpl_row_annotate.test b/mysql-test/suite/galera/t/rpl_row_annotate.test
index b1cfdb36639..0ec30829982 100644
--- a/mysql-test/suite/galera/t/rpl_row_annotate.test
+++ b/mysql-test/suite/galera/t/rpl_row_annotate.test
@@ -3,11 +3,15 @@
--echo # On node_2
--connection node_2
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
--echo # On node_1
--connection node_1
+SET GLOBAL wsrep_on=OFF;
RESET MASTER;
+SET GLOBAL wsrep_on=ON;
CREATE TABLE t1(i INT)ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
DELETE FROM t1 WHERE i = 1;
@@ -38,5 +42,4 @@ let $start_pos= `select @binlog_start_pos`;
# Cleanup
DROP TABLE t1;
---source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test b/mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test
new file mode 100644
index 00000000000..a970cc09afc
--- /dev/null
+++ b/mysql-test/suite/galera/t/wsrep_trx_fragment_size_sr.test
@@ -0,0 +1,22 @@
+-- source include/galera_cluster.inc
+
+-- let $sr = `SELECT variable_value LIKE '%:STREAMING:%' FROM information_schema.session_status WHERE variable_name = 'wsrep_provider_capabilities'`
+
+if (!$sr)
+{
+ -- skip The test requires a wsrep provider that supports streaming replication.
+}
+
+SELECT variable_value FROM information_schema.session_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+
+SET SESSION wsrep_trx_fragment_size = 0;
+SET SESSION wsrep_trx_fragment_size = 123;
+
+SELECT variable_value FROM information_schema.global_variables
+WHERE variable_name = 'wsrep_trx_fragment_size';
+
+SET GLOBAL wsrep_trx_fragment_size = 0;
+SET GLOBAL wsrep_trx_fragment_size = 123;
+
+SET GLOBAL wsrep_trx_fragment_size = default;
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index a9b9b00b40c..1683485981b 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -1,3 +1,2 @@
galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798
-
diff --git a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
index 3f39b82f7b7..2707fb69f4d 100644
--- a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
@@ -10,7 +10,6 @@ default-storage-engine=innodb
wsrep_gtid_mode=1
gtid_ignore_duplicates
-wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
@@ -21,8 +20,9 @@ wsrep_node_address=127.0.0.1
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep-cluster-address='gcomm://'
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
@@ -32,8 +32,9 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
@@ -43,8 +44,9 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
@@ -56,9 +58,9 @@ wsrep_cluster_name=cluster2
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
-
+wsrep-on=1
wsrep-cluster-address='gcomm://'
-wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
@@ -69,8 +71,9 @@ wsrep_cluster_name=cluster2
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port'
-wsrep_provider_options='base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.5.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.5.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.5.port
@@ -81,8 +84,9 @@ wsrep_cluster_name=cluster2
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.4.#galera_port'
-wsrep_provider_options='base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.6.#galera_port;evs.suspect_timeout=PT300S;evs.inactive_timeout=PT1000M;evs.install_timeout=PT155S;evs.keepalive_period = PT100S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.6.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.6.port
@@ -106,17 +110,3 @@ NODE_MYSOCK_5= @mysqld.5.socket
NODE_MYPORT_6= @mysqld.6.port
NODE_MYSOCK_6= @mysqld.6.socket
-
-NODE_GALERAPORT_1= @mysqld.1.#galera_port
-NODE_GALERAPORT_2= @mysqld.2.#galera_port
-NODE_GALERAPORT_3= @mysqld.3.#galera_port
-NODE_GALERAPORT_4= @mysqld.4.#galera_port
-NODE_GALERAPORT_5= @mysqld.5.#galera_port
-NODE_GALERAPORT_6= @mysqld.6.#galera_port
-
-NODE_SSTPORT_1= @mysqld.1.#sst_port
-NODE_SSTPORT_2= @mysqld.2.#sst_port
-NODE_SSTPORT_3= @mysqld.3.#sst_port
-NODE_SSTPORT_4= @mysqld.4.#sst_port
-NODE_SSTPORT_5= @mysqld.5.#sst_port
-NODE_SSTPORT_6= @mysqld.6.#sst_port
diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
index 91aa53ad7b1..ab7493e313b 100644
--- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
@@ -6,7 +6,6 @@ binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
-wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
@@ -17,8 +16,10 @@ wsrep-sync-wait=15
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+#wsrep-new-cluster
+wsrep-on=1
wsrep-cluster-address='gcomm://'
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
@@ -28,8 +29,9 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
@@ -39,8 +41,9 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
+wsrep-on=1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
@@ -55,12 +58,3 @@ NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
-
-NODE_GALERAPORT_1= @mysqld.1.#galera_port
-NODE_GALERAPORT_2= @mysqld.2.#galera_port
-NODE_GALERAPORT_3= @mysqld.3.#galera_port
-
-NODE_SSTPORT_1= @mysqld.1.#sst_port
-NODE_SSTPORT_2= @mysqld.2.#sst_port
-NODE_SSTPORT_3= @mysqld.3.#sst_port
-
diff --git a/mysql-test/suite/galera/include/galera_resume.inc b/mysql-test/suite/galera_3nodes/include/galera_resume.inc
index 232cb46479e..af8f2b956fd 100644
--- a/mysql-test/suite/galera/include/galera_resume.inc
+++ b/mysql-test/suite/galera_3nodes/include/galera_resume.inc
@@ -3,7 +3,7 @@
my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
- system("kill -18 $mysqld_pid");
+ system("kill -SIGCONT $mysqld_pid");
exit(0);
EOF
diff --git a/mysql-test/suite/galera_3nodes/include/galera_suspend.inc b/mysql-test/suite/galera_3nodes/include/galera_suspend.inc
index 3495ad2342b..d4037d8958c 100644
--- a/mysql-test/suite/galera_3nodes/include/galera_suspend.inc
+++ b/mysql-test/suite/galera_3nodes/include/galera_suspend.inc
@@ -9,6 +9,6 @@
my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
- system("kill -19 $mysqld_pid");
+ system("kill -SIGSTOP $mysqld_pid");
exit(0);
EOF
diff --git a/mysql-test/suite/galera_3nodes/include/have_ipv6.inc b/mysql-test/suite/galera_3nodes/include/have_ipv6.inc
deleted file mode 100644
index 560cad03350..00000000000
--- a/mysql-test/suite/galera_3nodes/include/have_ipv6.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-# Check if ipv6 is available.
-#
---disable_query_log
---disable_result_log
-connect (checkcon123456789,::1,root,,test);
-if($mysql_errno)
-{
- skip No IPv6 support;
-}
-connection default;
-disconnect checkcon123456789;
---enable_result_log
---enable_query_log
-# end check
-
diff --git a/mysql-test/suite/galera/include/have_xtrabackup.inc b/mysql-test/suite/galera_3nodes/include/have_mariabackup.inc
index 0dd693f2c63..0dd693f2c63 100644
--- a/mysql-test/suite/galera/include/have_xtrabackup.inc
+++ b/mysql-test/suite/galera_3nodes/include/have_mariabackup.inc
diff --git a/mysql-test/suite/galera_3nodes/r/GAL-501.result b/mysql-test/suite/galera_3nodes/r/GAL-501.result
index a2bf5f4d98c..063e88ec21a 100644
--- a/mysql-test/suite/galera_3nodes/r/GAL-501.result
+++ b/mysql-test/suite/galera_3nodes/r/GAL-501.result
@@ -1,12 +1,18 @@
+connection node_2;
+connection node_1;
+connection node_3;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result b/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result
index b1bbb1406a1..6393a30da6f 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_certification_ccc.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result
index e1528c6f74f..d43b42bec45 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
@@ -11,6 +13,7 @@ connection node_3;
INSERT INTO t2 VALUES (1);
connection node_1;
COMMIT;
-ERROR 40001: Deadlock: wsrep aborted transaction
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_3;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
index 7e0d282ec7f..3543feff78c 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result
@@ -1,12 +1,19 @@
+connection node_2;
+connection node_1;
+connection node_1;
SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S';
+connection node_2;
SET GLOBAL wsrep_provider_options = 'evs.inactive_timeout=PT100M; evs.suspect_timeout=PT1S';
+connection node_3;
Suspending node ...
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
@@ -16,5 +23,6 @@ SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
+connection node_3;
Resuming node ...
CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)");
diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd.result b/mysql-test/suite/galera_3nodes/r/galera_garbd.result
index 180aade029c..88bb3ca2ff9 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_garbd.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_garbd.result
@@ -1,17 +1,31 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
Killing node #3 to free ports for garbd ...
+connection node_1;
Starting garbd ...
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
+connection node_2;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
Killing garbd ...
+connection node_1;
INSERT INTO t1 VALUES (2);
+connection node_2;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
DROP TABLE t1;
Restarting node #3 to satisfy MTR's end-of-test checks
+connection node_3;
+connection node_1;
CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)");
+connection node_2;
CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)");
+connection node_3;
CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)");
diff --git a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result b/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result
deleted file mode 100644
index 85000db8e77..00000000000
--- a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result
+++ /dev/null
@@ -1,11 +0,0 @@
-CREATE TABLE t1 (f1 INTEGER);
-INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-SELECT COUNT(*) = 10 FROM t1;
-COUNT(*) = 10
-1
-Killing server ...
-INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
-SELECT COUNT(*) = 20 FROM t1;
-COUNT(*) = 20
-1
-DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result
index 53e35939a79..8ec1ff090ff 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup.result
@@ -1,18 +1,24 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
+connection node_1;
include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
-include/assert_grep.inc [Prepared IST receiver, listening at: tcp://\[::1\]]
+include/assert_grep.inc [Prepared IST receiver for 3-6, listening at: tcp://\[::1\]]
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result
index f519654952b..bfc210db2ba 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result
@@ -1,11 +1,23 @@
+connection node_2;
+connection node_1;
+call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'");
+call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+CREATE USER 'sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
+connection node_2;
SET GLOBAL wsrep_sst_method = 'mysqldump';
-Unloading wsrep provider ...
-SET GLOBAL wsrep_provider = 'none';
+Shutting down server ...
+connection node_1;
+Cleaning var directory ...
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
-Loading wsrep provider ...
+connection node_2;
+Starting server ...
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
@@ -13,14 +25,16 @@ DROP TABLE t1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
+connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
+connection node_2;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
-CALL mtr.add_suppression("InnoDB: New log files created");
-CALL mtr.add_suppression("InnoDB: Creating foreign key constraint system tables");
CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
+connection node_2;
CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort");
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result
index a2bf5f4d98c..3f810d3eb97 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result
@@ -1,12 +1,17 @@
+connection node_2;
+connection node_1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result
index 3d4dbcc00b0..7780c3f73b8 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
connection node_1;
connection node_2;
connection node_3;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result b/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result
index 4f9951c382f..8211fb8501e 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_3;
@@ -12,7 +14,7 @@ connection node_3;
SELECT f1 = 111 FROM t1;
f1 = 111
1
-SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
+SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
COUNT(*) IN (1, 2)
1
SET GLOBAL wsrep_slave_threads = 1;;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
index 69995acb982..ee49330e892 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
@@ -1,8 +1,15 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER);
+connection node_1;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_3;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait = 0;
+connection node_2;
SET GLOBAL wsrep_provider_options = 'pc.bootstrap=1';
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
@@ -11,15 +18,21 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status Primary
INSERT INTO t1 VALUES (1);
+connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_1;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_3;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
+connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
+connection node_3;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
index 9f845ffe776..3ae983f9550 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -1,9 +1,15 @@
+connection node_2;
+connection node_1;
+connection node_1;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 5
+1
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+connection node_2;
SET SESSION wsrep_sync_wait=0;
SET SESSION wsrep_on=OFF;
SET SESSION wsrep_on=ON;
@@ -12,6 +18,7 @@ Variable_name Value
wsrep_cluster_size 2
SHOW STATUS LIKE 'wsrep_cluster_weight';
Variable_name Value
+wsrep_cluster_weight 0
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
@@ -27,6 +34,7 @@ wsrep_local_state 0
SHOW STATUS LIKE 'wsrep_local_state_comment';
Variable_name Value
wsrep_local_state_comment Initialized
+connection node_3;
SET SESSION wsrep_sync_wait=0;
SET SESSION wsrep_on=OFF;
SET SESSION wsrep_on=ON;
@@ -35,6 +43,7 @@ Variable_name Value
wsrep_cluster_size 2
SHOW STATUS LIKE 'wsrep_cluster_weight';
Variable_name Value
+wsrep_cluster_weight 0
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
@@ -50,8 +59,10 @@ wsrep_local_state 0
SHOW STATUS LIKE 'wsrep_local_state_comment';
Variable_name Value
wsrep_local_state_comment Initialized
+connection node_1;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -70,12 +81,18 @@ VARIABLE_VALUE = 'Synced'
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 1
+1
+connection node_1;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_2;
+connection node_3;
+connection node_1;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -91,11 +108,13 @@ VARIABLE_VALUE = 4
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
+connection node_2;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -111,11 +130,13 @@ VARIABLE_VALUE = 4
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
+connection node_3;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -131,12 +152,15 @@ VARIABLE_VALUE = 4
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
+connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
CALL mtr.add_suppression('WSREP: gcs_caused\\(\\) returned -1');
+connection node_2;
CALL mtr.add_suppression('overriding reported weight for');
CALL mtr.add_suppression('SYNC message from member');
CALL mtr.add_suppression('user message in state LEAVING');
CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)');
+connection node_3;
CALL mtr.add_suppression('WSREP: user message in state LEAVING');
CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)');
CALL mtr.add_suppression('overriding reported weight for');
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 21f747d280b..b87c8743406 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
@@ -1,23 +1,46 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+connection node_2;
+connection node_1;
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+connection node_3;
+connection node_1;
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 1']
+connection node_2;
+connection node_1;
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
+connection node_2;
+connection node_1;
SET SESSION wsrep_on = OFF;
Killing server ...
safe_to_bootstrap: 1
safe_to_bootstrap: 0
safe_to_bootstrap: 0
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_2;
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
+connection node_3;
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
index 88780a2c87f..8e6d27823f6 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
@@ -1,6 +1,11 @@
+connection node_2;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
+connection node_2;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_1;
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_dirty_reads = 1;
SELECT f1 FROM t1;
@@ -45,4 +50,6 @@ SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST;
COUNT(*) > 0
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_1;
+connection node_2;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
new file mode 100644
index 00000000000..23ced3ba734
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
@@ -0,0 +1,82 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+SHOW CREATE TABLE mysql.wsrep_cluster;
+Table Create Table
+wsrep_cluster CREATE TABLE `wsrep_cluster` (
+ `cluster_uuid` char(36) NOT NULL,
+ `view_id` bigint(20) NOT NULL,
+ `view_seqno` bigint(20) NOT NULL,
+ `protocol_version` int(11) NOT NULL,
+ `capabilities` int(11) NOT NULL,
+ PRIMARY KEY (`cluster_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+Table Create Table
+wsrep_cluster_members CREATE TABLE `wsrep_cluster_members` (
+ `node_uuid` char(36) NOT NULL,
+ `cluster_uuid` char(36) NOT NULL,
+ `node_name` char(32) NOT NULL,
+ `node_incoming_address` varchar(256) NOT NULL,
+ PRIMARY KEY (`node_uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster;
+COUNT(*) = 1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 3
+1
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size')
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+COUNT(*) = 1
+1
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+node_incoming_address LIKE '127.0.0.1:%'
+1
+1
+1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+1
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+COUNT(*) = 1
+1
+connection node_2;
+connection node_1;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 2
+1
+connection node_2;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 3
+1
+connection node_1;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid')
+1
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+COUNT(*) = 3
+1
+connection node_1;
+CALL mtr.add_suppression("SYNC message from member");
+connection node_2;
+CALL mtr.add_suppression("SYNC message from member");
+connection node_3;
+CALL mtr.add_suppression("SYNC message from member");
diff --git a/mysql-test/suite/galera_3nodes/suite.pm b/mysql-test/suite/galera_3nodes/suite.pm
index 3a1237ecf75..9882793cb20 100644
--- a/mysql-test/suite/galera_3nodes/suite.pm
+++ b/mysql-test/suite/galera_3nodes/suite.pm
@@ -9,9 +9,9 @@ return "Not run for embedded server" if $::opt_embedded_server;
return "WSREP is not compiled in" unless defined $::mysqld_variables{'wsrep-on'};
my ($provider) = grep { -f $_ } $ENV{WSREP_PROVIDER},
- "/usr/lib64/galera-3/libgalera_smm.so",
+ "/usr/lib64/galera-4/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so",
- "/usr/lib/galera-3/libgalera_smm.so",
+ "/usr/lib/galera-4/libgalera_smm.so",
"/usr/lib/galera/libgalera_smm.so";
return "No wsrep provider library" unless -f $provider;
@@ -21,14 +21,21 @@ $ENV{WSREP_PROVIDER} = $provider;
my ($spath) = grep { -f "$_/wsrep_sst_rsync"; } "$::bindir/scripts", $::path_client_bindir;
return "No SST scripts" unless $spath;
+my ($cpath) = grep { -f "$_/mysql"; } "$::bindir/scripts", $::path_client_bindir;
+return "No scritps" unless $cpath;
+
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
return "No my_print_defaults" unless $epath;
+my ($bpath) = grep { -f "$_/mariabackup"; } "$::bindir/extra/mariabackup", $::path_client_bindir;
+
+sub which($) { return `sh -c "command -v $_[0]"` }
+
push @::global_suppressions,
(
qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
- qr(WSREP: Could not open saved state file for reading: ),
- qr(WSREP: Could not open state file for reading: ),
+ qr(WSREP: Could not open saved state file for reading: .*),
+ qr(WSREP: Could not open state file for reading: .*),
qr(WSREP: Gap in state sequence. Need state transfer.),
qr(WSREP: Failed to prepare for incremental state transfer:),
qr(WSREP:.*down context.*),
@@ -42,16 +49,43 @@ push @::global_suppressions,
qr|WSREP: discarding established \(time wait\) .*|,
qr(WSREP: There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside. Will use that one.),
qr(WSREP: evs::proto.*),
- qr|WSREP: Ignoring possible split-brain (allowed by configuration) from view:.*|,
+ qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|,
qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
+ qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
+ qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
qr(WSREP: Could not find peer:),
- qr(WSREP: Protocol violation. JOIN message sender .*),
- qr(WSREP: JOIN message from member [0-9]* in non-primary configuration. Ignored.),
+ qr|WSREP: gcs_caused\(\) returned .*|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
+ qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
+ qr(WSREP: Action message in non-primary configuration from member [0-9]*),
+ qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
+ qr(WSREP: JOIN message from member .* in non-primary configuration. Ignored.),
);
$ENV{PATH}="$epath:$ENV{PATH}";
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
+$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
+$ENV{PATH}="$bpath:$ENV{PATH}" unless $bpath eq $spath;
+
+if (which(socat)) {
+ $ENV{MTR_GALERA_TFMT}='socat';
+} elsif (which(nc)) {
+ $ENV{MTR_GALERA_TFMT}='nc';
+}
+
+sub skip_combinations {
+ my %skip = ();
+ $skip{'include/have_filekeymanagement.inc'} = 'needs file_key_management plugin'
+ unless $ENV{FILE_KEY_MANAGEMENT_SO};
+ $skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
+ unless which(mariabackup);
+ $skip{'include/have_mariabackup.inc'} = 'Need ss'
+ unless which(ss);
+ $skip{'include/have_mariabackup.inc'} = 'Need socat or nc'
+ unless $ENV{MTR_GALERA_TFMT};
+ %skip;
+}
bless { };
diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.opt b/mysql-test/suite/galera_3nodes/t/GAL-501.opt
new file mode 100644
index 00000000000..c2bb4d156af
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/GAL-501.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.test b/mysql-test/suite/galera_3nodes/t/GAL-501.test
index 60ed5989227..c4b17cdb21e 100644
--- a/mysql-test/suite/galera_3nodes/t/GAL-501.test
+++ b/mysql-test/suite/galera_3nodes/t/GAL-501.test
@@ -5,7 +5,13 @@
# ist.recv_addr=[::1]
--source include/galera_cluster.inc
---source include/have_ipv6.inc
+--source include/check_ipv6.inc
+
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+--connection node_3
+--source include/galera_wait_ready.inc
# Confirm that initial handshake happened over ipv6
diff --git a/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test b/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test
index a2ad0765028..5366d2a4a6e 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_certification_double_failure.test
@@ -29,5 +29,7 @@ INSERT INTO t2 VALUES (1);
--error ER_LOCK_DEADLOCK
COMMIT;
+--connection node_3
+--source include/galera_wait_ready.inc
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
index 03236a3cb93..a4767928681 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test
@@ -60,9 +60,9 @@ DROP TABLE t1;
--source include/galera_resume.inc
--source include/wait_until_connected_again.inc
-CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)");
-
--disable_query_log
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_node3';
--enable_query_log
---source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+CALL mtr.add_suppression("WSREP: gcs_caused() returned -1 \\(Operation not permitted\\)");
diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test
index a68ba8ce15b..81d927894c7 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test
@@ -7,10 +7,21 @@
--source include/have_innodb.inc
--source include/big_test.inc
+# Save galera ports
+--connection node_1
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
+
+--connection node_2
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--source suite/galera/include/galera_base_port.inc
+--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT
+
+--connection node_3
--echo Killing node #3 to free ports for garbd ...
---let $galera_connection_name = node_3
---let $galera_server_number = 3
---source include/galera_connect.inc
--source include/shutdown_mysqld.inc
--connection node_1
@@ -32,7 +43,10 @@ INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
--echo Killing garbd ...
---exec pkill --oldest --full garbd.*$NODE_GALERAPORT_3
+# FreeBSD's /bin/pkill only supports short versions of the options:
+# -o Select only the oldest (least recently started)
+# -f Match against full argument lists
+--exec pkill -o -f garbd.*$NODE_GALERAPORT_3
--sleep 5
diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.cnf b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.cnf
new file mode 100644
index 00000000000..35ecb8b5937
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.cnf
@@ -0,0 +1,4 @@
+!include ../galera_3nodes.cnf
+
+[mysqld]
+wsrep-causal-reads=OFF
diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
deleted file mode 100644
index cc3f42c7290..00000000000
--- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# This test uses innobackupex to take a backup on node #2 and then restores that node from backup
-#
-
---source include/galera_cluster.inc
---source include/have_innodb.inc
-
---connection node_1
-CREATE TABLE t1 (f1 INTEGER);
-INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
-
---connection node_2
-SELECT COUNT(*) = 10 FROM t1;
-
---exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup
---exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log
---exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log
-
---source ../galera/include/kill_galera.inc
---sleep 1
-
---connection node_1
-INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
-
---exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/*
---exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back $MYSQL_TMP_DIR/innobackupex_backup --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log
-
-#
-# Convert the xtrabackup_galera_info into a grastate.dat file
-#
-
---perl
- use strict;
- my $xtrabackup_galera_info_file = $ENV{'MYSQL_TMP_DIR'}.'/innobackupex_backup/xtrabackup_galera_info';
- open(XTRABACKUP_GALERA_INFO, $xtrabackup_galera_info_file) or die "Can not open $xtrabackup_galera_info_file: $!";
- my $xtrabackup_galera_info = <XTRABACKUP_GALERA_INFO>;
- my ($uuid, $seqno) = split(':', $xtrabackup_galera_info);
-
- my $grastate_dat_file = $ENV{'MYSQLTEST_VARDIR'}.'/mysqld.2/data/grastate.dat';
- die "grastate.dat already exists" if -e $grastate_dat_file;
-
- open(GRASTATE_DAT, ">$grastate_dat_file") or die "Can not write to $grastate_dat_file: $!";
- print GRASTATE_DAT "version: 2.1\n";
- print GRASTATE_DAT "uuid: $uuid\n";
- print GRASTATE_DAT "seqno: $seqno\n";
- print GRASTATE_DAT "cert_index:\n";
- exit(0);
-EOF
-
---source include/start_mysqld.inc
---sleep 5
-
---source include/wait_until_connected_again.inc
-SELECT COUNT(*) = 20 FROM t1;
-
-DROP TABLE t1;
-
---sleep 10
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf
index 8a80be0d2a9..969f364a1ec 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.cnf
@@ -1,26 +1,34 @@
!include ../galera_3nodes.cnf
[mysqld]
-wsrep_sst_method=xtrabackup-v2
+wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
+wsrep_node_address=::1
[mysqld.1]
wsrep-cluster-address=gcomm://
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'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
+wsrep_node_name=node_1
[mysqld.2]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
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'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
+wsrep_node_name=node_2
+wsrep_sst_donor=node_1
[mysqld.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
+wsrep_node_name=node_3
+wsrep_sst_donor=node_1
[SST]
+transferfmt=@ENV.MTR_GALERA_TFMT
+streamfmt=xbstream
sockopt=",pf=ip6"
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.opt
new file mode 100644
index 00000000000..c2bb4d156af
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
index 84eee017700..2abb67421c8 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
@@ -1,5 +1,6 @@
--source include/galera_cluster.inc
---source include/have_ipv6.inc
+--source include/check_ipv6.inc
+--source include/have_mariabackup.inc
# Confirm that initial handshake happened over ipv6
@@ -37,26 +38,31 @@ DROP TABLE t1;
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_only_after = CURRENT_TEST
+# The SSTs happen when nodes are started first time
--let $assert_count = 2
--let $assert_text = Streaming the backup to joiner at \[::1\]
--let $assert_select = Streaming the backup to joiner at \[::1\]
--source include/assert_grep.inc
---let $assert_count = 1
+# There will be 3 ISTs donated from node_1 in Galera 4.
+# Two first happen at the initial startup to populate the certification
+# index. The third one is from the IST which happens during the actual test.
+--let $assert_count = 3
--let $assert_text = async IST sender starting to serve tcp://\[::1\]:
--let $assert_select = async IST sender starting to serve tcp://\[::1\]:
--source include/assert_grep.inc
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+# There are two ISTs on joiner, the first at the initial startup, the second
+# during the actual test.
+--let $assert_count = 2
--let $assert_text = IST receiver addr using tcp://\[::1\]
--let $assert_select = IST receiver addr using tcp://\[::1\]
--source include/assert_grep.inc
---let $assert_text = Prepared IST receiver, listening at: tcp://\[::1\]
---let $assert_select = Prepared IST receiver, listening at: tcp://\[::1\]
+# The receiver expects seqnos 3-6 only once.
+--let $assert_count = 1
+--let $assert_text = Prepared IST receiver for 3-6, listening at: tcp://\[::1\]
+--let $assert_select = Prepared IST receiver for 3-6, listening at: tcp://\[::1\]
--source include/assert_grep.inc
-
-
-
-
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf
index 3728e1ce005..80dd0c41cc3 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf
@@ -2,21 +2,25 @@
[mysqld]
wsrep_sst_method=rsync
+wsrep_node_address=::1
[mysqld.1]
wsrep-cluster-address=gcomm://
-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'
+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'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.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'
+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'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
[mysqld.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
+
+[SST]
+sockopt=",pf=ip6"
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt
new file mode 100644
index 00000000000..c2bb4d156af
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test
index 5b06e617eef..4733b686e93 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test
@@ -1,7 +1,21 @@
--source include/galera_cluster.inc
---source include/have_ipv6.inc
+--source include/check_ipv6.inc
+
+call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'");
+call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
+
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+
+# 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 USER 'sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
--let $wsrep_sst_auth_orig = `SELECT @@wsrep_sst_auth`
@@ -17,25 +31,37 @@ SET GLOBAL wsrep_sst_auth = 'sst:';
--enable_query_log
SET GLOBAL wsrep_sst_method = 'mysqldump';
-
#
# Force mysqldump SST
#
---connection node_2
---source suite/galera/include/galera_unload_provider.inc
---remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+#--connection node_2
+#--source suite/galera/include/galera_unload_provider.inc
+
+--echo Shutting down server ...
+--source include/shutdown_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
+--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
+
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
-
--connection node_2
---source suite/galera/include/galera_load_provider.inc
+--echo Starting server ...
+--let $start_mysqld_params = --wsrep_sst_auth=sst: --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=[::1].1:$NODE_MYPORT_2
+--source include/start_mysqld.inc
+
+#--source suite/galera/include/galera_load_provider.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
@@ -51,6 +77,14 @@ DROP TABLE t1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
+# restart node so we don't fail on WSREP_START_POSITION internal check
+--source include/restart_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+--source ../galera/include/auto_increment_offset_restore.inc
--source suite/galera/include/galera_sst_restore.inc
--connection node_2
CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort");
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf
index 3728e1ce005..80dd0c41cc3 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf
@@ -2,21 +2,25 @@
[mysqld]
wsrep_sst_method=rsync
+wsrep_node_address=::1
[mysqld.1]
wsrep-cluster-address=gcomm://
-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'
+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'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.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'
+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'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
[mysqld.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
+
+[SST]
+sockopt=",pf=ip6"
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt
new file mode 100644
index 00000000000..c2bb4d156af
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test
index 7ee209d8e72..1937eb43e13 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test
@@ -1,5 +1,5 @@
--source include/galera_cluster.inc
---source include/have_ipv6.inc
+--source include/check_ipv6.inc
# Confirm that initial handshake happened over ipv6
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
index a67b30e3fa1..9e43c90bfc1 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
@@ -11,7 +11,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
---source suite/galera/include/galera_have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test b/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test
index 7d80d8036a1..659df2b3c93 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_parallel_apply_3nodes.test
@@ -31,7 +31,7 @@ SET GLOBAL wsrep_slave_threads = 2;
--connection node_3
SELECT f1 = 111 FROM t1;
-SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%';
+SELECT COUNT(*) IN (1, 2) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
index 57026ce6928..1a61471d581 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
@@ -1,5 +1,7 @@
-# We need a dedicated .cnf file, even if empty, in order to force this test to run
-# alone on a freshly started cluster. Otherwise there are adverse interactions with
-# following tests such as galera_3nodes.galera_var_dirty_reads2
+# We need a dedicated .cnf file, even if empty, in order to force this test
+# to run alone on a freshly started cluster. Otherwise there are adverse
+# interactions with following tests such as
+# galera_3nodes.galera_var_dirty_reads2
+!include ../galera_3nodes.cnf
!include ../galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
index 0a94e7cd85d..729f14a731f 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
@@ -1,11 +1,11 @@
#
-# Test the pc.weight wsrep provider option. We set Node #1 to have a high weight and then
-# suspend it. This will cause Nodes #2 and #3 to transition to non-primary component.
+# Test the pc.weight wsrep provider option. We set Node #1 to have a high
+# weight and then suspend it. This will cause Nodes #2 and #3 to transition
+# to non-primary component.
#
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
--connection node_1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
@@ -55,6 +55,9 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
--connection node_1
# For Node #1, we expect a primary component of size 1
+# (NOTE: this is a bit racy as nodes 2 and 3 will try to reconnect ASAP.
+# to avoid the raice they should be suspended first as well, but that's
+# not currently possible)
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
index 88d0cfba4f4..722242b22c8 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
@@ -3,6 +3,22 @@
#
--source include/galera_cluster.inc
+
+#
+# Create connection node_3 and save auto increment variables.
+#
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+
+--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;
#
@@ -48,7 +64,6 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
# Shut down one more node
#
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
--source include/shutdown_mysqld.inc
@@ -155,9 +170,18 @@ SET SESSION wsrep_on = OFF;
--connection node_2
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
--connection node_3
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("Aborting");
SHOW CREATE TABLE t1;
DROP TABLE t1;
+
+#
+# Restore auto increment variables.
+#
+--source ../galera/include/auto_increment_offset_restore.inc
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
index 3e8b1557e7b..8e73dee70ae 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_slave_options_ignore.test
@@ -25,6 +25,7 @@ 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;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
index 129ba2e1f38..2ceda1ed352 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
@@ -106,7 +106,8 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
--source include/wait_condition.inc
--connection node_2
---let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
+--source include/galera_wait_ready.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
new file mode 100644
index 00000000000..5c2cae75bd0
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_wsrep_schema.test
@@ -0,0 +1,83 @@
+#
+# This test performs basic checks on the contents of the wsrep_schema
+#
+# wsrep_members_history checks are temporarily disabled until it
+# can be made configurable.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
+# 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
+
+# Make the test fail if table structure has changed
+
+SHOW CREATE TABLE mysql.wsrep_cluster;
+SHOW CREATE TABLE mysql.wsrep_cluster_members;
+#disabled SHOW CREATE TABLE mysql.wsrep_member_history;
+
+# Checks for the wsrep_cluster table
+
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+
+# Checks for the wsrep_cluster_members table
+
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_members;
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+
+SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_members;
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_members;
+
+# Checks for the wsrep_cluster_member_history table
+
+#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history;
+#disabled SELECT COUNT(*) = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size') FROM mysql.wsrep_cluster_member_history;
+SELECT COUNT(*) = 1 FROM mysql.wsrep_cluster_members WHERE node_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid');
+
+#disabled SELECT last_view_id = (SELECT view_id FROM mysql.wsrep_cluster) FROM mysql.wsrep_cluster_member_history;
+#disabled SELECT last_view_seqno = (SELECT view_seqno FROM mysql.wsrep_cluster) FROM mysql.wsrep_cluster_member_history;
+#disabled SELECT node_incoming_address LIKE '127.0.0.1:%' from mysql.wsrep_cluster_member_history;
+#disabled SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster_member_history;
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_members;
+#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history;
+#disabled SELECT COUNT(*) = 2 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history);
+
+--connection node_2
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history);
+
+--connection node_1
+SELECT cluster_uuid = (SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_state_uuid') FROM mysql.wsrep_cluster;
+SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_members;
+#disabled SELECT COUNT(*) = 3 FROM mysql.wsrep_cluster_member_history WHERE last_view_id = (SELECT MAX(last_view_id) FROM mysql.wsrep_cluster_member_history);
+
+--source ../galera/include/auto_increment_offset_restore.inc
+
+--connection node_1
+CALL mtr.add_suppression("SYNC message from member");
+
+--connection node_2
+CALL mtr.add_suppression("SYNC message from member");
+
+--connection node_3
+CALL mtr.add_suppression("SYNC message from member");
diff --git a/mysql-test/suite/galera_3nodes_sr/disabled.def b/mysql-test/suite/galera_3nodes_sr/disabled.def
new file mode 100644
index 00000000000..0944abd0ad5
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/disabled.def
@@ -0,0 +1,7 @@
+GCF-336 :
+GCF-582 :
+GCF-609 :
+GCF-810A :
+GCF-810B :
+GCF-810C :
+galera_sr_kill_slave_after_apply_rollback2 : \ No newline at end of file
diff --git a/mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf
new file mode 100644
index 00000000000..62c8214b8f2
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/galera_3nodes.cnf
@@ -0,0 +1 @@
+!include ../galera_3nodes/galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes_sr/my.cnf b/mysql-test/suite/galera_3nodes_sr/my.cnf
new file mode 100644
index 00000000000..bb25b95ceea
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/my.cnf
@@ -0,0 +1 @@
+!include galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
new file mode 100644
index 00000000000..bb6c11edf36
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
@@ -0,0 +1,26 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+INSERT INTO t1 VALUES (2);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+ERROR 08S01: WSREP has not yet prepared node for application use
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+DROP TABLE t1;
+CALL mtr.add_suppression("replication aborted");
+CALL mtr.add_suppression("WSREP: fragment replication failed: 3");
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
new file mode 100644
index 00000000000..9e2a4823973
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-582.result
@@ -0,0 +1,23 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+5
+COMMIT;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
new file mode 100644
index 00000000000..775f7ee0412
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-606.result
@@ -0,0 +1,38 @@
+connection node_2;
+connection node_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+connection node_1;
+connection node_2a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+SET WSREP_ON=ON;
+connection node_1;
+connection node_2a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_1;
+connection node_1;
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+0
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1
+COMMIT;
+connection node_1;
+SELECT * FROM t1;
+f1
+DROP TABLE t1;
+connection node_2;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result
new file mode 100644
index 00000000000..8fe13c7e2bf
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-609.result
@@ -0,0 +1,20 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+INSERT INTO t1 VALUES (31),(32),(33);
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+0
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+0
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result
new file mode 100644
index 00000000000..9a83ff3c041
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810A.result
@@ -0,0 +1,256 @@
+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
new file mode 100644
index 00000000000..bbec3531a49
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810B.result
@@ -0,0 +1,100 @@
+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
new file mode 100644
index 00000000000..1a6dcbfd392
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-810C.result
@@ -0,0 +1,177 @@
+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/GCF-817.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result
new file mode 100644
index 00000000000..4eb0ebca4f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-817.result
@@ -0,0 +1,54 @@
+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;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_on = OFF;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+connection node_3;
+connection node_1a;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+connection node_3;
+connection node_1a;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1a;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
new file mode 100644
index 00000000000..d670b8c24a0
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
@@ -0,0 +1,26 @@
+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_2;
+SET GLOBAL debug="d,crash_last_fragment_commit_after_fragment_removal";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+COMMIT;
+ERROR HY000: Lost connection to MySQL server during query
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
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
new file mode 100644
index 00000000000..bb4eb829abc
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_isolate_master.result
@@ -0,0 +1,80 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+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_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_3;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_2;
+connection node_3;
+connection node_1a;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_3;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+CALL mtr.add_suppression("failed to send SR rollback for");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result
new file mode 100644
index 00000000000..0260ebec86a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_join_slave.result
@@ -0,0 +1,39 @@
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+COMMIT;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+connection node_2;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+connection node_3;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result
new file mode 100644
index 00000000000..1a179565666
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_master.result
@@ -0,0 +1,33 @@
+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_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_3;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_2;
+Killing server ...
+connection node_3;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result
new file mode 100644
index 00000000000..595bd30d675
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply.result
@@ -0,0 +1,53 @@
+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;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+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);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 15
+1
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 15 FROM t1;
+COUNT(*) = 15
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+connection node_3;
+CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result
new file mode 100644
index 00000000000..239eb748385
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback.result
@@ -0,0 +1,58 @@
+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;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+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);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 15
+1
+connection node_1;
+ROLLBACK;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+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
+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
+1
+DROP TABLE t1;
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
new file mode 100644
index 00000000000..21e301ed353
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_after_apply_rollback2.result
@@ -0,0 +1,31 @@
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+Killing server ...
+INSERT INTO t1 VALUES (6);
+ROLLBACK;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+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
+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
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result
new file mode 100644
index 00000000000..4a135cd9274
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result
@@ -0,0 +1,44 @@
+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;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+LOCK TABLE t2 WRITE;
+connection node_1;
+INSERT INTO t2 VALUES (1);
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result
new file mode 100644
index 00000000000..1a50bace279
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_threeway_split.result
@@ -0,0 +1,117 @@
+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;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (200);
+INSERT INTO t1 VALUES (201);
+INSERT INTO t1 VALUES (202);
+INSERT INTO t1 VALUES (203);
+INSERT INTO t1 VALUES (204);
+connection node_3;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (300);
+INSERT INTO t1 VALUES (301);
+INSERT INTO t1 VALUES (302);
+INSERT INTO t1 VALUES (303);
+INSERT INTO t1 VALUES (304);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1a;
+connection node_2a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_3a;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+connection node_1a;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+connection node_2a;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_3a;
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_sync_wait = 15;
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_1a;
+connection node_2a;
+connection node_3a;
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+wsrep_gcomm_uuid_match
+1
+connection node_3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+COUNT(DISTINCT node_uuid) = 1
+1
+wsrep_gcomm_uuid_match
+1
+connection node_1;
+INSERT INTO t1 VALUES (30);
+INSERT INTO t1 VALUES (31);
+INSERT INTO t1 VALUES (32);
+INSERT INTO t1 VALUES (33);
+INSERT INTO t1 VALUES (34);
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34
+1 1 1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+connection node_2;
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34
+1 1 1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+connection node_3;
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+COUNT(*) = 15 MIN(f1) = 10 MAX(f1) = 34
+1 1 1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=ON;
+DROP TABLE t1;
+connection node_1;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+connection node_2;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+connection node_3;
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
new file mode 100644
index 00000000000..b8d46db74f1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
@@ -0,0 +1,47 @@
+--source include/galera_cluster.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+SET SESSION wsrep_sync_wait=0;
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (2);
+--error ER_UNKNOWN_COM_ERROR
+COMMIT;
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
+DROP TABLE t1;
+
+CALL mtr.add_suppression("replication aborted");
+CALL mtr.add_suppression("WSREP: fragment replication failed: 3");
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_3
+--source include/galera_wait_ready.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
new file mode 100644
index 00000000000..bf19ea84c87
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-582.test
@@ -0,0 +1,39 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_2
+--source include/shutdown_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
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/start_mysqld.inc
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COMMIT;
+SELECT COUNT(*) FROM t1;
+
+--connection node_2
+SELECT COUNT(*) FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
new file mode 100644
index 00000000000..6d49247ab5e
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-606.test
@@ -0,0 +1,80 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the case where the cluster splits 3 ways.
+# The master transitions to a non-prim view and back to prim. Its ongoing
+# should fail to commit.
+#
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+#
+# Isolate node_2 into a separate non-primary component
+#
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+--disable_query_log
+SET WSREP_ON=OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET WSREP_ON=ON;
+--enable_query_log
+
+--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
+
+#
+# Confirm that node_1 has no transactions in SR table
+#
+
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+#
+# Restore cluster
+#
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+
+--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_1
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT * FROM t1;
+COMMIT;
+
+--connection node_1
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-609.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-609.test
new file mode 100644
index 00000000000..fd346cf365b
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-609.test
@@ -0,0 +1,30 @@
+#
+# GCF-609 SR: Assertion wsrep_apply_cb on slave after master causes a duplicate key error
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+INSERT INTO t1 VALUES (31),(32),(33);
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
new file mode 100644
index 00000000000..38d95556e48
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
@@ -0,0 +1,137 @@
+#
+# 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="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="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="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="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="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="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
new file mode 100644
index 00000000000..24a518af9f7
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test
@@ -0,0 +1,49 @@
+#
+# 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="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="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
new file mode 100644
index 00000000000..79948e5a46d
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test
@@ -0,0 +1,70 @@
+#
+# 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="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="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="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="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/GCF-817.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-817.test
new file mode 100644
index 00000000000..a32da959429
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-817.test
@@ -0,0 +1,109 @@
+#
+# GCF-817 SR: master removes SR trx in non-primary view
+#
+
+--source include/galera_cluster.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) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--connection node_1a
+# Force node #1 to go non-primary
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
+
+SET SESSION wsrep_on = OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+# SR table on master should still contain entries after going non-Prim
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# SR table on slave should eventually clean up entries when master goes non-Prim
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--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
+
+# Restore node #1 to primary
+
+--connection node_1a
+#
+# The following sleep is a workaround for issue GCF-861.
+# Normally it's sufficient to make sure that the CC happened
+# by checking that wsrep_cluster_size has shrinked, as above.
+# However that is not always enough, so we sleep a few seconds.
+# See GCF-861 on how to reproduce.
+#
+
+--connection node_1a
+--sleep 6
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
+
+--connection node_3
+--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_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--source include/galera_wait_ready.inc
+
+# SR table on master should contain no entries after going back to Prim state
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+--connection node_2
+# And none on slave
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+# SR table is now empty everywhere
+--connection node_1a
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+DROP TABLE t1;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
new file mode 100644
index 00000000000..c5a6346d6a1
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
@@ -0,0 +1,43 @@
+#
+# GCF-832 SR: mysql.wsrep_streaming_log table remains populated on all nodes after crash
+# followed by immediate recovery
+#
+--source include/galera_cluster.inc
+--source include/have_debug_sync.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_2
+SET GLOBAL debug="d,crash_last_fragment_commit_after_fragment_removal";
+
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+--exec echo "wait" > $_expect_file_name
+
+CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary');
+--error 2013
+COMMIT;
+
+--source include/start_mysqld.inc
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--enable_reconnect
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+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
new file mode 100644
index 00000000000..30fd0192f26
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_isolate_master.test
@@ -0,0 +1,127 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of gmcast.isolate on master during an SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM t1;
+
+#
+# Trigger gmcast.isolate=1 .
+# The transaction is aborted and we expect the SR tables to be cleaned up
+#
+
+--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
+--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
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_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
+
+#
+# Expect that the transaction is cleaned up entirely across the cluster and in all mysql.wsrep_streaming_log tables
+#
+
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_3
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+#
+# Restore cluster
+#
+
+--connection node_1a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+--connection node_2
+--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_3
+--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_1a
+--source include/galera_wait_ready.inc
+
+#
+# Confirm that the previous transaction is gone on Node #1 as well
+#
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Confirm that the transaction can be retried
+#
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+CALL mtr.add_suppression("failed to send SR rollback for");
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test
new file mode 100644
index 00000000000..95aa1a37a78
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test
@@ -0,0 +1,59 @@
+#
+# This test kills the slave before a Streaming Replication transaction has started
+# and restarts it when the transaction is already in progress. IST should
+# bring the slave up to date so that it can receive the complete transaction.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+--connection node_1
+# 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
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_2
+--source include/shutdown_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
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+COMMIT;
+SELECT COUNT(*) = 10 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 10 FROM t1;
+
+--connection node_3
+SELECT COUNT(*) = 10 FROM t1;
+
+--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_kill_master.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test
new file mode 100644
index 00000000000..c7e7528679b
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_master.test
@@ -0,0 +1,58 @@
+#
+# This test kills the master while a Streaming Replication transaction is in progress
+#
+
+--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_2
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_3
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_2
+--source include/kill_galera.inc
+
+--connection node_3
+# We expect that uncommitted values are no longer present
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# and we can insert them again
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 1 FROM t1;
+
+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.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test
new file mode 100644
index 00000000000..270af538085
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply.test
@@ -0,0 +1,81 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# and after a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent
+#
+
+--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
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+
+--connection node_2
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 15 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--connection node_3
+CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member");
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test
new file mode 100644
index 00000000000..c0df6b2777a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback.test
@@ -0,0 +1,80 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# and after a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent even if ROLLBACK
+# is issued on the SR transaction after restart.
+#
+
+--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
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+
+--connection node_2
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 15 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+ROLLBACK;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 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;
+
+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
new file mode 100644
index 00000000000..83964769ef5
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_after_apply_rollback2.test
@@ -0,0 +1,56 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# and after a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--sleep 1
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+ROLLBACK;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--source include/start_mysqld.inc
+--sleep 1
+
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+--connection node_2
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 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;
+
+DROP TABLE t1;
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
new file mode 100644
index 00000000000..92566fa6323
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test
@@ -0,0 +1,73 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in progress
+# but before a fragment has already been applied on the slave. It is expected that
+# after the slave restarts, the cluster will continue to be consistent.
+#
+
+--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;
+
+
+# Block node #2's applier before table t1's inserts have come into play
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+LOCK TABLE t2 WRITE;
+
+--connection node_1
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--source include/kill_galera.inc
+--source include/start_mysqld.inc
+
+# Expect that the SR table will get some entries after the restart
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE t2;
+
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf
new file mode 100644
index 00000000000..910d945949a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.cnf
@@ -0,0 +1,5 @@
+!include ../galera_3nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.weight=3'
+
diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test
new file mode 100644
index 00000000000..62122fe4292
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_threeway_split.test
@@ -0,0 +1,177 @@
+#
+# Test the case where the cluster splits 3 ways . The master remains in the
+# primary component and is able to commit its transaction.
+#
+
+--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;
+
+#
+# Begin a separate SR transaction on every node and confirm that each node
+# has SR table entries for every transaction
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (10);
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (200);
+INSERT INTO t1 VALUES (201);
+INSERT INTO t1 VALUES (202);
+INSERT INTO t1 VALUES (203);
+INSERT INTO t1 VALUES (204);
+
+--connection node_3
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 2 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (300);
+INSERT INTO t1 VALUES (301);
+INSERT INTO t1 VALUES (302);
+INSERT INTO t1 VALUES (303);
+INSERT INTO t1 VALUES (304);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+--connection node_1a
+--let $wait_condition = SELECT COUNT(DISTINCT node_uuid) = 3 FROM mysql.wsrep_streaming_log
+--source include/wait_condition.inc
+
+#
+# Isolate nodes #2 and #3 into separate non-primary components
+#
+
+--connection node_2a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_3a
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+INSERT INTO t1 VALUES (20);
+INSERT INTO t1 VALUES (21);
+INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+
+#
+# Restore cluster
+#
+
+--connection node_2a
+--source include/wsrep_wait_disconnect.inc
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+
+--connection node_3a
+--source include/wsrep_wait_disconnect.inc
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+--source include/galera_wait_ready.inc
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+--let $node_1_gcomm_uuid = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_gcomm_uuid'`
+
+--connection node_2a
+--source include/wait_condition.inc
+
+--connection node_3a
+--source include/wait_condition.inc
+
+
+#
+# Confirm that the rejoined nodes only have node #1's transaction in their SR tables
+#
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+--disable_query_log
+--eval SELECT DISTINCT node_uuid = '$node_1_gcomm_uuid' AS wsrep_gcomm_uuid_match FROM mysql.wsrep_streaming_log;
+--enable_query_log
+
+--connection node_3
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT COUNT(DISTINCT node_uuid) = 1 FROM mysql.wsrep_streaming_log;
+--disable_query_log
+--eval SELECT DISTINCT node_uuid = '$node_1_gcomm_uuid' AS wsrep_gcomm_uuid_match FROM mysql.wsrep_streaming_log;
+--enable_query_log
+
+#
+# Finalize transaction on node #1
+#
+
+--connection node_1
+INSERT INTO t1 VALUES (30);
+INSERT INTO t1 VALUES (31);
+INSERT INTO t1 VALUES (32);
+INSERT INTO t1 VALUES (33);
+INSERT INTO t1 VALUES (34);
+COMMIT;
+
+#
+# Confirm that transaction is replicated correctly and SR tables are empty at the end of the test
+#
+
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SET AUTOCOMMIT=ON;
+
+--connection node_2
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SET AUTOCOMMIT=ON;
+
+--connection node_3
+COMMIT;
+SELECT COUNT(*) = 15, MIN(f1) = 10, MAX(f1) = 34 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SET AUTOCOMMIT=ON;
+
+DROP TABLE t1;
+
+--connection node_1
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+--connection node_2
+CALL mtr.add_suppression("WSREP: failed to send SR rollback for ");
+--connection node_3
+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_sr/disabled.def b/mysql-test/suite/galera_sr/disabled.def
new file mode 100644
index 00000000000..94f328bf31b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/disabled.def
@@ -0,0 +1,3 @@
+mysql-wsrep-features#29 : binlog_format=STATEMENT not supported with SR
+GCF-574 : CTAS is not supported together with SR
+galera_sr_sbr : binlog_format=STATEMENT not supported with SR
diff --git a/mysql-test/suite/galera_sr/galera_2nodes.cnf b/mysql-test/suite/galera_sr/galera_2nodes.cnf
new file mode 100644
index 00000000000..0412b5654dd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/galera_2nodes.cnf
@@ -0,0 +1 @@
+!include ../galera/galera_2nodes.cnf
diff --git a/mysql-test/suite/galera_sr/my.cnf b/mysql-test/suite/galera_sr/my.cnf
new file mode 100644
index 00000000000..ca163a540d9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/my.cnf
@@ -0,0 +1 @@
+!include galera_2nodes.cnf
diff --git a/mysql-test/suite/galera_sr/r/GCF-1008.result b/mysql-test/suite/galera_sr/r/GCF-1008.result
new file mode 100644
index 00000000000..541ac3cddfb
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1008.result
@@ -0,0 +1,70 @@
+connection node_2;
+connection node_1;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'x');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,before_local_commit_monitor_enter';
+connection node_2;
+COMMIT;
+connection node_2b;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+REPLACE INTO t1 VALUES (1,'y');
+connection node_2b;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=before_local_commit_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'x');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,before_certify_apply_monitor_enter';
+connection node_2;
+COMMIT;
+connection node_2b;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+REPLACE INTO t1 VALUES (1,'y');
+connection node_2b;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=before_certify_apply_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1018.result b/mysql-test/suite/galera_sr/r/GCF-1018.result
new file mode 100644
index 00000000000..ec5bdca214c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1018.result
@@ -0,0 +1,24 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) VALUES ('a');
+INSERT INTO t1 (f2) VALUES ('b');
+INSERT INTO t1 (f2) VALUES ('c');
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_certify_apply_monitor_enter';
+connection node_2;
+SET SESSION wsrep_trx_fragment_size = 64;
+DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;;
+connection node_2a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+connection node_1;
+INSERT INTO t1 (f2) VALUES ('d'),('e');
+connection node_2a;
+SET GLOBAL wsrep_provider_options = 'signal=after_certify_apply_monitor_enter';
+SET GLOBAL wsrep_provider_options = 'dbug=';
+connection node_2;
+Got one of the listed errors
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1018B.result b/mysql-test/suite/galera_sr/r/GCF-1018B.result
new file mode 100644
index 00000000000..4752c072cc1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1018B.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1043A.result b/mysql-test/suite/galera_sr/r/GCF-1043A.result
new file mode 100644
index 00000000000..cc90461291d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1043A.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+Running a concurrent test with the following queries:
+DELETE FROM t1
+REPLACE INTO t1 VALUES (1,'y'),(2,'x')
+REPLACE INTO t1 VALUES (1,'y'),(2,'y'),(3,'y')
+connection node_1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+Concurrent test end
diff --git a/mysql-test/suite/galera_sr/r/GCF-1043B.result b/mysql-test/suite/galera_sr/r/GCF-1043B.result
new file mode 100644
index 00000000000..a10295c00b9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1043B.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+Running a concurrent test with the following queries:
+DELETE FROM t1
+INSERT INTO t1 VALUES (1,'y'),(2,'x')
+UPDATE t1 SET f2 = 'y' WHERE f1 = 1 OR f1 = 2;
+connection node_1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+Concurrent test end
diff --git a/mysql-test/suite/galera_sr/r/GCF-1051.result b/mysql-test/suite/galera_sr/r/GCF-1051.result
new file mode 100644
index 00000000000..82fa389bb1d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1051.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size=1;
+connection node_1;
+START TRANSACTION;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (2);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-1060.result b/mysql-test/suite/galera_sr/r/GCF-1060.result
new file mode 100644
index 00000000000..58af97d064b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-1060.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+Running a concurrent test with the following queries:
+TRUNCATE TABLE t1
+INSERT INTO t1 VALUE (1,'x'),(2,'x'),(3,'x')
+INSERT INTO t1 VALUE (4, 'z');
+connection node_1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;;;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE t1;
+Concurrent test end
diff --git a/mysql-test/suite/galera_sr/r/GCF-437.result b/mysql-test/suite/galera_sr/r/GCF-437.result
new file mode 100644
index 00000000000..1aa0c9c0768
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-437.result
@@ -0,0 +1,12 @@
+CREATE TABLE ten (f1 INTEGER) ENGINE=MyISAM;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 2 * 1024 * 1024;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+ERROR HY000: Writing one row to the row-based binary log failed
+CALL mtr.add_suppression("InnoDB: The total blob data length*");
+CALL mtr.add_suppression("WSREP: Error writing into mysql.wsrep_streaming_log: 139");
+CALL mtr.add_suppression("WSREP: Failed to write to frag table: 1");
+CALL mtr.add_suppression("WSREP: Failed to append frag to persistent storage");
+DROP TABLE t1;
+DROP table ten;
diff --git a/mysql-test/suite/galera_sr/r/GCF-561.result b/mysql-test/suite/galera_sr/r/GCF-561.result
new file mode 100644
index 00000000000..58663caf134
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-561.result
@@ -0,0 +1,50 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+ALTER TABLE t1 DROP COLUMN f2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (6, 6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (6, 6);
+ERROR 21S01: Column count doesn't match value count at row 1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+connection node_1;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-571.result b/mysql-test/suite/galera_sr/r/GCF-571.result
new file mode 100644
index 00000000000..4b4f749d910
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-571.result
@@ -0,0 +1,67 @@
+connection node_2;
+connection node_1;
+SET AUTOCOMMIT=OFF;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+SAVEPOINT A;
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+COUNT(*) = 1
+0
+connection node_1;
+ROLLBACK TO SAVEPOINT A;
+connection node_1a;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+COUNT(*) = 1
+0
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+COUNT(*) = 1
+0
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+COUNT(*) = 1
+0
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+COUNT(*) = 1
+0
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-572.result b/mysql-test/suite/galera_sr/r/GCF-572.result
new file mode 100644
index 00000000000..cb4d48b3600
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-572.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(10)) ENGINE=InnoDB;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'node1');
+connection node_1a;
+INSERT INTO t1 VALUES (5, 'node2');
+connection node_1;
+INSERT INTO t1 VALUES (5, 'node1');
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+5 node2
+SET SESSION wsrep_trx_fragment_size = 10000;
+START TRANSACTION;
+INSERT INTO t1 VALUE (10, 'node1');
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+connection node_1a;
+INSERT INTO t1 VALUES(15, 'node2');
+connection node_1;
+SELECT * FROM t1;
+f1 f2
+5 node2
+10 node1
+INSERT INTO t1 VALUES(15, 'node1');
+ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
+COMMIT;
+SELECT * FROM t1;
+f1 f2
+5 node2
+10 node1
+15 node2
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-574.result b/mysql-test/suite/galera_sr/r/GCF-574.result
new file mode 100644
index 00000000000..bbf817c8c6c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-574.result
@@ -0,0 +1,11 @@
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+wsrep_last_committed_delta
+1
+SELECT COUNT(*) = 10000 FROM t1;
+COUNT(*) = 10000
+1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/GCF-580.result b/mysql-test/suite/galera_sr/r/GCF-580.result
new file mode 100644
index 00000000000..3ee69c6c4b3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-580.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+last_committed_matches_fragment_count
+1
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-585.result b/mysql-test/suite/galera_sr/r/GCF-585.result
new file mode 100644
index 00000000000..ab5fed59081
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-585.result
@@ -0,0 +1,28 @@
+connection node_2;
+connection node_1;
+create table t1 (f1 integer primary key) engine=innodb;
+set autocommit=off;
+set session wsrep_trx_fragment_size=1;
+start transaction;
+insert into t1 values (1);
+insert into t1 values (2),(1);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+alter table t1 drop primary key;
+drop table t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+update t1 set f1 = 100 where f1 = 10;
+connection node_2;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+SET SESSION wsrep_trx_fragment_size=1;
+SET SESSION innodb_lock_wait_timeout=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+delete from t1 where f1 > 10;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+delete from t1 where f1 > 10 and f1 < 100;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-597.result b/mysql-test/suite/galera_sr/r/GCF-597.result
new file mode 100644
index 00000000000..7afca229251
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-597.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+ROLLBACK;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-620.result b/mysql-test/suite/galera_sr/r/GCF-620.result
new file mode 100644
index 00000000000..33789f82add
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-620.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 200;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (1);
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 2 FROM t1;
+COUNT(*) = 2
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-623.result b/mysql-test/suite/galera_sr/r/GCF-623.result
new file mode 100644
index 00000000000..f3500b7ac2b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-623.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-627.result b/mysql-test/suite/galera_sr/r/GCF-627.result
new file mode 100644
index 00000000000..891cf4af5a9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-627.result
@@ -0,0 +1,26 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER);
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+connection node_2;
+DROP TABLE t1;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+INSERT INTO t1 VALUES (2);
+ERROR 42S02: Table 'test.t1' doesn't exist
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/GCF-845.result b/mysql-test/suite/galera_sr/r/GCF-845.result
new file mode 100644
index 00000000000..df842049332
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-845.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+CREATE TABLE IF NOT EXISTS t1 (f1 INTEGER) ENGINE = InnoDB;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (161);
+COMMIT;
+DELETE FROM t1 WHERE f1 > 13;
+disconnect node_1a;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+include/assert_grep.inc [No BF-BF log line found]
diff --git a/mysql-test/suite/galera_sr/r/GCF-851.result b/mysql-test/suite/galera_sr/r/GCF-851.result
new file mode 100644
index 00000000000..52aa4c78745
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-851.result
@@ -0,0 +1,30 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+SET SESSION AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (10);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+START TRANSACTION;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+connection node_1;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-867.result b/mysql-test/suite/galera_sr/r/GCF-867.result
new file mode 100644
index 00000000000..9521a86d621
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-867.result
@@ -0,0 +1,4 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-889.result b/mysql-test/suite/galera_sr/r/GCF-889.result
new file mode 100644
index 00000000000..617377de15a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-889.result
@@ -0,0 +1,25 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_on = ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+DELETE FROM t1 WHERE f1 = 1;
+SET SESSION wsrep_trx_fragment_size = 0;
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) = 1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT COUNT(*) = 1;
+COUNT(*) = 1
+1
+CALL mtr.add_suppression("Could not execute Delete_rows event on table");
+CALL mtr.add_suppression("Can't find record in 't1'");
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/GCF-900.result b/mysql-test/suite/galera_sr/r/GCF-900.result
new file mode 100644
index 00000000000..caa2d2c4138
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/GCF-900.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 128;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 0);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2, 0);
+connection node_2;
+ALTER TABLE t1 DROP COLUMN f2;
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1a;
+INSERT INTO t1 VALUES (3, 0);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera-features#56.result b/mysql-test/suite/galera_sr/r/galera-features#56.result
new file mode 100644
index 00000000000..1d04b6f9cee
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera-features#56.result
@@ -0,0 +1,32 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 4;
+SET SESSION wsrep_trx_fragment_size = 1;
+connection node_1;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
+connection node_1a;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
+connection node_2;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;;
+connection node_1;
+connection node_1a;
+connection node_2;
+SELECT COUNT(*) = 30000 FROM t1;
+COUNT(*) = 30000
+1
+SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
+COUNT(DISTINCT f1) = 30000
+1
+SELECT COUNT(*) = 6 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+COUNT(*) = 6
+0
+connection default;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result b/mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result
new file mode 100644
index 00000000000..bf92a48b242
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_bf_abort.result
@@ -0,0 +1,555 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+galera_sr_bf_abort_at_commit = 0
+after_replicate_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+INSERT INTO t1 VALUES (3);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+galera_sr_bf_abort_at_commit = 1
+after_replicate_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+local_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+apply_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+commit_monitor_master_enter_sync
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+f1
+1
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
+connection node_1;
+ROLLBACK;
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+connection node_1;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+DROP TABLE t1;
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_blob.result b/mysql-test/suite/galera_sr/r/galera_sr_blob.result
new file mode 100644
index 00000000000..db25f54a611
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_blob.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 TEXT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+connection node_2;
+wsrep_last_committed_delta
+1
+connection node_1;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT LENGTH(f1) = 65535 FROM t1;
+LENGTH(f1) = 65535
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result
new file mode 100644
index 00000000000..79bc29200f9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result
@@ -0,0 +1,65 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET SESSION wsrep_sync_wait=0;
+SET GLOBAL wsrep_cluster_address = '';
+SET SESSION wsrep_sync_wait = DEFAULT;
+connection node_2;
+INSERT INTO t1 VALUES (6);
+ERROR HY000: Lost connection to MySQL server during query
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2a;
+connection node_1;
+connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2b;
+SELECT * FROM mysql.wsrep_streaming_log;
+node_uuid trx_id seqno flags frag
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+connection node_2b;
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
+disconnect node_2;
+connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
new file mode 100644
index 00000000000..671745c8686
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
@@ -0,0 +1,59 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SET GLOBAL wsrep_cluster_address = '';
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_sync_wait = default;
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (16);
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+CALL mtr.add_suppression("points to own listening address, blacklisting");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_concurrent.result b/mysql-test/suite/galera_sr/r/galera_sr_concurrent.result
new file mode 100644
index 00000000000..75acba366c2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_concurrent.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+connection node_1;
+COMMIT;
+connection node_1a;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 5 FROM t2;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict.result
new file mode 100644
index 00000000000..a45bffeaa81
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict.result
@@ -0,0 +1,21 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+INSERT INTO t1 VALUES(1);;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_1;
+COMMIT;
+connection node_2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result
new file mode 100644
index 00000000000..5de1ac2422c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit.result
@@ -0,0 +1,31 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result
new file mode 100644
index 00000000000..2ee3d4c714c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict_on_commit2.result
@@ -0,0 +1,28 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+INSERT INTO t1 VALUES (5);;
+connection node_1;
+COMMIT;
+connection node_2;
+ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result b/mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result
new file mode 100644
index 00000000000..92bf007e21b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_conflict_with_rollback_master.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+ROLLBACK;
+connection node_2;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
new file mode 100644
index 00000000000..cf9c7771bed
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
@@ -0,0 +1,48 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_1;
+INSERT INTO t1 VALUES (6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+ROLLBACK;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+INSERT INTO t1 (f1) VALUES (2);
+INSERT INTO t1 (f1) VALUES (3);
+INSERT INTO t1 (f1) VALUES (4);
+INSERT INTO t1 (f1) VALUES (5);
+INSERT INTO t1 (f1) VALUES (6);
+COMMIT;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result
new file mode 100644
index 00000000000..fcd6cfa4a6e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_schema.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+DROP SCHEMA test;
+SELECT COUNT(*) = 0 FROM test.t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+connection node_1;
+INSERT INTO test.t1 VALUES (6, 6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+INSERT INTO test.t1 VALUES (6, 6);
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result
new file mode 100644
index 00000000000..58663caf134
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_slave.result
@@ -0,0 +1,50 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+ALTER TABLE t1 DROP COLUMN f2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (6, 6);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (6, 6);
+ERROR 21S01: Column count doesn't match value count at row 1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+connection node_1;
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result b/mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result
new file mode 100644
index 00000000000..0f23ade58c1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ddl_unrelated.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+ALTER TABLE t2 DROP COLUMN f2;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (6, 6);
+connection node_2;
+connection node_1;
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result b/mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result
new file mode 100644
index 00000000000..b23b934da33
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_dupkey_error.result
@@ -0,0 +1,46 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
+CREATE UNIQUE INDEX i1 ON t1 (f1(512));
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1024;
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+COMMIT;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result b/mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result
new file mode 100644
index 00000000000..1d12533cc1d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_fk_conflict.result
@@ -0,0 +1,39 @@
+connection node_2;
+connection node_1;
+CREATE TABLE grandparent (
+id INT NOT NULL PRIMARY KEY
+) ENGINE=InnoDB;
+CREATE TABLE parent (
+id INT NOT NULL PRIMARY KEY,
+grandparent_id INT,
+FOREIGN KEY (grandparent_id)
+REFERENCES grandparent(id)
+ON UPDATE CASCADE
+) ENGINE=InnoDB;
+CREATE TABLE child (
+id INT NOT NULL PRIMARY KEY,
+grandparent_id INT,
+FOREIGN KEY (grandparent_id)
+REFERENCES parent(grandparent_id)
+ON UPDATE CASCADE
+) ENGINE=InnoDB;
+INSERT INTO grandparent VALUES (1),(2),(3),(4);
+INSERT INTO parent VALUES (1,1), (2,2);
+INSERT INTO child VALUES (1,1), (2,2);
+connection node_1;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+UPDATE grandparent SET id = 5 WHERE id = 1;
+connection node_2;
+SET SESSION innodb_lock_wait_timeout = 1;
+UPDATE grandparent SET id = 10 WHERE id = 5;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DELETE FROM child;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection node_1;
+COMMIT;
+include/diff_servers.inc [servers=1 2]
+DROP TABLE child;
+DROP TABLE parent;
+DROP TABLE grandparent;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_gtid.result b/mysql-test/suite/galera_sr/r/galera_sr_gtid.result
new file mode 100644
index 00000000000..be631d1d916
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_gtid.result
@@ -0,0 +1,57 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SET SESSION wsrep_trx_fragment_size=1;
+UPDATE t1 SET f1 = 2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=0;
+connection node_2;
+SET SESSION wsrep_trx_fragment_size=0;
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000002 <Pos> Gtid_list 1 <End_log_pos> []
+mysqld-bin.000002 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000002 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000002
+mysqld-bin.000002 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000002 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INT PRIMARY KEY)
+mysqld-bin.000002 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000002 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000002 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000002 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000002 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000002 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000002 <Pos> Annotate_rows 2 <End_log_pos> UPDATE t1 SET f1 = 2
+mysqld-bin.000002 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000002 <Pos> Update_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000002 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+connection node_2;
+SELECT 1 FROM DUAL;
+1
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000003 <Pos> Gtid_list 2 <End_log_pos> []
+mysqld-bin.000003 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000003
+mysqld-bin.000003 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000003 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INT PRIMARY KEY)
+mysqld-bin.000003 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000003 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000003 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000003 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000003 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000003 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000003 <Pos> Annotate_rows 2 <End_log_pos> UPDATE t1 SET f1 = 2
+mysqld-bin.000003 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000003 <Pos> Update_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000003 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_insert_select.result b/mysql-test/suite/galera_sr/r/galera_sr_insert_select.result
new file mode 100644
index 00000000000..0302290123d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_insert_select.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_2;
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result
new file mode 100644
index 00000000000..a78926a9794
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_nobootstrap.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+Killing server ...
+connection node_1;
+connection node_2;
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
new file mode 100644
index 00000000000..7525cd6d4b7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
@@ -0,0 +1,30 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+Killing server ...
+connection node_1;
+connection node_2;
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+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
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result
new file mode 100644
index 00000000000..7525cd6d4b7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_all_pcrecovery.result
@@ -0,0 +1,30 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+Killing server ...
+connection node_1;
+connection node_2;
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+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
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result
new file mode 100644
index 00000000000..96a85bc038b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_connection.result
@@ -0,0 +1,32 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1a;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_query.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
new file mode 100644
index 00000000000..59942e717e7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
@@ -0,0 +1,31 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;;
+connection node_2;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+Killing query ...
+connection node_1;
+ERROR 70100: Query execution was interrupted
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
+SELECT COUNT(*) = 1000 FROM t1;
+COUNT(*) = 1000
+1
+connection node_1a;
+SELECT COUNT(*) = 1000 FROM t1;
+COUNT(*) = 1000
+1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result
new file mode 100644
index 00000000000..b4e84b1b72a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_kill_slave.result
@@ -0,0 +1,53 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+CREATE TABLE t2 (f1 INTEGER);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+LOCK TABLE t2 WRITE;
+connection node_1;
+INSERT INTO t2 VALUES (1);
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+Killing server ...
+connection node_1;
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+connection node_2;
+connection node_1;
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 15 FROM t1;
+COUNT(*) = 15
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result b/mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result
new file mode 100644
index 00000000000..bf111f5cee4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_large_fragment.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1024 * 1024 * 10;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 50000 FROM t1;
+COUNT(*) > 50000
+1
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_load_data.result b/mysql-test/suite/galera_sr/r/galera_sr_load_data.result
new file mode 100644
index 00000000000..a474a7e3ae8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_load_data.result
@@ -0,0 +1,13 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 512;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+connection node_2;
+SELECT COUNT(*) = 20000 FROM t1;
+COUNT(*) = 20000
+1
+wsrep_last_committed_diff
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result b/mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result
new file mode 100644
index 00000000000..b25a8877005
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_load_data_splitting.result
@@ -0,0 +1,9 @@
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_load_data_splitting = TRUE;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SELECT COUNT(*) = 95000 FROM t1;
+COUNT(*) = 95000
+1
+wsrep_last_committed_diff
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_log_bin.result b/mysql-test/suite/galera_sr/r/galera_sr_log_bin.result
new file mode 100644
index 00000000000..cb8e84383bc
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_log_bin.result
@@ -0,0 +1,124 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t3 VALUES (1);
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t4 VALUES (1);
+connection node_1;
+INSERT INTO t1 VALUES (2);
+COMMIT;
+connection node_1a;
+INSERT INTO t2 VALUES (2);
+COMMIT;
+connection node_2;
+INSERT INTO t3 VALUES (2);
+COMMIT;
+connection node_2a;
+INSERT INTO t4 VALUES (2);
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 2 FROM t4;
+COUNT(*) = 2
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-1
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-4
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+connection node_2;
+SELECT COUNT(*) = 2 FROM t4;
+COUNT(*) = 2
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 2 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-1
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t2 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t2)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-3
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t3 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t3)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 2 <End_log_pos> BEGIN GTID 0-2-4
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (1)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 2 <End_log_pos> INSERT INTO t4 VALUES (2)
+mysqld-bin.000001 <Pos> Table_map 2 <End_log_pos> table_id: ### (test.t4)
+mysqld-bin.000001 <Pos> Write_rows_v1 2 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 2 <End_log_pos> COMMIT /* xid=### */
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result b/mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result
new file mode 100644
index 00000000000..8c89d100260
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_many_fragments.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 10000 FROM t1;
+COUNT(*) = 10000
+1
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
+COUNT(*) = 0
+1
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_myisam.result b/mysql-test/suite/galera_sr/r/galera_sr_myisam.result
new file mode 100644
index 00000000000..97818f072e1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_myisam.result
@@ -0,0 +1,16 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 TEXT) ENGINE=MyISAM;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET GLOBAL wsrep_replicate_myisam = TRUE;
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT LENGTH(f1) = 65535 FROM t1;
+LENGTH(f1) = 65535
+1
+DROP TABLE t1;
+connection node_1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result
new file mode 100644
index 00000000000..f1b60c7f76a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result
@@ -0,0 +1,58 @@
+connection node_2;
+connection node_1;
+Setting SST method to mysqldump ...
+call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
+call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
+connection node_1;
+CREATE USER 'sst';
+GRANT ALL PRIVILEGES ON *.* TO 'sst';
+SET GLOBAL wsrep_sst_auth = 'sst:';
+connection node_2;
+SET GLOBAL wsrep_sst_method = 'mysqldump';
+connection node_1;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 255) FROM ten AS a1, ten AS a2, ten AS a3;
+UPDATE t1 SET f2 = REPEAT('y', 255);
+connection node_2;
+connection node_2;
+Shutting down server ...
+connection node_1;
+connection node_2;
+Starting server ...
+connection node_1;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+UPDATE t1 SET f2 = REPEAT('z', 255);
+COMMIT;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 1000 FROM t1;
+COUNT(*) = 1000
+1
+SELECT COUNT(*) = 1000 FROM t1 WHERE f2 = REPEAT('z', 255);
+COUNT(*) = 1000
+1
+DROP TABLE t1;
+DROP TABLE ten;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size=0;
+connection node_1;
+CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+DROP USER sst;
+connection node_2;
+CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
+CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
+CALL mtr.add_suppression("Can't open and lock time zone table");
+CALL mtr.add_suppression("Can't open and lock privilege tables");
+CALL mtr.add_suppression("Info table is not ready to be used");
+CALL mtr.add_suppression("Native table .* has the wrong structure");
+CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result b/mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result
new file mode 100644
index 00000000000..e2194e08cb8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_parallel_apply.result
@@ -0,0 +1,37 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 5;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_1a;
+ROLLBACK;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+DROP TABLE t1;
+connection node_2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback.result
new file mode 100644
index 00000000000..4b275c6e0b6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+ROLLBACK;
+connection node_2;
+connection node_1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+COMMIT;
+connection node_2;
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result
new file mode 100644
index 00000000000..054f7cf2eae
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_retry.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+connection node_1;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result
new file mode 100644
index 00000000000..f2efa20f0d3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_savepoint.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+ROLLBACK TO SAVEPOINT s1;
+INSERT INTO t1 VALUES (21, 'c');
+INSERT INTO t1 VALUES (22, 'c');
+INSERT INTO t1 VALUES (23, 'c');
+INSERT INTO t1 VALUES (24, 'c');
+INSERT INTO t1 VALUES (25, 'c');
+connection node_2;
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'a';
+COUNT(*) = 5
+1
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 0
+0
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 5
+1
+connection node_1;
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result b/mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result
new file mode 100644
index 00000000000..21e6ef4b057
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_rollback_statement.result
@@ -0,0 +1,22 @@
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3;
+ALTER TABLE t1 CHANGE f1 f1 INTEGER;
+ALTER TABLE t1 DROP PRIMARY KEY;
+INSERT INTO t1 VALUES (1, 'abc');
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t2 SELECT * FROM t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+INSERT INTO t2 VALUES (1, 'abc');
+INSERT INTO t2 VALUES (2, 'abc');
+SELECT COUNT(*) = 2 FROM t2;
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 2 FROM t2;
+COUNT(*) = 2
+1
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_sbr.result b/mysql-test/suite/galera_sr/r/galera_sr_sbr.result
new file mode 100644
index 00000000000..c83db3d5ea6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_sbr.result
@@ -0,0 +1,16 @@
+CREATE TABLE t1 (id INT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET SESSION BINLOG_FORMAT='STATEMENT';
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+COMMIT;
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result
new file mode 100644
index 00000000000..eb493f66ed6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_master.result
@@ -0,0 +1,31 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1),(2),(3);
+connection node_1;
+connection node_2;
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1),(2),(3);
+connection node_1;
+SELECT COUNT(*) = 3 FROM t1;
+COUNT(*) = 3
+1
+DROP TABLE t1;
+connection node_2;
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for ");
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
new file mode 100644
index 00000000000..568452b10b0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
@@ -0,0 +1,43 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13);
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21),(22),(23);
+connection node_2;
+connection node_1;
+connection node_1a;
+INSERT INTO t1 VALUES (14),(15),(16);
+COMMIT;
+connection node_2;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) > 0
+1
+SELECT COUNT(*) = 6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
+COUNT(*) = 6
+1
+connection node_1b;
+INSERT INTO t1 VALUES (24),(25),(26);
+COMMIT;
+connection node_2;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 12 FROM t1;
+COUNT(*) = 12
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result b/mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result
new file mode 100644
index 00000000000..875f2df5214
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_small_gcache.result
@@ -0,0 +1,15 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SELECT COUNT(*) = 10000 FROM t1;
+COUNT(*) = 10000
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_table_contents.result b/mysql-test/suite/galera_sr/r/galera_sr_table_contents.result
new file mode 100644
index 00000000000..29bb71704e2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_table_contents.result
@@ -0,0 +1,198 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3);
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+Start of Simple Insert
+INSERT INTO t1 VALUES (4);
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 73 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
+SET TIMESTAMP=<TIMESTAMP>/*!*/;
+/*!\C latin1 *//*!*/;
+BEGIN
+/*!*/;
+# at 193
+<ISO TIMESTAMP> server id 1 end_log_pos 114 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 234
+<ISO TIMESTAMP> server id 1 end_log_pos 150 Write_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+End of Simple Insert
+
+ROLLBACK;
+Start of Multi-row Update
+UPDATE t1 SET f1 = f1 + 10;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 73 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
+SET TIMESTAMP=<TIMESTAMP>/*!*/;
+/*!\C latin1 *//*!*/;
+BEGIN
+/*!*/;
+# at 193
+<ISO TIMESTAMP> server id 1 end_log_pos 114 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 234
+<ISO TIMESTAMP> server id 1 end_log_pos 156 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 197 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 239 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 280 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 322 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+End of Multi-row Update
+
+ROLLBACK;
+Start of Multi-table Update
+UPDATE t1, t2 SET t1.f1 = t1.f1 + 100, t2.f1 = t2.f1 + 100;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 82 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
+SET TIMESTAMP=<TIMESTAMP>/*!*/;
+/*!\C latin1 *//*!*/;
+BEGIN
+/*!*/;
+# at 202
+<ISO TIMESTAMP> server id 1 end_log_pos 123 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 243
+<ISO TIMESTAMP> server id 1 end_log_pos 164 Table_map: `test`.`t2` mapped to number <TABLE_ID>
+# at 284
+<ISO TIMESTAMP> server id 1 end_log_pos 206 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 247 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 288 Table_map: `test`.`t2` mapped to number <TABLE_ID>
+# at 202
+<ISO TIMESTAMP> server id 1 end_log_pos 330 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 371 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 412 Table_map: `test`.`t2` mapped to number <TABLE_ID>
+# at 202
+<ISO TIMESTAMP> server id 1 end_log_pos 454 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 495 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 536 Table_map: `test`.`t2` mapped to number <TABLE_ID>
+# at 202
+<ISO TIMESTAMP> server id 1 end_log_pos 578 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 619 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 660 Table_map: `test`.`t2` mapped to number <TABLE_ID>
+# at 202
+<ISO TIMESTAMP> server id 1 end_log_pos 702 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 743 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 784 Table_map: `test`.`t2` mapped to number <TABLE_ID>
+# at 202
+<ISO TIMESTAMP> server id 1 end_log_pos 826 Update_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+End of Multi-table Update
+
+ROLLBACK;
+Start of Savepoint
+INSERT INTO t1 VALUES (1000);
+SAVEPOINT X;
+INSERT INTO t1 VALUES (2000);
+ROLLBACK TO SAVEPOINT X;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 73 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
+SET TIMESTAMP=<TIMESTAMP>/*!*/;
+/*!\C latin1 *//*!*/;
+BEGIN
+/*!*/;
+# at 193
+<ISO TIMESTAMP> server id 1 end_log_pos 114 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 234
+<ISO TIMESTAMP> server id 1 end_log_pos 150 Write_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 231 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
+SET TIMESTAMP=<TIMESTAMP>/*!*/;
+/*!\C latin1 *//*!*/;
+SAVEPOINT `X`
+/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 272 Table_map: `test`.`t1` mapped to number <TABLE_ID>
+# at 161
+<ISO TIMESTAMP> server id 1 end_log_pos 308 Write_rows: table id <TABLE_ID> flags: STMT_END_F
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+DELIMITER /*!*/;
+# at 120
+<ISO TIMESTAMP> server id 1 end_log_pos 391 Query thread_id=<QUERY_THREAD_ID> exec_time=<EXEC_TIME> error_code=0
+SET TIMESTAMP=<TIMESTAMP>/*!*/;
+/*!\C latin1 *//*!*/;
+ROLLBACK TO `X`
+/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+End of Savepoint
+
+ROLLBACK;
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result b/mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result
new file mode 100644
index 00000000000..5806ab5558d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_transaction_replay.result
@@ -0,0 +1,121 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+wsrep_local_replays
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DELETE FROM t1;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'x' WHERE f1 = 1;
+SET SESSION wsrep_trx_fragment_size = 0;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+connection node_1a;
+SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_2;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
+connection node_1;
+COMMIT;
+connection node_1a;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
+SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+wsrep_local_replays
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DELETE FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result b/mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result
new file mode 100644
index 00000000000..4e3bd52483e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_unit_statements.result
@@ -0,0 +1,54 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 3;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+0
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_1;
+INSERT INTO t1 VALUES (2);
+connection node_2;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+1
+connection node_1;
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+2
+connection node_1;
+COMMIT;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+connection node_2;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+5
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+COUNT(*)
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result b/mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result
new file mode 100644
index 00000000000..ab090e5c2a7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_v1_row_events.result
@@ -0,0 +1,20 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_1;
+COMMIT;
+SET AUTOCOMMIT=ON;
+UPDATE t1 SET f1 = 2 WHERE f1 = 1;
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+COUNT(*) = 1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result
new file mode 100644
index 00000000000..b7bdd94dd68
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result
@@ -0,0 +1,36 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=4096';
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+COMMIT;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 100 FROM t1;
+COUNT(*) = 100
+1
+DROP TABLE t1;
+DROP TABLE ten;
+connection node_1;
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result
new file mode 100644
index 00000000000..6bd8b6b8212
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result
@@ -0,0 +1,34 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+SET SESSION wsrep_trx_fragment_size = 256;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=128';
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1, ten AS a2;
+Got one of the listed errors
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE ten;
+call mtr.add_suppression('WSREP: SR rollback replication failure.*');
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: SR rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
+call mtr.add_suppression('WSREP: fragment replication failed:');
+call mtr.add_suppression('WSREP: post commit failed for SR rollback');
+call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*');
+call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *');
diff --git a/mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result b/mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result
new file mode 100644
index 00000000000..852208437e5
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_var_ignore_apply_errors_sr.result
@@ -0,0 +1,29 @@
+connection node_2;
+connection node_1;
+connection node_2;
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SET SESSION wsrep_trx_fragment_size = 0;
+DROP TABLE t1;
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Can't find record in 't1'");
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep#215.result b/mysql-test/suite/galera_sr/r/mysql-wsrep#215.result
new file mode 100644
index 00000000000..623bef4c3c4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep#215.result
@@ -0,0 +1,137 @@
+connection node_2;
+connection node_1;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 2;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);;
+connection node_1a;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1a;
+SET DEBUG_SYNC = 'RESET';
+connection node_1;
+TRUNCATE TABLE t1;
+SET SESSION wsrep_trx_fragment_size = 10;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+SELECT * FROM t1;
+f1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT * FROM t1;
+f1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1a;
+SET DEBUG_SYNC = 'RESET';
+connection node_1;
+TRUNCATE TABLE t1;
+SET SESSION wsrep_trx_fragment_size = 200;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+connection node_2;
+INSERT INTO t1 VALUES (1);
+connection node_1a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+connection node_1a;
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+connection node_1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_1a;
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+connection node_2;
+CALL mtr.add_suppression("WSREP: Could not find applier context for");
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result
new file mode 100644
index 00000000000..25bc2e11a3e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#136.result
@@ -0,0 +1,65 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+COMMIT;
+SET SESSION wsrep_trx_fragment_size = 0;
+INSERT INTO t1 VALUES (3),(4);
+COMMIT;
+connection node_1;
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 1 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 1 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (3),(4)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+connection node_2;
+SELECT COUNT(*) = 4 FROM t1;
+COUNT(*) = 4
+1
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-bin.000001 <Pos> Gtid_list 2 <End_log_pos> []
+mysqld-bin.000001 <Pos> Binlog_checkpoint 2 <End_log_pos> mysqld-bin.000001
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> GTID 0-1-1
+mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-2
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (1),(2)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+mysqld-bin.000001 <Pos> Gtid 1 <End_log_pos> BEGIN GTID 0-1-3
+mysqld-bin.000001 <Pos> Annotate_rows 1 <End_log_pos> INSERT INTO t1 VALUES (3),(4)
+mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
+mysqld-bin.000001 <Pos> Write_rows_v1 1 <End_log_pos> table_id: ### flags: STMT_END_F
+mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result
new file mode 100644
index 00000000000..fc9afd6e1e0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#138.result
@@ -0,0 +1,24 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+connection node_2;
+SELECT flags FROM mysql.wsrep_streaming_log;
+flags
+1
+0
+connection node_1;
+ROLLBACK;
+INSERT INTO t1 VALUES (3),(4);
+connection node_2;
+SELECT flags FROM mysql.wsrep_streaming_log;
+flags
+1
+0
+connection node_1;
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result
new file mode 100644
index 00000000000..b09c7d4047a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#14.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+COMMIT;
+DROP TABLE t1;
+connection node_2;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
new file mode 100644
index 00000000000..a85c0f302d0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
@@ -0,0 +1,42 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL DEBUG = 'd,sync.wsrep_apply_cb';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1a;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);;
+connection node_1;
+INSERT INTO t1 SELECT * FROM t2;;
+connection node_1a;
+INSERT INTO t1 VALUES (6), (7), (8), (9), (10);
+COMMIT;
+connection node_1;
+Got one of the listed errors
+connection node_2;
+SET GLOBAL wsrep_slave_threads = 1;
+SET GLOBAL DEBUG = '';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result
new file mode 100644
index 00000000000..610019e2b48
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#15.result
@@ -0,0 +1,11 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (id INT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result
new file mode 100644
index 00000000000..fe0761d186d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#165.result
@@ -0,0 +1,752 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+START TRANSACTION;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (3, 'c');
+SELECT * FROM t1;
+f1 f2
+1 x
+2 x
+4 x
+5 x
+UPDATE t1 SET f2 = 'a' WHERE f1 = 2;
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+SET DEBUG_SYNC = 'now SIGNAL continue';
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+SELECT * FROM t1;
+f1 f2
+1 a
+2 a
+3 x
+4 a
+5 a
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result
new file mode 100644
index 00000000000..0053619187c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#22.result
@@ -0,0 +1,35 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+connection node_1;
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+connection node_2;
+connection node_1;
+ROLLBACK TO SAVEPOINT s1;
+INSERT INTO t1 VALUES (21, 'c');
+COMMIT;
+connection node_1;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+1
+connection node_2;
+SELECT COUNT(*) = 6 FROM t1;
+COUNT(*) = 6
+0
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result
new file mode 100644
index 00000000000..4cbcd49dd24
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#27.result
@@ -0,0 +1,23 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+connection node_1;
+COMMIT;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
new file mode 100644
index 00000000000..29b17ea07d6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
@@ -0,0 +1,14 @@
+SET SESSION wsrep_trx_fragment_size = 1;
+SET SESSION binlog_format = STATEMENT;
+create table t1 (id int not null, f_id int not null, f int not null,
+primary key(f_id, id)) engine=innodb;
+create table t2 (id int not null,s_id int not null,s varchar(200),
+primary key(id)) engine=innodb;
+INSERT INTO t1 VALUES (8, 1, 3);
+INSERT INTO t1 VALUES (1, 2, 1);
+INSERT INTO t2 VALUES (1, 0, '');
+INSERT INTO t2 VALUES (8, 1, '');
+DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
+WHERE mm.id IS NULL;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result
new file mode 100644
index 00000000000..ca749a45e9a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#32.result
@@ -0,0 +1,27 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+SET AUTOCOMMIT=OFF;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+START TRANSACTION;
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (5);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ROLLBACK;
+connection node_1;
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
new file mode 100644
index 00000000000..41657d7340a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
@@ -0,0 +1,41 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL debug = '+d,sync.wsrep_apply_cb';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+connection node_2a;
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+INSERT INTO t1 VALUES (1);;
+connection node_1;
+COMMIT;
+connection node_2a;
+SET GLOBAL debug = '';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+connection node_2;
+Got one of the listed errors
+ROLLBACK;
+DROP TABLE t1;
+connection node_2a;
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result
new file mode 100644
index 00000000000..56905c03e10
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#8.result
@@ -0,0 +1,39 @@
+connection node_2;
+connection node_1;
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+connection node_1;
+CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
+connection node_2;
+SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
+COUNT(*) = 13
+1
+connection node_1;
+INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+connection node_2;
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
+COUNT(f2) = 10000
+1
+UPDATE t1 SET f2 = 'abcdefjhk';
+connection node_1;
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
+COUNT(f2) = 10000
+1
+connection node_2;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
+connection node_2;
+INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
+connection node_1;
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz');
+COUNT(f1) = 1000
+1
+UPDATE t1 SET f1 = 'abcdefjhk';
+connection node_2;
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
+COUNT(f1) = 1000
+1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result
new file mode 100644
index 00000000000..990ea47f8bc
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#9.result
@@ -0,0 +1,20 @@
+connection node_2;
+connection node_1;
+connection node_1;
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+connection node_2;
+Killing server ...
+connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+connection node_2a;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
+COUNT(*) = 2
+1
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 2
+1
+connection node_1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result
new file mode 100644
index 00000000000..17f71213767
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#93.result
@@ -0,0 +1,18 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+START TRANSACTION;
+SAVEPOINT a;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT a;
+INSERT INTO t1 values (2);
+COMMIT;
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+connection node_2;
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result
new file mode 100644
index 00000000000..dbe91aad9fd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/mysql-wsrep-features#96.result
@@ -0,0 +1,33 @@
+connection node_2;
+connection node_1;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+CREATE TABLE t2 (f2 VARCHAR(32));
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2),(1);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+INSERT INTO t2 VALUES ('abc');
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 1 FROM t2;
+COUNT(*) = 1
+1
+connection node_1;
+ROLLBACK;
+connection node_2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SELECT COUNT(*) = 0 FROM t2;
+COUNT(*) = 0
+1
+connection node_1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1008.inc b/mysql-test/suite/galera_sr/t/GCF-1008.inc
new file mode 100644
index 00000000000..69245b3a91f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1008.inc
@@ -0,0 +1,36 @@
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'x');
+
+--connection node_2a
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+--send COMMIT
+
+--connection node_2b
+--sleep 1
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 1;
+SELECT COUNT(*) = 1 FROM t1;
+REPLACE INTO t1 VALUES (1,'y');
+
+--connection node_2b
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_2a
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_2
+--reap
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1008.test b/mysql-test/suite/galera_sr/t/GCF-1008.test
new file mode 100644
index 00000000000..c6926840bd1
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1008.test
@@ -0,0 +1,18 @@
+#
+# GCF-1008 SR trx fails to apply because previous trx is not committed yet on applier
+#
+
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/galera_have_debug_sync.inc
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--let $galera_sync_point = before_local_commit_monitor_enter
+--source GCF-1008.inc
+
+--let $galera_sync_point = before_certify_apply_monitor_enter
+--source GCF-1008.inc
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-1018.test b/mysql-test/suite/galera_sr/t/GCF-1018.test
new file mode 100644
index 00000000000..1ff8f81e824
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1018.test
@@ -0,0 +1,38 @@
+#
+# SR: Node hang with one thread waiting in InnoDB
+#
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/galera_have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+INSERT INTO t1 (f2) VALUES ('a');
+INSERT INTO t1 (f2) VALUES ('b');
+INSERT INTO t1 (f2) VALUES ('c');
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = after_certify_apply_monitor_enter
+--source include/galera_set_sync_point.inc
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size = 64;
+--send DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;
+
+--connection node_2a
+--source include/galera_wait_sync_point.inc
+
+--connection node_1
+INSERT INTO t1 (f2) VALUES ('d'),('e');
+
+--connection node_2a
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_2
+--error ER_LOCK_DEADLOCK, ER_QUERY_INTERRUPTED
+--reap
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1018B.test b/mysql-test/suite/galera_sr/t/GCF-1018B.test
new file mode 100644
index 00000000000..f11309080c0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1018B.test
@@ -0,0 +1,40 @@
+#
+# SR: Node hang with one thread waiting in InnoDB
+#
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_trx_fragment_size = 64;
+SET SESSION innodb_lock_wait_timeout = 1000;
+
+--let $count = 500
+--disable_query_log
+while ($count)
+{
+ --connection node_1
+ --send INSERT INTO t1 (f2) VALUES ('abc'),('abc');
+
+ --connection node_2
+ --send DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;
+
+ --connection node_1
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY,ER_LOCK_WAIT_TIMEOUT,ER_QUERY_INTERRUPTED
+ --reap
+
+ --connection node_2
+ --error 0,ER_LOCK_DEADLOCK,ER_DUP_ENTRY,ER_LOCK_WAIT_TIMEOUT,ER_QUERY_INTERRUPTED
+ --reap
+
+ --dec $count
+}
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1043A.test b/mysql-test/suite/galera_sr/t/GCF-1043A.test
new file mode 100644
index 00000000000..c76623742d7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1043A.test
@@ -0,0 +1,13 @@
+#
+# Assertion `retval == WSREP_OK || retval == WSREP_TRX_FAIL || retval == WSREP_BF_ABORT || retval == WSREP_CONN_FAIL' failed with SR
+#
+
+--source include/galera_cluster.inc
+
+--let $count = 1000;
+--let $wsrep_trx_fragment_size = 1;
+--let $query_node_1 = DELETE FROM t1
+--let $query_node_1a = REPLACE INTO t1 VALUES (1,'y'),(2,'x')
+--let $query_node_2 = REPLACE INTO t1 VALUES (1,'y'),(2,'y'),(3,'y')
+
+--source suite/galera/include/galera_concurrent_test.inc
diff --git a/mysql-test/suite/galera_sr/t/GCF-1043B.test b/mysql-test/suite/galera_sr/t/GCF-1043B.test
new file mode 100644
index 00000000000..e3b6b7439ca
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1043B.test
@@ -0,0 +1,13 @@
+#
+# Assertion `retval == WSREP_OK || retval == WSREP_TRX_FAIL || retval == WSREP_BF_ABORT || retval == WSREP_CONN_FAIL' failed with SR
+#
+
+--source include/galera_cluster.inc
+
+--let $count = 1000;
+--let $wsrep_trx_fragment_size = 1;
+--let $query_node_1 = DELETE FROM t1
+--let $query_node_1a = INSERT INTO t1 VALUES (1,'y'),(2,'x')
+--let $query_node_2 = UPDATE t1 SET f2 = 'y' WHERE f1 = 1 OR f1 = 2;
+
+--source suite/galera/include/galera_concurrent_test.inc
diff --git a/mysql-test/suite/galera_sr/t/GCF-1051.test b/mysql-test/suite/galera_sr/t/GCF-1051.test
new file mode 100644
index 00000000000..1db4ed15c41
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1051.test
@@ -0,0 +1,51 @@
+#
+# Test the case where SR is rolled back to savepoint that points to the
+# very beginning of the transaction. This results in regular rollback
+# rather than rollback to savepoint.
+#
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size=1;
+
+#
+# Test 1: regular transaction
+#
+--connection node_1
+START TRANSACTION;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Test 2: AUTOCOMMIT OFF
+#
+--connection node_1
+SET AUTOCOMMIT=OFF;
+SAVEPOINT A;
+INSERT INTO t1 VALUES (2);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-1060.test b/mysql-test/suite/galera_sr/t/GCF-1060.test
new file mode 100644
index 00000000000..714a5ef9f90
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-1060.test
@@ -0,0 +1,9 @@
+--source include/galera_cluster.inc
+
+--let $count = 100;
+--let $wsrep_trx_fragment_size = 1;
+--let $query_node_1 = TRUNCATE TABLE t1
+--let $query_node_1a = INSERT INTO t1 VALUE (1,'x'),(2,'x'),(3,'x')
+--let $query_node_2 = INSERT INTO t1 VALUE (4, 'z');
+
+--source suite/galera/include/galera_concurrent_test.inc
diff --git a/mysql-test/suite/galera_sr/t/GCF-437.test b/mysql-test/suite/galera_sr/t/GCF-437.test
new file mode 100644
index 00000000000..f71be65708e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-437.test
@@ -0,0 +1,21 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=MyISAM;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 2 * 1024 * 1024;
+
+--error ER_BINLOG_ROW_LOGGING_FAILED
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+CALL mtr.add_suppression("InnoDB: The total blob data length*");
+CALL mtr.add_suppression("WSREP: Error writing into mysql.wsrep_streaming_log: 139");
+CALL mtr.add_suppression("WSREP: Failed to write to frag table: 1");
+CALL mtr.add_suppression("WSREP: Failed to append frag to persistent storage");
+
+DROP TABLE t1;
+DROP table ten;
diff --git a/mysql-test/suite/galera_sr/t/GCF-561.test b/mysql-test/suite/galera_sr/t/GCF-561.test
new file mode 100644
index 00000000000..4a652284e59
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-561.test
@@ -0,0 +1,65 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of DDL on a concurrent SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+ALTER TABLE t1 DROP COLUMN f2;
+
+# SR applied before the DDL is no longer visible
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+# Transaction can not continue due to DDL, implicit ROLLBACK
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (6, 6);
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# DDL is now in effect
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (6, 6);
+
+# But it should be possible to reissue the transaction
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-571.test b/mysql-test/suite/galera_sr/t/GCF-571.test
new file mode 100644
index 00000000000..aca0b9f7907
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-571.test
@@ -0,0 +1,54 @@
+#
+# GCF-571 ROLLBACK TO SAVEPOINT causes all SR records to be deleted
+#
+
+--source include/galera_cluster.inc
+
+SET AUTOCOMMIT=OFF;
+CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+INSERT INTO t1 VALUES ('%abcdef%');
+SAVEPOINT A;
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+INSERT INTO t1 VALUES ('xyzxyz');
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+
+--connection node_1
+ROLLBACK TO SAVEPOINT A;
+
+--connection node_1a
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
+SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
+
+--connection node_1
+ROLLBACK;
+
+--connection node_1a
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-572.test b/mysql-test/suite/galera_sr/t/GCF-572.test
new file mode 100644
index 00000000000..abefb9b08f6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-572.test
@@ -0,0 +1,54 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(10)) ENGINE=InnoDB;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+#
+# Test 1: statement rollback is not safe
+# (some fragments were already replicated)
+#
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'node1');
+
+--connection node_1a
+INSERT INTO t1 VALUES (5, 'node2');
+
+--connection node_1
+# If we try to INSERT a duplicate key, ER_LOCK_DEADLOCK is the only possible
+# outcome at this point. Notice that ER_DUP_ENTRY is NOT an option here
+# because we were forced to rollback the whole transaction (not just the
+# statement)
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (5, 'node1');
+
+SELECT * FROM t1;
+
+#
+# Test 2: statement rollback is safe
+# (no fragments have been replicated)
+#
+
+SET SESSION wsrep_trx_fragment_size = 10000;
+
+START TRANSACTION;
+INSERT INTO t1 VALUE (10, 'node1');
+SELECT * FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+INSERT INTO t1 VALUES(15, 'node2');
+
+--connection node_1
+SELECT * FROM t1;
+# This time, only the statement is rolled back and we expect ER_DUP_ENTRY.
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES(15, 'node1');
+
+COMMIT;
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-574.test b/mysql-test/suite/galera_sr/t/GCF-574.test
new file mode 100644
index 00000000000..c9d7c405d14
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-574.test
@@ -0,0 +1,27 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test CREATE TABLE ... SELECT with Streaming Replication
+#
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--disable_query_log
+--eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) > 1 AS wsrep_last_committed_delta;
+--enable_query_log
+
+--connection node_2
+SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/GCF-580.test b/mysql-test/suite/galera_sr/t/GCF-580.test
new file mode 100644
index 00000000000..39a237fda57
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-580.test
@@ -0,0 +1,27 @@
+#
+# GCF-580 wsrep_last_committed_counter increases twice for every SR fragment
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+
+--let $fragments_count = `SELECT COUNT(*) FROM mysql.wsrep_streaming_log`
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+--disable_query_log
+--eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) = $fragments_count AS last_committed_matches_fragment_count
+--enable_query_log
+
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-585.test b/mysql-test/suite/galera_sr/t/GCF-585.test
new file mode 100644
index 00000000000..ceb7da60df6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-585.test
@@ -0,0 +1,44 @@
+#
+# GCF-585 SR: Assertion `total_length + wsrep_get_fragment_base(thd) == saved_pos' failed in wsrep_write_cache_once after SQL error
+#
+
+--source include/galera_cluster.inc
+
+# Test case #1
+
+create table t1 (f1 integer primary key) engine=innodb;
+set autocommit=off;
+set session wsrep_trx_fragment_size=1;
+start transaction;
+insert into t1 values (1);
+# If we try to INSERT a duplicate key, ER_LOCK_DEADLOCK is the only possible
+# outcome at this point. Notice that ER_DUP_ENTRY is NOT an option here
+# because we were forced to rollback the whole transaction (not just the
+# statement)
+--error ER_LOCK_DEADLOCK
+insert into t1 values (2),(1);
+alter table t1 drop primary key;
+drop table t1;
+
+# Test case #2
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+update t1 set f1 = 100 where f1 = 10;
+
+--connection node_2
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+SET SESSION wsrep_trx_fragment_size=1;
+SET SESSION innodb_lock_wait_timeout=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+--error ER_LOCK_DEADLOCK
+delete from t1 where f1 > 10;
+--error ER_LOCK_DEADLOCK
+delete from t1 where f1 > 10 and f1 < 100;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-597.test b/mysql-test/suite/galera_sr/t/GCF-597.test
new file mode 100644
index 00000000000..d3d80ffc4f8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-597.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+SET wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+ROLLBACK;
+
+DROP TABLE t1; \ No newline at end of file
diff --git a/mysql-test/suite/galera_sr/t/GCF-620.test b/mysql-test/suite/galera_sr/t/GCF-620.test
new file mode 100644
index 00000000000..abfba47ee5a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-620.test
@@ -0,0 +1,22 @@
+#
+# GCF-620 SR: ROLLBACK TO SAVEPOINT causes slave crash if wsrep_trx_fragment_size does not fall on boundary
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 200;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (1);
+SAVEPOINT A;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT A;
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 2 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-623.test b/mysql-test/suite/galera_sr/t/GCF-623.test
new file mode 100644
index 00000000000..6784989bde9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-623.test
@@ -0,0 +1,31 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1; \ No newline at end of file
diff --git a/mysql-test/suite/galera_sr/t/GCF-627.test b/mysql-test/suite/galera_sr/t/GCF-627.test
new file mode 100644
index 00000000000..86637ad8e7f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-627.test
@@ -0,0 +1,30 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER);
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+
+--connection node_2
+DROP TABLE t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--error ER_NO_SUCH_TABLE
+INSERT INTO t1 VALUES (2);
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/GCF-845.test b/mysql-test/suite/galera_sr/t/GCF-845.test
new file mode 100644
index 00000000000..316317c6a10
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-845.test
@@ -0,0 +1,30 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE IF NOT EXISTS t1 (f1 INTEGER) ENGINE = InnoDB;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (161);
+COMMIT;
+DELETE FROM t1 WHERE f1 > 13;
+--disconnect node_1a
+--sleep 2
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_count = 0
+--let $assert_select = BF-BF X
+--let $assert_text = No BF-BF log line found
+--let $assert_only_after = CURRENT_TEST
+--source include/assert_grep.inc
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-851.test b/mysql-test/suite/galera_sr/t/GCF-851.test
new file mode 100644
index 00000000000..28d5302a422
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-851.test
@@ -0,0 +1,24 @@
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+SET SESSION AUTOCOMMIT=OFF;
+
+INSERT INTO t1 VALUES (10);
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+START TRANSACTION;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) > 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) > 0 FROM t1;
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-867.test b/mysql-test/suite/galera_sr/t/GCF-867.test
new file mode 100644
index 00000000000..54476a860b7
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-867.test
@@ -0,0 +1,42 @@
+#
+# Test many ongoing SR transactions
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+--disable_query_log
+
+--let $connections = 62
+
+--let $count = $connections
+while ($count)
+{
+--connect $count, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET SESSION wsrep_sync_wait = 0;
+--dec $count
+}
+
+
+--let $count = $connections
+while ($count)
+{
+--connection $count
+START TRANSACTION;
+--send_eval INSERT INTO t1 VALUES ($count)
+--dec $count
+}
+
+--let $count = $connections
+while ($count)
+{
+--connection $count
+--reap
+COMMIT;
+--dec $count
+}
+
+--enable_query_log
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/GCF-889.test b/mysql-test/suite/galera_sr/t/GCF-889.test
new file mode 100644
index 00000000000..e785b282019
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-889.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET SESSION wsrep_on = ON;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+DELETE FROM t1 WHERE f1 = 1;
+SET SESSION wsrep_trx_fragment_size = 0;
+
+INSERT INTO t1 VALUES (1);
+
+SELECT COUNT(*) = 1;
+
+--connection node_2
+SELECT COUNT(*) = 1;
+CALL mtr.add_suppression("Could not execute Delete_rows event on table");
+CALL mtr.add_suppression("Can't find record in 't1'");
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+
+--connection node_1
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/galera_sr/t/GCF-900.test b/mysql-test/suite/galera_sr/t/GCF-900.test
new file mode 100644
index 00000000000..3f1b53630b6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/GCF-900.test
@@ -0,0 +1,28 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 128;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 0);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (2, 0);
+
+--connection node_2
+ALTER TABLE t1 DROP COLUMN f2;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--connection node_1a
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (3, 0);
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera-features#56.test b/mysql-test/suite/galera_sr/t/galera-features#56.test
new file mode 100644
index 00000000000..0497952e355
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera-features#56.test
@@ -0,0 +1,55 @@
+##
+## This test tests parallel application of multiple auto-increment insert transactions
+##
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+# Create a second connection to node1 so that we can run transactions concurrently
+--let $galera_connection_name = node_1a
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+
+--connection node_2
+--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+SET GLOBAL wsrep_slave_threads = 4;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--connection node_1
+--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_1a
+--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_1
+--reap
+
+--connection node_1a
+--reap
+
+--connection node_2
+--reap
+
+SELECT COUNT(*) = 30000 FROM t1;
+SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
+SELECT COUNT(*) = 6 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+
+--disable_query_log
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
+--enable_query_log
+
+--connection default
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc
new file mode 100644
index 00000000000..cd9884cee81
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.inc
@@ -0,0 +1,145 @@
+#
+# Test SR BF abort for all sync points in master side code path
+#
+# The procedure in all test cases is the following:
+# 1) Start SR transaction on node 1, do INSERT + SELECT .. FOR UPDATE
+# 2) Set up sync point on node 1 to block slave thread processing
+# in apply monitor
+# 3) Do write on node 2 which will conflict with SELECT .. FOR UPDATE
+# 4) Set up desired sync point on master side and commit
+# 5) Wait until commit reaches master side sync point, clear sync points
+# and release all sync point waiters
+# 6) COMMIT on node 1 should return deadlock error
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size
+SET AUTOCOMMIT=OFF;
+
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1 FOR UPDATE;
+
+# Set up sync point
+--connection node_1a
+--let galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+# Conflicting insert
+--connection node_2
+
+SET AUTOCOMMIT=ON;
+INSERT INTO t1 VALUES (2);
+
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = $galera_sr_bf_abort_sync_point
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+if ($galera_sr_bf_abort_at_commit)
+{
+ --send COMMIT
+}
+if (!$galera_sr_bf_abort_at_commit)
+{
+ --send INSERT INTO t1 VALUES (3)
+}
+
+--connection node_1a
+
+--let $cmp = `SELECT STRCMP('apply_monitor_slave_enter_sync', '$galera_sr_bf_abort_sync_point') = -1`
+
+if ($cmp)
+{
+ --let $galera_sync_point = apply_monitor_slave_enter_sync $galera_sr_bf_abort_sync_point
+}
+if (!$cmp)
+{
+ --let $galera_sync_point = $galera_sr_bf_abort_sync_point apply_monitor_slave_enter_sync
+}
+--source include/galera_wait_sync_point.inc
+
+# Let conflicting insert proceed, make sure it hits abort_trx_end and
+# let both threads continue.
+
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = abort_trx_end $galera_sr_bf_abort_sync_point
+
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+--let $galera_sync_point = $galera_sr_bf_abort_sync_point
+--source include/galera_signal_sync_point.inc
+
+# Deadlock should now be retured by node_1
+--connection node_1
+if (!$galera_sr_bf_abort_at_commit)
+{
+ --error ER_LOCK_DEADLOCK
+ --reap
+}
+if ($galera_sr_bf_abort_at_commit)
+{
+ --reap
+}
+
+ROLLBACK;
+
+# Release slave insert
+--connection node_1a
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+
+# Verify that nodes are consistent
+
+# End result:
+# If the statement which was BF aborted was commit,
+# node_1 must replay the transaction so that the table
+# will have rows 1, 2. If it in turn was INSERT,
+# node_1 must abort the transaction so that only
+# INSERT ... VALUES (2) survives.
+
+--connection node_1
+SELECT * FROM t1;
+if ($galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+if (!$galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+--connection node_2
+SELECT * FROM t1;
+if ($galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+if (!$galera_sr_bf_abort_at_commit)
+{
+ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+}
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Delete entery to verify that node is unblocked
+--connection node_1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 0;
+DELETE FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test
new file mode 100644
index 00000000000..a2db6a8bad2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort.test
@@ -0,0 +1,50 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+--let $wsrep_trx_fragment_size = 1
+
+# Control connection for manipulating sync points on node 1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+--echo galera_sr_bf_abort_at_commit = 0
+--let $galera_sr_bf_abort_at_commit = 0
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo galera_sr_bf_abort_at_commit = 1
+--let $galera_sr_bf_abort_at_commit = 1
+
+--echo after_replicate_sync
+--let $galera_sr_bf_abort_sync_point = after_replicate_sync
+--source galera_sr_bf_abort.inc
+
+--echo local_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo apply_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+--echo commit_monitor_master_enter_sync
+--let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync
+--source galera_sr_bf_abort.inc
+
+CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_blob.test b/mysql-test/suite/galera_sr/t/galera_sr_blob.test
new file mode 100644
index 00000000000..ed314d09f5a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_blob.test
@@ -0,0 +1,38 @@
+#
+# Test that a single-blob will be replicated using SR if it is sufficiently
+# large.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 TEXT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+
+--connection node_2
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+# Confirm that exactly one fragment was replicated
+
+--disable_query_log
+--eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) = 1 AS wsrep_last_committed_delta;
+--enable_query_log
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT LENGTH(f1) = 65535 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test
new file mode 100644
index 00000000000..8ae8c204f60
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test
@@ -0,0 +1,98 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of Cluster Configuration Change on a concurrently-running SR transaction
+# We use SET GLOBAL wsrep_cluster_address = '' to cause the master (node_2) to temporarily
+# leave the cluster.
+#
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Trigger CC . The transaction is aborted and we expect the SR tables to be cleaned up
+#
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET SESSION wsrep_sync_wait=0;
+--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+SET GLOBAL wsrep_cluster_address = '';
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = DEFAULT;
+
+--connection node_2
+--error 2013 # CR_SERVER_LOST
+INSERT INTO t1 VALUES (6);
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Restore cluster
+
+--connection node_2a
+--disable_query_log
+--eval SET GLOBAL wsrep_cluster_address='$wsrep_cluster_address_orig'
+--enable_query_log
+
+--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
+
+
+--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2b
+--source include/galera_wait_ready.inc
+SELECT * FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Repeat transaction to confirm no locks are left from previous transaction
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+--connection node_2b
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for");
+
+--disconnect node_2
+--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
new file mode 100644
index 00000000000..8c790ac7cd2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
@@ -0,0 +1,97 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of Cluster Configuration Change on a concurrently-running SR transaction
+# We use SET GLOBAL wsrep_cluster_address = '' to cause the slave (node_2) to temporarily
+# leave the cluster.
+#
+
+# Start with a clean slate
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+#
+# Trigger CC . The transaction should be able to continue
+#
+
+--connection node_2
+--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
+SET GLOBAL wsrep_cluster_address = '';
+
+# Wait until the node_2 disconnects from the cluster
+SET SESSION wsrep_sync_wait = 0;
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
+--source include/wait_condition.inc
+SET SESSION wsrep_sync_wait = default;
+
+--connection node_1
+
+# Wait until the node_1 sees the cluster configuration change
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
+# Continue generating events in the transaction
+
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+# Restore cluster
+
+--connection node_2
+--disable_query_log
+--eval SET GLOBAL wsrep_cluster_address='$wsrep_cluster_address_orig';
+--enable_query_log
+--source include/galera_wait_ready.inc
+
+# Confirm that the SR table still contains entries from ongoing transaction
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+# Continue and finalize transaction
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (16);
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that transaction was replicated properly
+# and SR table is cleaned up afterwards.
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+
+CALL mtr.add_suppression("points to own listening address, blacklisting");
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_concurrent.test b/mysql-test/suite/galera_sr/t/galera_sr_concurrent.test
new file mode 100644
index 00000000000..9ec7143d25c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_concurrent.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test two concurrent SR-replicated transactions
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+INSERT INTO t2 VALUES (2);
+INSERT INTO t2 VALUES (3);
+INSERT INTO t2 VALUES (4);
+INSERT INTO t2 VALUES (5);
+
+--connection node_1
+COMMIT;
+
+--connection node_1a
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 5 FROM t2;
+
+--connection node_1
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict.test
new file mode 100644
index 00000000000..dd133c2d12e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# A conflict between a streaming replication fragment and a local transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+# Wait until a streaming replication fragment has arrived
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+# Attempt a conflicting INSERT. This will block
+--send INSERT INTO t1 VALUES(1);
+
+# Observe the block from a separate connection
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'wsrep applier committed%';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'update';
+--source include/wait_condition.inc
+
+# Commit the remote transaction, causing the local transaction to return an error
+--connection node_1
+COMMIT;
+
+--connection node_2
+--error ER_DUP_ENTRY
+--reap
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test
new file mode 100644
index 00000000000..6675321641f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #2 begins a transaction
+# 2. Node #1 begins conflicting transaction that is SR replicated
+# 3. Node #2 attempts to commit, gets a deadlock error, even before #1 has committed
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+--connection node_1
+COMMIT;
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test
new file mode 100644
index 00000000000..0ea52290bb6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict_on_commit2.test
@@ -0,0 +1,46 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #1 begins a transaction that is SR replicated
+# 2. Node #2 begins a conflicting transaction, hangs
+# 3. Node #1 comits
+# 4. Node #2 gets a dup key error
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--send INSERT INTO t1 VALUES (5);
+
+--sleep 1
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+--error ER_DUP_ENTRY
+--reap
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test b/mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test
new file mode 100644
index 00000000000..cb96fae0122
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_conflict_with_rollback_master.test
@@ -0,0 +1,44 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #2 begins a transaction
+# 2. Node #1 begins conflicting transaction that is SR replicated
+# 3. Node #1 rolls back
+# 4. Node #2 can not commit because it was BF-aborted even though the SR transaction was rolled back
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+ROLLBACK;
+
+--connection node_2
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
new file mode 100644
index 00000000000..7da7f55ba15
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
@@ -0,0 +1,63 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events on the master:
+#
+# 1. Connection #1 begins a SR transaction
+# 2. Connection #2 issues DDL
+# 3. Connection #1 attempts to continue the transaction, gets deadlock
+# 4. Connection #1 retries the transaction and succeeds
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+# SR replication is triggered and rows have been delivered to the slave
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (6);
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Check that the transaction thus aborted could be reissued
+
+ROLLBACK;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES (1);
+INSERT INTO t1 (f1) VALUES (2);
+INSERT INTO t1 (f1) VALUES (3);
+INSERT INTO t1 (f1) VALUES (4);
+INSERT INTO t1 (f1) VALUES (5);
+INSERT INTO t1 (f1) VALUES (6);
+COMMIT;
+
+SELECT COUNT(*) = 6 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test
new file mode 100644
index 00000000000..a3045773387
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_schema.test
@@ -0,0 +1,43 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of DROP SCHEMA DDL on a concurrent SR transaction
+# Most other DDL tests work on a table level, so this test exercises a
+# different granularity.
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+DROP SCHEMA test;
+
+--error ER_NO_SUCH_TABLE
+SELECT COUNT(*) = 0 FROM test.t1;
+
+--connection node_1
+
+# Transaction can not continue due to DDL
+--error ER_LOCK_DEADLOCK
+INSERT INTO test.t1 VALUES (6, 6);
+
+# DDL is now in effect
+--error ER_NO_SUCH_TABLE
+INSERT INTO test.t1 VALUES (6, 6);
+
+CREATE SCHEMA test;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test
new file mode 100644
index 00000000000..4a652284e59
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_slave.test
@@ -0,0 +1,65 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of DDL on a concurrent SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+ALTER TABLE t1 DROP COLUMN f2;
+
+# SR applied before the DDL is no longer visible
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+# Transaction can not continue due to DDL, implicit ROLLBACK
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (6, 6);
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# DDL is now in effect
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (6, 6);
+
+# But it should be possible to reissue the transaction
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test b/mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test
new file mode 100644
index 00000000000..77b6e64641d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ddl_unrelated.test
@@ -0,0 +1,53 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the effect of unrelated DDL on a concurrent SR transaction
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 VALUES (2, 2);
+INSERT INTO t1 VALUES (3, 3);
+INSERT INTO t1 VALUES (4, 4);
+INSERT INTO t1 VALUES (5, 5);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+ALTER TABLE t2 DROP COLUMN f2;
+
+# SR applied before the DDL is still visible
+SELECT COUNT(*) = 5 FROM t1;
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+
+# Transaction can continue, even after the DDL
+--error 0
+INSERT INTO t1 VALUES (6, 6);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test b/mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test
new file mode 100644
index 00000000000..a7aca042829
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_dupkey_error.test
@@ -0,0 +1,59 @@
+#
+# Test the case where a duplicate key error happens in the middle of an SR transaction
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 BLOB) ENGINE=InnoDB;
+CREATE UNIQUE INDEX i1 ON t1 (f1(512));
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1024;
+
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+# Deadlock error instead of dupkey since the transaction is SR and
+# statement rollback is not safe.
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+
+# Confirm that the wsrep_streaming_log table is now empty, as it was a full transaction rollback
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that the transaction can be restarted on either node
+
+--connection node_1
+INSERT INTO t1 VALUES (REPEAT('d', 512));
+INSERT INTO t1 VALUES (REPEAT('e', 512));
+INSERT INTO t1 VALUES (REPEAT('f', 512));
+COMMIT;
+
+--connection node_2
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (REPEAT('a', 512));
+INSERT INTO t1 VALUES (REPEAT('b', 512));
+INSERT INTO t1 VALUES (REPEAT('c', 512));
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 6 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test b/mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test
new file mode 100644
index 00000000000..b83deaee244
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_fk_conflict.test
@@ -0,0 +1,62 @@
+#
+# Test Foreign Key with SR
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE grandparent (
+ id INT NOT NULL PRIMARY KEY
+) ENGINE=InnoDB;
+
+CREATE TABLE parent (
+ id INT NOT NULL PRIMARY KEY,
+ grandparent_id INT,
+ FOREIGN KEY (grandparent_id)
+ REFERENCES grandparent(id)
+ ON UPDATE CASCADE
+) ENGINE=InnoDB;
+
+CREATE TABLE child (
+ id INT NOT NULL PRIMARY KEY,
+ grandparent_id INT,
+ FOREIGN KEY (grandparent_id)
+ REFERENCES parent(grandparent_id)
+ ON UPDATE CASCADE
+) ENGINE=InnoDB;
+
+INSERT INTO grandparent VALUES (1),(2),(3),(4);
+INSERT INTO parent VALUES (1,1), (2,2);
+INSERT INTO child VALUES (1,1), (2,2);
+
+# Start and SR transaction
+
+--connection node_1
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+UPDATE grandparent SET id = 5 WHERE id = 1;
+
+# No conflicting transactions are allowed to proceed on slave
+
+--connection node_2
+SET SESSION innodb_lock_wait_timeout = 1;
+
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE grandparent SET id = 10 WHERE id = 5;
+
+--error ER_LOCK_WAIT_TIMEOUT
+DELETE FROM child;
+
+# SR transaction succesffull
+
+--connection node_1
+COMMIT;
+
+--let $diff_servers = 1 2
+--source include/diff_servers.inc
+
+DROP TABLE child;
+DROP TABLE parent;
+DROP TABLE grandparent;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt
new file mode 100644
index 00000000000..6623c33c484
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_gtid-master.opt
@@ -0,0 +1 @@
+ --log-bin --log-slave-updates --loose-galera-sr-gtid-unique
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_gtid.test b/mysql-test/suite/galera_sr/t/galera_sr_gtid.test
new file mode 100644
index 00000000000..56464ba6f63
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_gtid.test
@@ -0,0 +1,46 @@
+#
+# Test basic Galera operation
+#
+
+--source include/have_log_bin.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY);
+
+SET SESSION wsrep_trx_fragment_size=1;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+SET SESSION wsrep_trx_fragment_size=1;
+UPDATE t1 SET f1 = 2;
+
+#--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;`
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size=0;
+
+--connection node_2
+SET SESSION wsrep_trx_fragment_size=0;
+
+--connection node_1
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+
+--disable_query_log
+#--eval SELECT '$gtid_executed_node2' = @@global.gtid_executed AS gtid_executed_equal;
+--enable_query_log
+
+--replace_regex /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/<GTID>/ /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 256;
+
+--connection node_2
+# Perform causal wait
+SELECT 1 FROM DUAL;
+--replace_regex /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/<GTID>/ /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 256;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_insert_select.test b/mysql-test/suite/galera_sr/t/galera_sr_insert_select.test
new file mode 100644
index 00000000000..01481db5a8b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_insert_select.test
@@ -0,0 +1,33 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test large INSERT ... SELECT with SR
+#
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+# Insert 10K rows.
+INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 99 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test
new file mode 100644
index 00000000000..8fba27f9a73
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_nobootstrap.test
@@ -0,0 +1,52 @@
+#
+# Kill entire cluster during SR while pc.bootstrap is in effect
+# after restart, confirm that the mysql.wsrep_streaming_log table is empty
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--connection node_1
+--source include/kill_galera.inc
+
+--sleep 1
+
+# Bootstrap the cluster from scratch
+
+--connection node_1
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
new file mode 100644
index 00000000000..6422d7541ba
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.recovery=false'
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
new file mode 100644
index 00000000000..042e3d3ef57
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
@@ -0,0 +1,53 @@
+#
+# Kill entire cluster during SR while pc.recovery is NOT in effect
+# after restart, confirm that the mysql.wsrep_streaming_log table is empty
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--connection node_1
+--source include/kill_galera.inc
+
+--sleep 1
+
+--connection node_1
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $start_mysqld_params = "--wsrep-new-cluster"
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--let $start_mysqld_params = ""
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test
new file mode 100644
index 00000000000..0ba7cedbd8f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_all_pcrecovery.test
@@ -0,0 +1,54 @@
+#
+# Kill entire cluster during SR while pc.recovery is in effect
+# after restart, confirm that the mysql.wsrep_streaming_log table is empty
+#
+
+--source include/galera_cluster.inc
+--source include/big_test.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--source include/kill_galera.inc
+--connection node_1
+--source include/kill_galera.inc
+
+--sleep 1
+
+# Bootstrap the cluster from scratch
+
+--connection node_1
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+--connection node_1
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test
new file mode 100644
index 00000000000..03d09f33fab
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_connection.test
@@ -0,0 +1,59 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test KILL CONNECTION on a transaction that has already replicated some data via SR
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+# Confirm that the transaction is SR-replicated
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+# Kill the transaction by killing the entire connection
+
+--connection node_1
+--let $connection_id = `SELECT CONNECTION_ID()`
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--disable_query_log
+--eval KILL CONNECTION $connection_id
+--enable_query_log
+
+# Confirm that the disconnection caused the updates made so far to be removed
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+# Confirm that the transaction can be reissued in its entirety on the slave without a conflict
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+COMMIT;
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1a
+SELECT COUNT(*) = 5 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_query.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
new file mode 100644
index 00000000000..4c9f2b4d7bc
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
@@ -0,0 +1,48 @@
+--source include/galera_cluster.inc
+
+#
+# Test KILL QUERY on a statement that has already replicated some data via SR
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--let $connection_id = `SELECT CONNECTION_ID()`
+--send INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
+
+# Wait for some SR to arrive on the slave.
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT TABLE_ROWS > 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+--connection node_1
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--echo Killing query ...
+--disable_query_log
+--eval KILL QUERY $connection_id
+--enable_query_log
+
+--connection node_1
+--error ER_QUERY_INTERRUPTED
+--reap
+
+# Confirm that the kill caused the updates made so far to be removed
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that the transaction can be reissued in its entirety on the slave without a conflict
+
+INSERT INTO t1 SELECT 1 FROM ten AS t1, ten AS t2, ten AS t3;
+SELECT COUNT(*) = 1000 FROM t1;
+
+--connection node_1a
+SELECT COUNT(*) = 1000 FROM t1;
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf
new file mode 100644
index 00000000000..290d8fe196e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.weight=2'
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test
new file mode 100644
index 00000000000..a76a03e49b9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_kill_slave.test
@@ -0,0 +1,80 @@
+#
+# This test kills the slave while a Streaming Replication transaction is in
+# progress but before a fragment has already been applied on the slave. It
+# is expected that after the slave restarts, the cluster will continue to
+# be consistent.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Block node #2's applier before table t1's inserts have come into play
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+CREATE TABLE t2 (f1 INTEGER);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+LOCK TABLE t2 WRITE;
+
+--connection node_1
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--sleep 2
+
+--connection node_2
+--source include/kill_galera.inc
+--sleep 1
+
+--connection node_1
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
+
+--connection node_2
+--source include/start_mysqld.inc
+--sleep 1
+
+--source include/wait_until_connected_again.inc
+--source include/galera_wait_ready.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+--sleep 5
+SELECT COUNT(*) = 15 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt
new file mode 100644
index 00000000000..132c6aed246
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment-master.opt
@@ -0,0 +1 @@
+--innodb_log_file_size=1G --binlog-row-event-max-size=100M
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test
new file mode 100644
index 00000000000..63278555723
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_large_fragment.test
@@ -0,0 +1,58 @@
+#
+# Test the replication and subsequent cleanup of a few, very large fragments
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1024 * 1024 * 10;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) > 50000 FROM t1;
+
+--connection node_1
+ROLLBACK;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_2';
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_1 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_1';
+
+DROP TABLE ten;
+DROP TABLE t1;
+
+CALL mtr.add_suppression('InnoDB: Resizing redo log from');
+CALL mtr.add_suppression('InnoDB: Starting to delete and rewrite log files');
+CALL mtr.add_suppression('InnoDB: New log files created, LSN=');
+
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_load_data.test b/mysql-test/suite/galera_sr/t/galera_sr_load_data.test
new file mode 100644
index 00000000000..b430ace5d69
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_load_data.test
@@ -0,0 +1,39 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test Streaming Replication + LOAD DATA
+#
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 512;
+
+# Create a file for LOAD DATA with 20K entries
+--perl
+open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_sr_load_data.csv") or die;
+foreach my $i (1..20000) {
+ print FILE "$i\n";
+}
+EOF
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Record wsrep_last_committed as it was before LOAD DATA
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+--disable_query_log
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1;
+--enable_query_log
+
+--connection node_2
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+SELECT COUNT(*) = 20000 FROM t1;
+# LOAD-ing 20K rows causes 3 commits to be registered
+--disable_query_log
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before = 3 AS wsrep_last_committed_diff;
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test b/mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test
new file mode 100644
index 00000000000..40e63e7c67f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_load_data_splitting.test
@@ -0,0 +1,50 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+#
+# Test Streaming Replication and LOAD DATA splitting operating at the same time
+#
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting`
+
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_load_data_splitting = TRUE;
+
+
+# Create a file for LOAD DATA with 95K entries
+--perl
+open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/galera_sr_load_data.csv") or die;
+foreach my $i (1..95000) {
+ print FILE "$i\n";
+}
+EOF
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Record wsrep_last_committed as it was before LOAD DATA
+--connection node_2
+--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+--connection node_1
+--disable_query_log
+--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv' INTO TABLE t1;
+--enable_query_log
+
+--connection node_2
+--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
+
+SELECT COUNT(*) = 95000 FROM t1;
+
+# LOAD-ing 95K rows causes 10 'commits' to be registered
+--disable_query_log
+--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before = 10 AS wsrep_last_committed_diff;
+--enable_query_log
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig;
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt
new file mode 100644
index 00000000000..03fcb5d040d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_log_bin-master.opt
@@ -0,0 +1 @@
+--log-slave-updates --log-bin
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_log_bin.test b/mysql-test/suite/galera_sr/t/galera_sr_log_bin.test
new file mode 100644
index 00000000000..7dfa7850c15
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_log_bin.test
@@ -0,0 +1,70 @@
+#
+# Interleave SR and non-SR transactions and confirm that the binlog is in correct order
+#
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
+
+--source include/galera_cluster.inc
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t2 VALUES (1);
+
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t3 VALUES (1);
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--connection node_2a
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t4 VALUES (1);
+
+--connection node_1
+INSERT INTO t1 VALUES (2);
+COMMIT;
+
+--connection node_1a
+INSERT INTO t2 VALUES (2);
+COMMIT;
+
+--connection node_2
+INSERT INTO t3 VALUES (2);
+COMMIT;
+--connection node_2a
+INSERT INTO t4 VALUES (2);
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 2 FROM t4;
+
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+--connection node_2
+SELECT COUNT(*) = 2 FROM t4;
+
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test b/mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test
new file mode 100644
index 00000000000..9b8dae9d8e3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_many_fragments.test
@@ -0,0 +1,53 @@
+#
+# Test the replication and subsequent cleanup of a large number of small transaction fragments
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(512)) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 (f2) SELECT REPEAT('x', 512) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+ROLLBACK;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_2';
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--let $wsrep_provider_options_node_1 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'`
+SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT10M';
+SET SESSION wsrep_sync_wait = 7;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node_1';
+
+DROP TABLE ten;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_myisam.test b/mysql-test/suite/galera_sr/t/galera_sr_myisam.test
new file mode 100644
index 00000000000..b037f817610
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_myisam.test
@@ -0,0 +1,29 @@
+#
+# Test that the basic MyISAM replication works even with SR enabled
+# We basically check that the data arrived on the slave and that there
+# were no assertions.
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 TEXT) ENGINE=MyISAM;
+
+--let $wsrep_replicate_myisam_orig = `SELECT @@wsrep_replicate_myisam`
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET GLOBAL wsrep_replicate_myisam = TRUE;
+
+INSERT INTO t1 VALUES (REPEAT('x', 65535));
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT LENGTH(f1) = 65535 FROM t1;
+
+DROP TABLE t1;
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig;
+--enable_query_log
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf
new file mode 100644
index 00000000000..574ae28b54a
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.cnf
@@ -0,0 +1,11 @@
+!include ../galera_2nodes.cnf
+
+# We do not set mysqldump-related SST options here because doing so on startup
+# causes the first MTR connection to be forefully dropped by Galera, which in turn confuses MTR
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
+
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test
new file mode 100644
index 00000000000..25ded94e100
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test
@@ -0,0 +1,79 @@
+#
+# Test mysqldump SST on slave if SR transaction is in progress
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+
+--source suite/galera/include/galera_sst_set_mysqldump.inc
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size = 1000;
+START TRANSACTION;
+# Insert 1000 rows
+INSERT INTO t1 (f2) SELECT REPEAT('x', 255) FROM ten AS a1, ten AS a2, ten AS a3;
+
+# Update 1000 rows
+UPDATE t1 SET f2 = REPEAT('y', 255);
+
+# Wait for SR replication to kick in
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+# Restart node #2
+
+--connection node_2
+--let $MYSQLD2_DATADIR = `SELECT @@datadir`
+
+--echo Shutting down server ...
+--source include/shutdown_mysqld.inc
+
+# Force SST
+--remove_file $MYSQLD2_DATADIR/grastate.dat
+
+--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
+--echo Starting server ...
+--let $start_mysqld_params = --wsrep_sst_auth=sst:sst --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:$NODE_MYPORT_2
+--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
+
+# Check that node #2 is caught up with the SR transaction that is still in progress
+--connection node_2
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+# Finalize transaction
+--connection node_1
+UPDATE t1 SET f2 = REPEAT('z', 255);
+COMMIT;
+
+# Confirm proper replication of entire transaction to node #2
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 1000 FROM t1;
+SELECT COUNT(*) = 1000 FROM t1 WHERE f2 = REPEAT('z', 255);
+
+DROP TABLE t1;
+DROP TABLE ten;
+
+--connection node_1
+# galera_sst_restore.inc uses DROP USER internally which is incompatible
+# with SR, need to disable SR before that.
+SET SESSION wsrep_trx_fragment_size=0;
+--source suite/galera/include/galera_sst_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test b/mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test
new file mode 100644
index 00000000000..83a7acbe3e0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_parallel_apply.test
@@ -0,0 +1,59 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test SR with parallel apply
+#
+
+--connection node_2
+--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+SET GLOBAL wsrep_slave_threads = 5;
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (1);
+--send INSERT INTO t1 (f2) VALUES (1);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (2);
+--send INSERT INTO t1 (f2) VALUES (2);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1 WHERE f2 = 1;
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1 WHERE f2 = 2;
+--source include/wait_condition.inc
+
+--connection node_1
+--reap
+COMMIT;
+
+--connection node_1a
+--reap
+ROLLBACK;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+
+--connection node_2
+--disable_query_log
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
+--enable_query_log
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback.test
new file mode 100644
index 00000000000..33a318f8ae3
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback.test
@@ -0,0 +1,76 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that ROLLBACK works correctly with streaming replication
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) >= 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK;
+
+#
+# After ROLLBACK, the table on node #2 should be empty
+#
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+#
+# It should be possible to re-insert the values we just rolled back
+#
+
+--connection node_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) >= 9 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) >= 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test
new file mode 100644
index 00000000000..c6c443a0828
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_retry.test
@@ -0,0 +1,55 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that a SR transaction that was just ROLLBACKed on one node can be
+# run against another node without any conflicts
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK;
+
+#
+# After ROLLBACK, the table on node #2 should be empty
+#
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
+--source include/wait_condition.inc
+
+#
+# It should be possible to reissue the same transaction against node #2
+#
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+COMMIT;
+
+SELECT COUNT(*) = 5 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 5 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test
new file mode 100644
index 00000000000..93ff7a948c4
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_savepoint.test
@@ -0,0 +1,51 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that ROLLBACK TO SAVEPOINT works correctly with streaming replication
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 5 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK TO SAVEPOINT s1;
+
+INSERT INTO t1 VALUES (21, 'c');
+INSERT INTO t1 VALUES (22, 'c');
+INSERT INTO t1 VALUES (23, 'c');
+INSERT INTO t1 VALUES (24, 'c');
+INSERT INTO t1 VALUES (25, 'c');
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'a';
+SELECT COUNT(*) = 0 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 5 FROM t1 WHERE f2 = 'c';
+
+--connection node_1
+COMMIT;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test b/mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test
new file mode 100644
index 00000000000..74350faf5a2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_rollback_statement.test
@@ -0,0 +1,61 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the case where a statement is rolled back due to an error while Streaming Replication
+# is in effect. We construct an INSERT ... SELECT statement that will fail with a duplicate
+# key error towards the end of the statement, after a portion has already been replicated via SR.
+#
+
+--disable_query_log
+--let $auto_increment_offset_orig = `SELECT @@auto_increment_offset`
+SET GLOBAL auto_increment_offset=1;
+--enable_query_log
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) ENGINE=InnoDB;
+
+INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3;
+ALTER TABLE t1 CHANGE f1 f1 INTEGER;
+ALTER TABLE t1 DROP PRIMARY KEY;
+
+# This poison value is used to cause the INSERT ... SELECT below to fail
+INSERT INTO t1 VALUES (1, 'abc');
+
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+SET SESSION wsrep_trx_fragment_size = 1;
+
+--error ER_DUP_ENTRY
+INSERT INTO t2 SELECT * FROM t1;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM t2;
+--source include/wait_condition.inc
+
+# Cluster continues to operate after the implicit ROLLBACK;
+--connection node_1
+INSERT INTO t2 VALUES (1, 'abc');
+
+--connection node_2
+INSERT INTO t2 VALUES (2, 'abc');
+
+--connection node_1
+SELECT COUNT(*) = 2 FROM t2;
+
+--connection node_2
+SELECT COUNT(*) = 2 FROM t2;
+
+--connection node_1
+
+--disable_query_log
+--eval SET GLOBAL auto_increment_offset=$auto_increment_offset_orig;
+--enable_query_log
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_sbr.test b/mysql-test/suite/galera_sr/t/galera_sr_sbr.test
new file mode 100644
index 00000000000..a24a520af60
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_sbr.test
@@ -0,0 +1,31 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that SR does not assert in the presence of statement-based replication events
+#
+
+--connection node_1
+CREATE TABLE t1 (id INT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 1;
+SET SESSION BINLOG_FORMAT='STATEMENT';
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+COMMIT;
+
+--connection node_2
+SELECT COUNT(*) = 5 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test
new file mode 100644
index 00000000000..3f7407fe536
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_master.test
@@ -0,0 +1,53 @@
+#
+# Shut down master (node #2) while an SR transaction is in progress
+#
+
+--source include/galera_cluster.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_2
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--connection node_2
+--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';
+
+# Confirm that SR table on slave is empty
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_2
+--source include/start_mysqld.inc
+
+# SR table on master should be empty too
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+# Confirm that the INSERT can be re-issued
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--connection node_1
+SELECT COUNT(*) = 3 FROM t1;
+
+DROP TABLE t1;
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for ");
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
new file mode 100644
index 00000000000..fa2df242ccc
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
@@ -0,0 +1,63 @@
+#
+# Shut down slave (node #2) while an SR transaction is in progress
+#
+
+--source include/galera_cluster.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB;
+
+# We start two transactions on the master so that we can commit one while the slave
+# is down and commit the other after the slave has rejoined
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (11),(12),(13);
+
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (21),(22),(23);
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+--source include/wait_condition.inc
+
+--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';
+
+# Commit one transaction while the slave is down
+--connection node_1a
+INSERT INTO t1 VALUES (14),(15),(16);
+COMMIT;
+
+# Restart slave
+--connection node_2
+--source include/start_mysqld.inc
+
+# Confirm SR table on slave has entries
+SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 6 FROM t1 WHERE f1 IN (11,12,13,14,15,16);
+
+# Commit the second transaction on master after the slave has rejoined
+--connection node_1b
+INSERT INTO t1 VALUES (24),(25),(26);
+COMMIT;
+
+# Confirm that SR table on slave is empty
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) = 12 FROM t1;
+
+# SR table on master should be empty too
+--connection node_1
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf
new file mode 100644
index 00000000000..c8e17436e71
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.cnf
@@ -0,0 +1,6 @@
+!include ../galera_2nodes.cnf
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=16K'
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=16K'
+
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test
new file mode 100644
index 00000000000..403b44286d9
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_small_gcache.test
@@ -0,0 +1,21 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# A simple test with a very low value for gcache.size - 16K
+#
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SELECT COUNT(*) = 10000 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_table_contents.test b/mysql-test/suite/galera_sr/t/galera_sr_table_contents.test
new file mode 100644
index 00000000000..92d29fe4ca2
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_table_contents.test
@@ -0,0 +1,49 @@
+#
+# This test dumps the contents of the SR table under various circumstances
+#
+
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3);
+
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2),(3);
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--echo
+--echo Start of Simple Insert
+INSERT INTO t1 VALUES (4);
+--source suite/galera/include/galera_dump_sr_table.inc
+--echo End of Simple Insert
+--echo
+ROLLBACK;
+
+--echo Start of Multi-row Update
+UPDATE t1 SET f1 = f1 + 10;
+--source suite/galera/include/galera_dump_sr_table.inc
+--echo End of Multi-row Update
+--echo
+ROLLBACK;
+
+--echo Start of Multi-table Update
+UPDATE t1, t2 SET t1.f1 = t1.f1 + 100, t2.f1 = t2.f1 + 100;
+--source suite/galera/include/galera_dump_sr_table.inc
+--echo End of Multi-table Update
+--echo
+ROLLBACK;
+
+--echo Start of Savepoint
+INSERT INTO t1 VALUES (1000);
+SAVEPOINT X;
+INSERT INTO t1 VALUES (2000);
+ROLLBACK TO SAVEPOINT X;
+--source suite/galera/include/galera_dump_sr_table.inc
+--echo End of Savepoint
+--echo
+ROLLBACK;
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test b/mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test
new file mode 100644
index 00000000000..f44d67e5c8c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_transaction_replay.test
@@ -0,0 +1,260 @@
+#
+# This test tests the operation of SR transaction replay. If a
+# potentially conflicting remote transaction arrives at
+# just the right time during the commit of a local transaction,
+# the local transaction will be aborted and replayed.
+#
+# This test is divided in two sections:
+# 1) Test the scenario where the last fragment does not have write set
+# payload, just commit flag is replicated
+# 2) Test the scenario where the last fragment has write set payload
+# and commit flag
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source include/galera_have_debug_sync.inc
+
+# Control connection for manipulating galera sync points
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_1
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+
+#########################################################################
+#
+# 1) Replay without commit fragment write set payload
+#
+#########################################################################
+
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+#
+# Block the commit from node_2
+#
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Issue conflicting UPDATE from node_2 and wait until it hits the
+# apply monitor (but does not apply yet)
+#
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Set a new sync point to block in local monitor on node_1 commit
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Send the commit on node_1
+#
+--connection node_1
+--send COMMIT
+
+#
+# Wait until commit reaches sync point
+#
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release conflicting slave transaction and wait until it has BF
+# aborted pending COMMIT
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = abort_trx_end local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release both threads, local thread will now replay
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+#
+# Commit must succeed
+#
+--connection node_1
+--reap
+
+
+#
+# Check the outcome and that wsrep schema SR table is empty
+#
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# wsrep_local_replays has increased by 1
+#
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DELETE FROM t1;
+
+#########################################################################
+#
+# 2) Replay with commit fragment write set payload
+#
+#########################################################################
+
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+
+#
+# Do first update SR on
+#
+UPDATE t1 SET f2 = 'x' WHERE f1 = 1;
+
+#
+# Disable SR for following statements
+#
+SET SESSION wsrep_trx_fragment_size = 0;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+#
+# Block the commit from node_2
+#
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Issue conflicting UPDATE from node_2 and wait until it hits the
+# apply monitor (but does not apply yet)
+#
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Set a new sync point to block in local monitor on node_1 commit
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# Send the commit on node_1
+#
+--connection node_1
+--send COMMIT
+
+#
+# Wait until commit reaches sync point
+#
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release conflicting slave transaction and wait until it has BF
+# aborted pending COMMIT
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_set_sync_point.inc
+
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = abort_trx_end local_monitor_master_enter_sync
+--source include/galera_wait_sync_point.inc
+
+#
+# Release both threads, local thread will now replay
+#
+--source include/galera_clear_sync_point.inc
+--let $galera_sync_point = abort_trx_end
+--source include/galera_signal_sync_point.inc
+
+--let $galera_sync_point = local_monitor_master_enter_sync
+--source include/galera_signal_sync_point.inc
+
+#
+# Commit must succeed
+#
+--connection node_1
+--reap
+
+
+#
+# Check the outcome and that wsrep schema SR table is empty
+#
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+#
+# wsrep_local_replays has increased by 1
+#
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 2 AS wsrep_local_replays;
+--enable_query_log
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
+SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+DELETE FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test b/mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test
new file mode 100644
index 00000000000..0cf05765838
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_unit_statements.test
@@ -0,0 +1,54 @@
+#
+# Test wsrep_fragment_unit = statements
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 3;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+
+--connection node_1
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+# Expect noting is replicated yet, so far we have 2 statements
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+INSERT INTO t1 VALUES (2);
+
+# Expect 2 rows in t1 and 1 fragment in SR table
+--connection node_2
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+ --connection node_1
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+# Expect 5 rows in t1 and 2 fragments in SR table
+--connection node_2
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+COMMIT;
+
+# Expect 5 rows in t1 and empty SR table
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt
new file mode 100644
index 00000000000..0b5f8bf7104
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events-master.opt
@@ -0,0 +1 @@
+--log-bin-use-v1-row-events=1 --wsrep-trx-fragment-size=1
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test
new file mode 100644
index 00000000000..d3d4d2d0c14
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_v1_row_events.test
@@ -0,0 +1,27 @@
+#
+# Test that Galera SR continues to run even with --log-bin-use-v1-row-events=1
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+SELECT COUNT(*) = 1 FROM t1;
+
+--connection node_1
+COMMIT;
+
+SET AUTOCOMMIT=ON;
+UPDATE t1 SET f1 = 2 WHERE f1 = 1;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test
new file mode 100644
index 00000000000..98f6e796ef6
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test
@@ -0,0 +1,70 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that SR transaction is cumulatively allowed to grow beyond repl.max_ws_size
+# if individual fragements are below that size
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+
+SET SESSION wsrep_trx_fragment_size = 512;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=4096';
+
+#
+# Create a transaction larger than repl.max_ws_size
+#
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1;
+
+#
+# We expect that the transaction can proceed successfully
+#
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) > 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+# Commit succeeds
+COMMIT;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 100 FROM t1;
+
+#
+# Cleanup
+#
+
+DROP TABLE t1;
+DROP TABLE ten;
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
+--enable_query_log
+
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test
new file mode 100644
index 00000000000..2b9bc4819b8
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test
@@ -0,0 +1,62 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test that if wsrep_trx_fragment_size > repl.max_ws_size, no SR takes place and
+# the transaction is properly aborted.
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(254)) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+--let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
+--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+
+SET SESSION wsrep_trx_fragment_size = 256;
+SET GLOBAL wsrep_provider_options='repl.max_ws_size=128';
+
+#
+# Create a transaction larger than repl.max_ws_size
+#
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+--error ER_ERROR_DURING_COMMIT,ER_ERROR_ON_WRITE,ER_BINLOG_ROW_LOGGING_FAILED
+INSERT INTO t1 (f2) SELECT REPEAT('x', 254) FROM ten AS a1, ten AS a2;
+
+#
+# We expect that the transaction can not complete successfully
+#
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--sleep 2
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+SELECT COUNT(*) = 0 FROM t1;
+
+#
+# Cleanup
+#
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_trx_fragment_size = $wsrep_trx_fragment_size_orig;
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
+--enable_query_log
+
+DROP TABLE t1;
+DROP TABLE ten;
+
+call mtr.add_suppression('WSREP: SR rollback replication failure.*');
+call mtr.add_suppression('WSREP: transaction size limit.*');
+call mtr.add_suppression('WSREP: SR rbr write fail.*');
+call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*');
+call mtr.add_suppression('WSREP: transaction size exceeded.*');
+call mtr.add_suppression('WSREP: fragment replication failed:');
+call mtr.add_suppression('WSREP: post commit failed for SR rollback');
+call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*');
+call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *');
diff --git a/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test
new file mode 100644
index 00000000000..ea40f58db73
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test
@@ -0,0 +1,38 @@
+#
+# Test option wsrep_ignore_apply_errors
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Delete row that does not exist using SR transaction
+#
+
+--connection node_2
+SET GLOBAL wsrep_ignore_apply_errors = 2;
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (2);
+SET GLOBAL wsrep_on = OFF;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_on = ON;
+SET SESSION wsrep_trx_fragment_size = 1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (3);
+DELETE FROM t1 WHERE f1 = 1;
+DELETE FROM t1 WHERE f1 = 2;
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 1 FROM t1;
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+
+SET SESSION wsrep_trx_fragment_size = 0;
+DROP TABLE t1;
+
+SET GLOBAL wsrep_ignore_apply_errors = 7;
+CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
+CALL mtr.add_suppression("Can't find record in 't1'"); \ No newline at end of file
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep#215.test b/mysql-test/suite/galera_sr/t/mysql-wsrep#215.test
new file mode 100644
index 00000000000..81b4a718f68
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep#215.test
@@ -0,0 +1,175 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# Test the following sequence of events:
+#
+# 1. Node #1 begins a transaction
+# 2. Node #2 performs a conflicting insert
+# 3. Node #1 attempts to SR-replicate a conflicting transaction
+#
+
+# to sync node_1 appliers
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
+SET SESSION wsrep_trx_fragment_size = 2;
+SET SESSION wsrep_trx_fragment_unit = 'statements';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+--send INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+# Wait for the above INSERT to fail certification
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+COMMIT;
+
+SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+SET DEBUG_SYNC = 'RESET';
+
+#
+# Similar test with BYTES unit
+#
+--connection node_1
+TRUNCATE TABLE t1;
+
+SET SESSION wsrep_trx_fragment_size = 10;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+SELECT COUNT(*) = 0 FROM t1;
+--send INSERT INTO t1 VALUES (1)
+
+# Wait for the above INSERT to fail certification
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+ROLLBACK;
+
+SELECT * FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT * FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+SET DEBUG_SYNC = 'RESET';
+
+#
+# One more test with BYTES unit, but now fragment size is adjusted so
+# that second insert should trigger fragment replication.
+# Currently 200 bytes is good choice here, but this may change with
+# future MySQL versions.
+# => If this test fails after some MySQL merge, check if frgament size
+# needs to be tuned to spot at second insert statement.
+#
+--connection node_1
+TRUNCATE TABLE t1;
+
+SET SESSION wsrep_trx_fragment_size = 200;
+SET SESSION wsrep_trx_fragment_unit = 'bytes';
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
+SET SESSION wsrep_sync_wait = 0;
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+--connection node_1a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+--send INSERT INTO t1 VALUES (2)
+
+# Wait for the above INSERT to fail certification
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+COMMIT;
+
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_2
+SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+
+--connection node_1a
+DROP TABLE t1;
+SET DEBUG_SYNC = 'RESET';
+
+--connection node_2
+CALL mtr.add_suppression("WSREP: Could not find applier context for");
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt
new file mode 100644
index 00000000000..03fcb5d040d
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136-master.opt
@@ -0,0 +1 @@
+--log-slave-updates --log-bin
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test
new file mode 100644
index 00000000000..06e56d3c9cd
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#136.test
@@ -0,0 +1,41 @@
+# SR transactions are not binlogged #136
+
+--source include/galera_cluster.inc
+
+--connection node_1
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+RESET MASTER;
+SET GLOBAL wsrep_on=ON;
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+COMMIT;
+
+SET SESSION wsrep_trx_fragment_size = 0;
+INSERT INTO t1 VALUES (3),(4);
+COMMIT;
+
+--connection node_1
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+--connection node_2
+# Wait for all updates to arrive before dumping binlog
+SELECT COUNT(*) = 4 FROM t1;
+
+--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
+--replace_column 2 <Pos> 5 <End_log_pos>
+SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test
new file mode 100644
index 00000000000..3694dc9ad43
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#138.test
@@ -0,0 +1,25 @@
+# SR: two identical transactions have different value for the WSREP_FLAG_PA_UNSAFE flag
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2);
+
+--connection node_2
+SELECT flags FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+ROLLBACK;
+INSERT INTO t1 VALUES (3),(4);
+
+--connection node_2
+SELECT flags FROM mysql.wsrep_streaming_log;
+
+--connection node_1
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test
new file mode 100644
index 00000000000..deeb890fa0b
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#14.test
@@ -0,0 +1,21 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+
+COMMIT;
+
+DROP TABLE t1;
+
+--connection node_2
+--source include/galera_wait_ready.inc
+
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
new file mode 100644
index 00000000000..5210b9ce99e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
@@ -0,0 +1,60 @@
+# statement rollback for SR transaction causes slave crash for inconsistency
+
+# We test the following:
+# 1. Create a transaction that is blocked by an SR transaction
+# 2. Force the SR transaction to have a statement rollback
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
+
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 2;
+SET GLOBAL DEBUG = 'd,sync.wsrep_apply_cb';
+
+# Begin SR transaction
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+
+# Begin non-SR transaction that will block waiting for the SR transaction
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+--send INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
+
+# Cause the SR transaction to fail with a duplicate key error
+--connection node_1
+--send INSERT INTO t1 SELECT * FROM t2;
+
+# Continue and commit the non-SR transaction.
+--connection node_1a
+--reap
+INSERT INTO t1 VALUES (6), (7), (8), (9), (10);
+COMMIT;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK,ER_DUP_ENTRY
+--reap
+
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 1;
+SET GLOBAL DEBUG = '';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
+
+SELECT COUNT(*) = 10 FROM t1;
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test
new file mode 100644
index 00000000000..4aaff058b30
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#15.test
@@ -0,0 +1,17 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (id INT) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc
new file mode 100644
index 00000000000..29755ab6c2e
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.inc
@@ -0,0 +1,104 @@
+# --source include/galera_cluster.inc
+# --source include/have_debug_sync.inc
+
+#
+# This test attempts to catch a race condition between autocommit
+# transaction and transaction which is rolling back due to
+# deadlock.
+#
+# Test outline:
+# * Trx 1a makes updates
+# * SR trx 1b writes a row 3, then makes updates
+# * AC trx 1c will attempt to write row 3 and will wait for lock
+# held by 1b
+# * Sync point is set for 1b to delay SR rollback
+# * SR trx 1b makes an update which makes it conflict with trx 1a
+# * Slave shows BF - BF conflict and fails in applying write event
+
+--connection node_1
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 VARCHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 'x'), (2, 'x'), (4, 'x'), (5, 'x');
+
+# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+# --connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+# --connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--connection node_1a
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'a' WHERE f1 = 1;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 4;
+UPDATE t1 SET f2 = 'a' WHERE f1 = 5;
+
+
+--connection node_1b
+START TRANSACTION;
+SET SESSION wsrep_trx_fragment_size = 1;
+INSERT INTO t1 VALUES (3, 'b');
+UPDATE t1 SET f2 = 'b' WHERE f1 = 2;
+
+--connection node_2
+SELECT * FROM t1;
+
+# Will block, waiting for 1b
+--connection node_1c
+SET AUTOCOMMIT=ON;
+--send INSERT INTO t1 VALUES (3, 'c')
+
+--connection node_2
+SELECT * FROM t1;
+
+# Will block, waiting for 1b
+--connection node_1a
+--send UPDATE t1 SET f2 = 'a' WHERE f1 = 2
+
+# Will deadlock
+--connection node_1b
+SET DEBUG_SYNC = 'wsrep_before_SR_rollback SIGNAL wait WAIT_FOR continue';
+--send UPDATE t1 SET f2 = 'b' WHERE f1 = 1
+
+# Wait until 1b hits rollback
+--connection node_1
+SET DEBUG_SYNC = 'now WAIT_FOR wait';
+
+# UPDATE 12.06.2016: as of recent wsrep API changes, rollbacking thread no
+# longer queues ROLLBACKs and blocks on ROLLBACK replication before performing
+# the actual rollback. As a result this test is moot as both node_1a and node_1c
+# connections are hanging now until sync point is released. Thus sync point
+# release had to be moved above to release the connections. However it is not
+# impossible that further changes in the code may reintroduce the race, so
+# leaving the test as close to original as possible.
+#
+# --connection node_1a
+# --reap
+# COMMIT;
+#
+# --connection node_1c
+# --reap
+#
+# UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+
+--connection node_1
+SET DEBUG_SYNC = 'now SIGNAL continue';
+
+--connection node_1c
+--reap
+
+UPDATE t1 SET f2 = 'x' WHERE f1 = 3;
+
+--connection node_1a
+--reap
+COMMIT;
+
+--connection node_1b
+--error ER_LOCK_DEADLOCK
+--reap
+
+--connection node_1
+SELECT * FROM t1;
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test
new file mode 100644
index 00000000000..85d501288b0
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#165.test
@@ -0,0 +1,41 @@
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+
+#
+# This test attempts to catch a race condition between autocommit
+# transaction and transaction which is rolling back due to
+# deadlock.
+#
+# Since it is trying to catch a race condition which may not reliably
+# occur, several runs are necessary for certainty. Hence the body of
+# the test was placed into the .inc file and sourced several times below
+#
+# Test outline:
+# * Trx 1a makes updates
+# * SR trx 1b writes a row 3, then makes updates
+# * AC trx 1c will attempt to write row 3 and will wait for lock
+# held by 1b
+# * Sync point is set for 1b to delay SR rollback
+# * SR trx 1b makes an update which makes it conflict with trx 1a
+# * Slave shows BF - BF conflict and fails in applying write event
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
+--source mysql-wsrep-features#165.inc
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test
new file mode 100644
index 00000000000..544109dadee
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#22.test
@@ -0,0 +1,47 @@
+# Assertion `total_length + thd->wsrep_fragment_base == saved_pos' failed in wsrep_write_cache_inc() with ROLLBACK TO SAVEPOINT and SR
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER, f2 VARCHAR(10)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+SET SESSION wsrep_trx_fragment_size=1;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+INSERT INTO t1 VALUES (3, 'a');
+INSERT INTO t1 VALUES (4, 'a');
+INSERT INTO t1 VALUES (5, 'a');
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+SAVEPOINT s1;
+INSERT INTO t1 VALUES (11, 'b');
+INSERT INTO t1 VALUES (12, 'b');
+INSERT INTO t1 VALUES (13, 'b');
+INSERT INTO t1 VALUES (14, 'b');
+INSERT INTO t1 VALUES (15, 'b');
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+ROLLBACK TO SAVEPOINT s1;
+
+INSERT INTO t1 VALUES (21, 'c');
+
+COMMIT;
+
+--connection node_1
+SELECT COUNT(*) = 6 FROM t1;
+
+
+--connection node_2
+SELECT COUNT(*) = 6 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test
new file mode 100644
index 00000000000..f9c09391f8f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#27.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+--sleep 2
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test
new file mode 100644
index 00000000000..2349fe9979f
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test
@@ -0,0 +1,23 @@
+#
+# mysql-wsrep-features#29 Unwarranted deadlock error with SR and a single-node cluster
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+SET SESSION binlog_format = STATEMENT;
+
+create table t1 (id int not null, f_id int not null, f int not null,
+primary key(f_id, id)) engine=innodb;
+
+create table t2 (id int not null,s_id int not null,s varchar(200),
+primary key(id)) engine=innodb;
+
+INSERT INTO t1 VALUES (8, 1, 3);
+INSERT INTO t1 VALUES (1, 2, 1);
+INSERT INTO t2 VALUES (1, 0, '');
+INSERT INTO t2 VALUES (8, 1, '');
+
+DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
+WHERE mm.id IS NULL;
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt
new file mode 100644
index 00000000000..a6ef074a120
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32-master.opt
@@ -0,0 +1 @@
+--innodb-lock-wait-timeout=1
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test
new file mode 100644
index 00000000000..72c7a7b5e82
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#32.test
@@ -0,0 +1,44 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# mysql-wsrep-features#32 Assertion `meta->gtid.seqno == wsrep_thd_trx_seqno(thd)' failed in wsrep_commit_cb with SR
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+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;
+--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
+--source include/wait_condition.inc
+
+SET AUTOCOMMIT=OFF;
+
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (6);
+
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (5);
+ROLLBACK;
+
+--connection node_1
+COMMIT;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test
new file mode 100644
index 00000000000..c5cf1dea0ae
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test
@@ -0,0 +1,48 @@
+--source include/have_debug_sync.inc
+--source include/galera_cluster.inc
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+# Block node #2's applier so that it is able to issue a conflicting INSERT before
+# node #1 INSERTs have been applied on it.
+
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+SELECT COUNT(*) = 0 FROM t1;
+SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL debug = '+d,sync.wsrep_apply_cb';
+
+--connection node_1
+SET SESSION wsrep_trx_fragment_size = 1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+
+--connection node_2a
+SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+SELECT COUNT(*) = 0 FROM t1;
+--send INSERT INTO t1 VALUES (1);
+
+--connection node_1
+COMMIT;
+
+--connection node_2a
+SET GLOBAL debug = '';
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+
+--connection node_2
+--error ER_DUP_ENTRY,ER_LOCK_DEADLOCK
+--reap
+ROLLBACK;
+
+DROP TABLE t1;
+
+--connection node_2a
+SET DEBUG_SYNC = "RESET";
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test
new file mode 100644
index 00000000000..55210386044
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#8.test
@@ -0,0 +1,63 @@
+--source include/big_test.inc
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# InnoDB FULLTEXT indexes
+#
+
+SET SESSION wsrep_trx_fragment_size = 1;
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+#
+# Fulltext index creation causes the creation of multiple system tables
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
+
+--connection node_2
+SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
+
+#
+# Fulltext insertion causes a flurry of updates on those system tables
+#
+
+--connection node_1
+# Insert 10K rows
+INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+--connection node_2
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
+
+UPDATE t1 SET f2 = 'abcdefjhk';
+
+--connection node_1
+SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
+
+--connection node_2
+
+DROP TABLE t1;
+
+#
+# Same on a table with no PK
+#
+
+--connection node_1
+CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
+
+--connection node_2
+# We insert only 1K rows here, because updates without a PK are very slow
+INSERT INTO t1 (f1) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
+
+--connection node_1
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('foobarbaz');
+
+UPDATE t1 SET f1 = 'abcdefjhk';
+
+--connection node_2
+SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test
new file mode 100644
index 00000000000..cbecf40fadf
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#9.test
@@ -0,0 +1,44 @@
+#
+# mysql-wsrep-features#9 Hang in galera::ReplicatorSMM::cert with Streaming Replication
+# when running the galera_kill_ddl.test test
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+--connection node_1
+
+# Enable the master to continue running during the split-brain situation that
+# occurs when the slave is killed
+--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
+SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
+
+SET SESSION wsrep_trx_fragment_size = 1;
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+--connection node_2
+--source include/kill_galera.inc
+
+--connection node_1
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_2
+--source include/start_mysqld.inc
+--source include/galera_wait_ready.inc
+
+--let $galera_connection_name = node_2a
+--let $galera_server_number = 2
+--source include/galera_connect.inc
+--connection node_2a
+
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--connection node_1
+--disable_query_log
+--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
+--enable_query_log
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test
new file mode 100644
index 00000000000..442a7113537
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#93.test
@@ -0,0 +1,29 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+#
+# This test sets a SAVEPOINT at the very beginning
+# of the transaction. When ROLLBACK TO SAVEPOINT is
+# issued, mysql performs a full rollback on SEs that
+# where not part of the transaction.
+# Test that SR transactions are rolled back, and
+# cleaned up properly in this case.
+#
+
+CREATE TABLE t1 (f1 INTEGER);
+SET SESSION WSREP_TRX_FRAGMENT_SIZE=1;
+
+START TRANSACTION;
+
+SAVEPOINT a;
+INSERT INTO t1 VALUES (1);
+ROLLBACK TO SAVEPOINT a;
+
+INSERT INTO t1 values (2);
+COMMIT;
+
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+--connection node_2
+SELECT COUNT(*) = 0 from mysql.wsrep_streaming_log;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test
new file mode 100644
index 00000000000..c773b310183
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-features#96.test
@@ -0,0 +1,45 @@
+# mysql-wsrep-features#96 - "Sanity check failed" with SR and statement rolled back due to error
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+
+--connection node_1
+
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
+CREATE TABLE t2 (f2 VARCHAR(32));
+
+SET SESSION wsrep_trx_fragment_size=1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+
+# This statement causes full transaction rollback
+# rather than just statement rollback, as it is run under SR
+
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (2),(1);
+INSERT INTO t2 VALUES ('abc');
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 1 FROM t2;
+
+--connection node_1
+ROLLBACK;
+
+--connection node_2
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+
+SELECT COUNT(*) = 0 FROM t1;
+SELECT COUNT(*) = 0 FROM t2;
+
+--connection node_1
+DROP TABLE t1;
+DROP TABLE t2;
+
+
+
+
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result
index 9aff30aabc9..3d19f718287 100644
--- a/mysql-test/suite/gcol/r/gcol_bugfixes.result
+++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result
@@ -231,6 +231,7 @@ Note 1265 Data truncated for column 'col_time_key' at row 5
Note 1265 Data truncated for column 'col_time_key' at row 6
ANALYZE TABLE c;
Table Op Msg_type Msg_text
+test.c analyze status Engine-independent statistics collected
test.c analyze status OK
explain SELECT COUNT(DISTINCT col_varchar_key) AS x
FROM c
@@ -327,6 +328,7 @@ ALTER TABLE t1 ADD COLUMN c INT GENERATED ALWAYS AS (b + 1) VIRTUAL;
ALTER TABLE t1 ADD INDEX( c );
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Make sure the index is correct. That's kinda important.
EXPLAIN
diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
index 577b3255620..2ea0a256df7 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
@@ -348,6 +348,7 @@ CREATE TABLE t1 (f1 int, gc int AS (f1 + 1) STORED, UNIQUE(gc));
INSERT INTO t1(f1) VALUES (1),(2),(0),(9),(3),(4),(8),(7),(5),(6);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Should use index
SELECT * FROM t1 WHERE f1 + 1 > 7;
@@ -455,6 +456,7 @@ INSERT INTO t1(f1) VALUES
(070707),(080808);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 WHERE f1 + 1 > 070707;
f1 gc_int gc_date
@@ -489,6 +491,7 @@ KEY col_int_gc_key(col_int_gc_key)
INSERT INTO t1 ( col_int_key) VALUES (7);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2
FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk))
@@ -696,8 +699,6 @@ Warning 1264 Out of range value for column 'b' at row 1
SELECT * FROM t WHERE c = '0';
a b c
1 127 0
-Warnings:
-Warning 1264 Out of range value for column 'b' at row 1
DROP TABLE t;
#
# Bug#21688115 VIRTUAL COLUMN COMPUTATION SAVE_IN_FIELD()
@@ -729,6 +730,7 @@ INDEX(gc_case));
INSERT INTO t (a, b) VALUES (0, 0), (0, 1), (1, 0), (1, 1);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
EXPLAIN SELECT a, b FROM t WHERE (a AND b) = 1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -811,7 +813,9 @@ CREATE TABLE t2 (b INTEGER);
INSERT INTO t2 VALUES (1);
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
# Used to choose the index on a1 and get wrong results.
EXPLAIN SELECT * FROM t1 WHERE (a2 AND a2) = 0;
diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
index dcbba1f70c1..8ef6736388a 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
@@ -348,6 +348,7 @@ CREATE TABLE t1 (f1 int, gc int AS (f1 + 1) STORED, UNIQUE(gc));
INSERT INTO t1(f1) VALUES (1),(2),(0),(9),(3),(4),(8),(7),(5),(6);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
# Should use index
SELECT * FROM t1 WHERE f1 + 1 > 7;
@@ -455,6 +456,7 @@ INSERT INTO t1(f1) VALUES
(070707),(080808);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 WHERE f1 + 1 > 070707;
f1 gc_int gc_date
@@ -489,6 +491,7 @@ KEY col_int_gc_key(col_int_gc_key)
INSERT INTO t1 ( col_int_key) VALUES (7);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2
FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk))
@@ -727,6 +730,7 @@ INDEX(gc_case));
INSERT INTO t (a, b) VALUES (0, 0), (0, 1), (1, 0), (1, 1);
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
EXPLAIN SELECT a, b FROM t WHERE (a AND b) = 1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -809,7 +813,9 @@ CREATE TABLE t2 (b INTEGER);
INSERT INTO t2 VALUES (1);
ANALYZE TABLE t1, t2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
# Used to choose the index on a1 and get wrong results.
EXPLAIN SELECT * FROM t1 WHERE (a2 AND a2) = 0;
diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result
index bc9bddad690..983e1fb2533 100644
--- a/mysql-test/suite/gcol/r/gcol_select_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result
@@ -20,8 +20,11 @@ c int generated always as (-a) stored unique);
insert into t3 (a) values (2),(1),(3);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
# select_type=SIMPLE, type=system
select * from t2;
@@ -676,9 +679,13 @@ INSERT INTO t4
VALUES (1, 'j'), (2, 'c'), (0, 'a');
ANALYZE TABLE t1, t2, t3, t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
EXPLAIN SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1
FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2
diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result
index d0fe7fbd0d4..e823458483d 100644
--- a/mysql-test/suite/gcol/r/gcol_select_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result
@@ -20,8 +20,11 @@ c int generated always as (-a) stored unique);
insert into t3 (a) values (2),(1),(3);
analyze table t1,t2,t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
# select_type=SIMPLE, type=system
select * from t2;
@@ -853,7 +856,9 @@ Warnings:
Note 1265 Data truncated for column 'col_time_key' at row 1
ANALYZE TABLE a, c;
Table Op Msg_type Msg_text
+test.a analyze status Engine-independent statistics collected
test.a analyze status OK
+test.c analyze status Engine-independent statistics collected
test.c analyze status OK
EXPLAIN
SELECT
@@ -931,7 +936,9 @@ col_varchar_nokey
(5, 'b'),(8,'m'),(7, 'j'),(2, 'v');
ANALYZE TABLE c, cc;
Table Op Msg_type Msg_text
+test.c analyze status Engine-independent statistics collected
test.c analyze status OK
+test.cc analyze status Engine-independent statistics collected
test.cc analyze status OK
EXPLAIN SELECT
alias2 . col_varchar_key AS field1
@@ -1298,9 +1305,13 @@ INSERT INTO t4
VALUES (1, 'j'), (2, 'c'), (0, 'a');
ANALYZE TABLE t1, t2, t3, t4;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
EXPLAIN SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1
FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2
diff --git a/mysql-test/suite/gcol/r/gcol_view_innodb.result b/mysql-test/suite/gcol/r/gcol_view_innodb.result
index ec82c792493..b23dbfc4bff 100644
--- a/mysql-test/suite/gcol/r/gcol_view_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_view_innodb.result
@@ -5,6 +5,7 @@ c int generated always as (-a) stored);
insert into t1 (a) values (1), (1), (2), (2), (3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create view v1 (d,e) as select abs(b), abs(c) from t1;
select d,e from v1;
diff --git a/mysql-test/suite/gcol/r/gcol_view_myisam.result b/mysql-test/suite/gcol/r/gcol_view_myisam.result
index 13cb74ebcb5..264bd904c30 100644
--- a/mysql-test/suite/gcol/r/gcol_view_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_view_myisam.result
@@ -5,6 +5,7 @@ c int generated always as (-a) stored);
insert into t1 (a) values (1), (1), (2), (2), (3);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create view v1 (d,e) as select abs(b), abs(c) from t1;
select d,e from v1;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result b/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
index 25faeaf4e84..1d4766eab19 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_fk_restart.result
@@ -7,9 +7,18 @@ CREATE TABLE t1(fld1 INT NOT NULL PRIMARY KEY) engine=innodb;
CREATE TABLE t2(fld1 INT NOT NULL, fld2 INT NOT NULL,
fld3 INT AS (fld2) VIRTUAL, KEY(fld1),
FOREIGN KEY(fld1) REFERENCES t1(fld1) ON UPDATE CASCADE) engine=innodb;
+CREATE TABLE u1(a INT, KEY(a)) ENGINE=InnoDB;
+CREATE TABLE u2(b INT, vb INT GENERATED ALWAYS AS(b) VIRTUAL, KEY(vb),
+FOREIGN KEY(b) REFERENCES u1(a)ON DELETE CASCADE)ENGINE=InnoDB;
+INSERT INTO u1 SET a=1;
+INSERT INTO u2 SET b=1;
INSERT INTO t1(fld1) VALUES(1);
INSERT INTO t2(fld1, fld2) VALUES(1, 2);
UPDATE t1 SET fld1= 2;
+DELETE FROM u1;
+SELECT * FROM u2;
+b vb
+DROP TABLE u2,u1;
SELECT fld3, fld1 FROM t2;
fld3 fld1
2 2
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result
index 8d4762e1b90..6913ec698b4 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_index.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result
@@ -135,7 +135,7 @@ key (d)
insert into t(a) values ((select d from s for update));
insert into s(c) values ('');
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'c' at row 1
+Warning 1366 Incorrect integer value: '' for column `test`.`s`.`c` at row 1
SET sql_mode = default;
drop table if exists t,s;
#
@@ -239,3 +239,23 @@ KEY (a(1))
INSERT INTO t1(b) VALUES(REPEAT('b',1000));
DELETE FROM t1;
DROP TABLE t1;
+#
+# Bug #22990029 GCOLS: INCORRECT BEHAVIOR
+# AFTER DATA INSERTED WITH IGNORE KEYWORD
+#
+CREATE TABLE t1(a INT PRIMARY KEY, b INT, vb DATE AS(b) VIRTUAL, KEY(vb))
+ENGINE=InnoDB;
+INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132);
+Warnings:
+Warning 1265 Data truncated for column 'vb' at row 1
+BEGIN;
+DELETE FROM t1;
+INSERT INTO t1 (a,b) VALUES(1,20190123);
+ERROR 22007: Incorrect date value: '20190132' for column `test`.`t1`.`vb` at row 1
+SELECT * FROM t1;
+a b vb
+ROLLBACK;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test b/mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test
index 61d330036ea..45d1c1295a5 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_fk_restart.test
@@ -11,10 +11,19 @@ CREATE TABLE t1(fld1 INT NOT NULL PRIMARY KEY) engine=innodb;
CREATE TABLE t2(fld1 INT NOT NULL, fld2 INT NOT NULL,
fld3 INT AS (fld2) VIRTUAL, KEY(fld1),
FOREIGN KEY(fld1) REFERENCES t1(fld1) ON UPDATE CASCADE) engine=innodb;
+CREATE TABLE u1(a INT, KEY(a)) ENGINE=InnoDB;
+CREATE TABLE u2(b INT, vb INT GENERATED ALWAYS AS(b) VIRTUAL, KEY(vb),
+ FOREIGN KEY(b) REFERENCES u1(a)ON DELETE CASCADE)ENGINE=InnoDB;
+
+INSERT INTO u1 SET a=1;
+INSERT INTO u2 SET b=1;
INSERT INTO t1(fld1) VALUES(1);
INSERT INTO t2(fld1, fld2) VALUES(1, 2);
--source include/restart_mysqld.inc
UPDATE t1 SET fld1= 2;
+DELETE FROM u1;
+SELECT * FROM u2;
+DROP TABLE u2,u1;
SELECT fld3, fld1 FROM t2;
alter TABLE t2 ADD INDEX vk(fld3, fld1), ALGORITHM=INPLACE;
UPDATE t1 SET fld1=3;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test
index 8f4e09fdf31..a89ae813b05 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_index.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test
@@ -263,3 +263,22 @@ CREATE TABLE t1(
INSERT INTO t1(b) VALUES(REPEAT('b',1000));
DELETE FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # Bug #22990029 GCOLS: INCORRECT BEHAVIOR
+--echo # AFTER DATA INSERTED WITH IGNORE KEYWORD
+--echo #
+
+CREATE TABLE t1(a INT PRIMARY KEY, b INT, vb DATE AS(b) VIRTUAL, KEY(vb))
+ENGINE=InnoDB;
+INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132);
+BEGIN;
+DELETE FROM t1;
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 (a,b) VALUES(1,20190123);
+SELECT * FROM t1;
+ROLLBACK;
+# MDEV-18366 FIXME: fix the crash and enable this
+# SELECT * FROM t1;
+CHECK TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/handler/aria.result b/mysql-test/suite/handler/aria.result
index 90b2eab902c..1896e30f7d5 100644
--- a/mysql-test/suite/handler/aria.result
+++ b/mysql-test/suite/handler/aria.result
@@ -808,6 +808,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
@@ -927,6 +928,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
unlock tables;
handler t1 read next;
@@ -1483,7 +1485,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
diff --git a/mysql-test/suite/handler/heap.result b/mysql-test/suite/handler/heap.result
index 7b81748700e..32d06b79604 100644
--- a/mysql-test/suite/handler/heap.result
+++ b/mysql-test/suite/handler/heap.result
@@ -808,7 +808,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
-test.t1 analyze note The storage engine for the table doesn't support analyze
+test.t1 analyze status Operation failed
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
#
@@ -927,6 +927,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze note The storage engine for the table doesn't support analyze
unlock tables;
handler t1 read next;
@@ -1483,7 +1484,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result
index 05cf36fee9e..a1b2b318911 100644
--- a/mysql-test/suite/handler/innodb.result
+++ b/mysql-test/suite/handler/innodb.result
@@ -810,6 +810,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
@@ -930,6 +931,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
unlock tables;
handler t1 read next;
@@ -1487,7 +1489,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
diff --git a/mysql-test/suite/handler/interface.result b/mysql-test/suite/handler/interface.result
index c4a169be185..8c39b15b6c9 100644
--- a/mysql-test/suite/handler/interface.result
+++ b/mysql-test/suite/handler/interface.result
@@ -175,6 +175,7 @@ c1
connect flush,localhost,root,,;
connection flush;
flush tables;
+flush table t1;
connect waiter,localhost,root,,;
connection waiter;
connection default;
@@ -258,10 +259,11 @@ a b
flush tables;
handler t1 read a next;
a b
-0 a
+2 c
+flush tables t1;
handler t1 read a next;
a b
-1 b
+0 a
flush tables with read lock;
handler t1 read a next;
a b
diff --git a/mysql-test/suite/handler/interface.test b/mysql-test/suite/handler/interface.test
index 15853dfdbf5..0ecdbf9c5cf 100644
--- a/mysql-test/suite/handler/interface.test
+++ b/mysql-test/suite/handler/interface.test
@@ -179,12 +179,13 @@ handler t1 open;
handler t1 read first;
connect (flush,localhost,root,,);
connection flush;
-send flush tables;
+flush tables;
+send flush table t1;
connect (waiter,localhost,root,,);
connection waiter;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = "Waiting for table flush";
+ where state = "Waiting for table metadata lock";
--source include/wait_condition.inc
connection default;
handler t2 open;
@@ -282,6 +283,7 @@ handler t1 read a first;
handler t1 read a next;
flush tables;
handler t1 read a next;
+flush tables t1;
handler t1 read a next;
flush tables with read lock;
handler t1 read a next;
diff --git a/mysql-test/suite/handler/myisam.result b/mysql-test/suite/handler/myisam.result
index 8681bb905a0..2c5f8c3bfde 100644
--- a/mysql-test/suite/handler/myisam.result
+++ b/mysql-test/suite/handler/myisam.result
@@ -808,6 +808,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
handler t1 open;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
handler t1 read next;
ERROR 42S02: Unknown table 't1' in HANDLER
@@ -927,6 +928,7 @@ handler t1 open;
lock tables t1 write;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
unlock tables;
handler t1 read next;
@@ -1483,7 +1485,7 @@ handler t2 open;
flush tables with read lock;
handler t1 read next;
a b
-1 1
+2 1
select a from t3;
a
1
diff --git a/mysql-test/suite/innodb/include/alter_instant.inc b/mysql-test/suite/innodb/include/alter_instant.inc
deleted file mode 100644
index cf0c082416b..00000000000
--- a/mysql-test/suite/innodb/include/alter_instant.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-CREATE TABLE t1(f1 INT NOT NULL,
- f2 INT NOT NULL,
- f3 INT AS (f2 * f2) VIRTUAL)engine=innodb;
-
-INSERT INTO t1(f1, f2) VALUES(1, 1);
-
---echo #
---echo # ALGORITHM=$algorithm_type
---echo #
-
---enable_info
---echo # Add column at the end of the table
---error $error_code
---eval ALTER TABLE t1 ADD COLUMN f4 char(100) default "BIG WALL", ALGORITHM=$algorithm_type
-
---echo # Change virtual column expression
---error $error_code
---eval ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL, ALGORITHM=$algorithm_type
-
---echo # Add virtual column
---error $error_code
---eval ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL, ALGORITHM=$algorithm_type
-
---echo # Rename Column
---error $error_code
---eval ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL, ALGORITHM=$algorithm_type
-
---echo # Rename table
---error $error_code
---eval ALTER TABLE t1 RENAME t2, algorithm=$algorithm_type
-
-DROP TABLE t2;
---disable_info
diff --git a/mysql-test/suite/innodb/include/crc32.pl b/mysql-test/suite/innodb/include/crc32.pl
new file mode 100644
index 00000000000..c2bce09dd36
--- /dev/null
+++ b/mysql-test/suite/innodb/include/crc32.pl
@@ -0,0 +1,33 @@
+# The following is Public Domain / Creative Commons CC0 from
+# http://billauer.co.il/blog/2011/05/perl-crc32-crc-xs-module/
+
+sub mycrc32 {
+ my ($input, $init_value, $polynomial) = @_;
+
+ $init_value = 0 unless (defined $init_value);
+ $polynomial = 0xedb88320 unless (defined $polynomial);
+
+ my @lookup_table;
+
+ for (my $i=0; $i<256; $i++) {
+ my $x = $i;
+ for (my $j=0; $j<8; $j++) {
+ if ($x & 1) {
+ $x = ($x >> 1) ^ $polynomial;
+ } else {
+ $x = $x >> 1;
+ }
+ }
+ push @lookup_table, $x;
+ }
+
+ my $crc = $init_value ^ 0xffffffff;
+
+ foreach my $x (unpack ('C*', $input)) {
+ $crc = (($crc >> 8) & 0xffffff) ^ $lookup_table[ ($crc ^ $x) & 0xff ];
+ }
+
+ $crc = $crc ^ 0xffffffff;
+
+ return $crc;
+}
diff --git a/mysql-test/suite/innodb/r/alter_candidate_key.result b/mysql-test/suite/innodb/r/alter_candidate_key.result
new file mode 100644
index 00000000000..23989e0da5f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/alter_candidate_key.result
@@ -0,0 +1,114 @@
+CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL,
+UNIQUE KEY uidx2(f1,f2),
+UNIQUE KEY uidx1(f2)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `uidx2` (`f1`,`f2`),
+ UNIQUE KEY `uidx1` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
+ SIGNAL conc_dml WAIT_FOR go_ahead';
+ALTER TABLE t1 CHANGE COLUMN f1 f11 INT, ALGORITHM=INPLACE;
+connect con1,localhost,root,,;
+SET DEBUG_SYNC = 'now WAIT_FOR conc_dml';
+DELETE FROM t1;
+SET DEBUG_SYNC = 'now SIGNAL go_ahead';
+connection default;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f11` int(11) DEFAULT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `uidx1` (`f2`),
+ UNIQUE KEY `uidx2` (`f11`,`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT, f2 INT,
+PRIMARY KEY(f1, f2),
+UNIQUE INDEX uidx2 (f1, f2),
+UNIQUE INDEX uidx1 (f2))ENGINE=InnoDB;
+ALTER TABLE t1 DROP PRIMARY KEY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `uidx2` (`f1`,`f2`),
+ UNIQUE KEY `uidx1` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
+ SIGNAL conc_dml WAIT_FOR go_ahead';
+ALTER TABLE t1 CHANGE COLUMN f1 f11 INT, ALGORITHM=INPLACE;
+connection con1;
+SET DEBUG_SYNC = 'now WAIT_FOR conc_dml';
+INSERT INTO t1 VALUES(1, 1), (1, 1);
+ERROR 23000: Duplicate entry '1-1' for key 'uidx2'
+SET DEBUG_SYNC = 'now SIGNAL go_ahead';
+connection default;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f11` int(11) DEFAULT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `uidx1` (`f2`),
+ UNIQUE KEY `uidx2` (`f11`,`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+SET SQL_MODE= strict_trans_tables;
+CREATE TABLE t1(a INT UNIQUE) ENGINE=InnoDB;
+SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done';
+ALTER TABLE t1 MODIFY COLUMN a INT NOT NULL;
+connection con1;
+SET DEBUG_SYNC='now WAIT_FOR dml';
+BEGIN;
+INSERT INTO t1 SET a=NULL;
+ROLLBACK;
+set DEBUG_SYNC='now SIGNAL dml_done';
+connection default;
+ERROR 22004: Invalid use of NULL value
+DROP TABLE t1;
+disconnect con1;
+SET DEBUG_SYNC="RESET";
+SET SQL_MODE=DEFAULT;
+CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY(f1, f2),
+UNIQUE KEY(f2))ENGINE=InnoDB;
+ALTER TABLE t1 DROP PRIMARY KEY;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `f2` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
+UNIQUE KEY(f2), UNIQUE KEY(f2))ENGINE=InnoDB;
+Warnings:
+Note 1831 Duplicate index `f2_2`. This is deprecated and will be disallowed in a future release
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `f2` (`f2`),
+ UNIQUE KEY `f2_2` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t1 DROP INDEX f2, ALGORITHM=INPLACE;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL,
+ UNIQUE KEY `f2_2` (`f2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
index 68e25664031..440a1d0d6b3 100644
--- a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
+++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
@@ -1,3 +1,4 @@
+select count_star into @init_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
connect ddl, localhost, root,,;
update performance_schema.setup_instruments set enabled='yes';
update performance_schema.setup_consumers set enabled='yes';
@@ -8,10 +9,10 @@ SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone';
ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR go';
-SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
-WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
-object_name
-tmp/Innodb Merge Temp File
+select count_star into @final_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
+SELECT @final_count - @init_count;
+@final_count - @init_count
+11
SET DEBUG_SYNC = 'now SIGNAL gone';
connection ddl;
disconnect ddl;
diff --git a/mysql-test/suite/innodb/r/analyze_table.result b/mysql-test/suite/innodb/r/analyze_table.result
index a5c25289ad1..57095b725eb 100644
--- a/mysql-test/suite/innodb/r/analyze_table.result
+++ b/mysql-test/suite/innodb/r/analyze_table.result
@@ -19,6 +19,7 @@ COUNT(*)
SET GLOBAL innodb_stats_persistent_sample_pages=2000;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DROP TABLE t1;
DROP PROCEDURE populate_t1;
diff --git a/mysql-test/suite/innodb/r/data_types.result b/mysql-test/suite/innodb/r/data_types.result
index 446d37527e5..1394431b09d 100644
--- a/mysql-test/suite/innodb/r/data_types.result
+++ b/mysql-test/suite/innodb/r/data_types.result
@@ -75,10 +75,15 @@ t1_VARCHAR_10_BINARY VARCHAR(10) BINARY,
t1_VARCHAR_500 VARCHAR(500),
t1_VARCHAR_500_BINARY VARCHAR(500) BINARY,
t1_YEAR_2 YEAR(2),
-t1_YEAR_4 YEAR(4)
+t1_YEAR_4 YEAR(4),
+t1_CHAR_0 CHAR(0),
+t1_MYSQL_0 CHAR(0) CHARACTER SET utf8,
+t1_VARCHAR_0 VARCHAR(0),
+t1_VARMYSQL_0 VARCHAR(0) CHARACTER SET utf8
) ENGINE=InnoDB;
Warnings:
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+INSERT INTO t1 () VALUES ();
SELECT
name,
CASE mtype
@@ -109,6 +114,7 @@ t1_BINARY_100 DATA_FIXBINARY
t1_BIT_2 DATA_FIXBINARY UNSIGNED
t1_BIT_20 DATA_FIXBINARY UNSIGNED
t1_BLOB DATA_BLOB
+t1_CHAR_0 DATA_CHAR
t1_CHAR_100 DATA_CHAR
t1_CHAR_100_BINARY DATA_MYSQL
t1_DATE DATA_INT
@@ -131,6 +137,7 @@ t1_MEDIUMBLOB DATA_BLOB
t1_MEDIUMINT DATA_INT
t1_MEDIUMINT_UNSIGNED DATA_INT UNSIGNED
t1_MEDIUMTEXT DATA_BLOB
+t1_MYSQL_0 DATA_MYSQL
t1_SET DATA_INT UNSIGNED
t1_SET_9 DATA_INT UNSIGNED
t1_SET_BINARY DATA_INT UNSIGNED
@@ -146,10 +153,24 @@ t1_TINYINT DATA_INT
t1_TINYINT_UNSIGNED DATA_INT UNSIGNED
t1_TINYTEXT DATA_BLOB
t1_VARBINARY_100 DATA_BINARY
+t1_VARCHAR_0 DATA_VARCHAR
t1_VARCHAR_10 DATA_VARCHAR
t1_VARCHAR_10_BINARY DATA_VARMYSQL
t1_VARCHAR_500 DATA_VARCHAR
t1_VARCHAR_500_BINARY DATA_VARMYSQL
+t1_VARMYSQL_0 DATA_VARMYSQL
t1_YEAR_2 DATA_INT UNSIGNED
t1_YEAR_4 DATA_INT UNSIGNED
DROP TABLE t1;
+#
+# MDEV-17815 Assertion failed in btr_node_ptr_max_size for CHAR(0)
+#
+CREATE TABLE t1 (c CHAR(0), KEY(c)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('');
+DROP TABLE t1;
+#
+# MDEV-18039 Assertion failed in btr_node_ptr_max_size for VARCHAR(0)
+#
+CREATE TABLE t1 (c VARCHAR(0), KEY(c)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('');
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff b/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff
index 5258b7193fa..fbf1d914f5b 100644
--- a/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/default_row_format_create,redundant.rdiff
@@ -9,3 +9,14 @@
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
SHOW TABLE STATUS LIKE 't1';
+@@ -31,8 +31,9 @@
+ CREATE TABLE t1 (c1 INT) ENGINE=InnoDB page_compressed=1;
+ SHOW TABLE STATUS LIKE 't1';
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL `page_compressed`=1 0 N
+ DROP TABLE IF EXISTS t1;
++Warnings:
++Note 1051 Unknown table 'test.t1'
+ SET @save_format = @@GLOBAL.innodb_default_row_format;
+ SET GLOBAL innodb_default_row_format = redundant;
+ CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/r/default_row_format_create.result b/mysql-test/suite/innodb/r/default_row_format_create.result
index 83d04b47bd0..262e8bc7f19 100644
--- a/mysql-test/suite/innodb/r/default_row_format_create.result
+++ b/mysql-test/suite/innodb/r/default_row_format_create.result
@@ -19,8 +19,26 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I
t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=REDUNDANT 0 N
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+ROW_FORMAT=COMPRESSED;
SHOW TABLE STATUS LIKE 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
-t1 InnoDB # Compressed # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPRESSED key_block_size=1 0 N
+t1 InnoDB # Compressed # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPRESSED 0 N
+TRUNCATE TABLE t1;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 InnoDB # Compressed # # # # # # NULL # NULL NULL latin1_swedish_ci NULL row_format=COMPRESSED 0 N
+DROP TABLE t1;
+CREATE TABLE t1 (c1 INT) ENGINE=InnoDB page_compressed=1;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 InnoDB # Dynamic # # # # # # NULL # NULL NULL latin1_swedish_ci NULL `page_compressed`=1 0 N
+DROP TABLE IF EXISTS t1;
+SET @save_format = @@GLOBAL.innodb_default_row_format;
+SET GLOBAL innodb_default_row_format = redundant;
+CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
+SET GLOBAL innodb_default_row_format = @save_format;
+TRUNCATE TABLE t1;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 InnoDB # Redundant # # # # # # NULL # NULL NULL latin1_swedish_ci NULL 0 N
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innochecksum.result b/mysql-test/suite/innodb/r/innochecksum.result
deleted file mode 100644
index 2d8a2652309..00000000000
--- a/mysql-test/suite/innodb/r/innochecksum.result
+++ /dev/null
@@ -1,5 +0,0 @@
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
-INSERT INTO t1 (b) VALUES ('corrupt me');
-INSERT INTO t1 (b) VALUES ('corrupt me');
-# Run innochecksum on t1
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result
index 73037247272..51ba58aa1ef 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result
@@ -75,3 +75,26 @@ connection default;
ERROR 23000: Duplicate entry '1' for key 'a'
SET DEBUG_SYNC='RESET';
DROP TABLE t1;
+#
+# MDEV-17470 Orphan temporary files after interrupted ALTER
+# cause InnoDB: Operating system error number 17 and eventual
+# fatal error 71
+#
+CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, i INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6),(NULL,7),(NULL,8);
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+LOCK TABLE t1 READ;
+connect con1,localhost,root,,test;
+ALTER TABLE t1 FORCE, ALGORITHM=COPY;
+connection default;
+kill query @id;
+connection con1;
+ERROR 70100: Query execution was interrupted
+disconnect con1;
+connection default;
+UNLOCK TABLES;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-table.result b/mysql-test/suite/innodb/r/innodb-alter-table.result
index 0d5afab6bae..ad3b2cb04af 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-table.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-table.result
@@ -218,6 +218,7 @@ t CREATE TABLE `t` (
PARTITION `p99991231` VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB)
analyze table t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
select count(*) from t where d ='2017-09-15';
count(*)
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 7b0a43297e0..bf06e9a992b 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -439,17 +439,17 @@ tt CREATE TABLE `tt` (
FULLTEXT KEY `ct` (`ct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE tt ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE tt ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
CREATE TABLE tu (
pk INT PRIMARY KEY, FTS_DOC_ID BIGINT UNSIGNED NOT NULL, t TEXT,
FULLTEXT INDEX(t)
) ENGINE=InnoDB;
ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
DROP TABLE tu;
CREATE TABLE tv (
pk INT PRIMARY KEY, FTS_DOC_ID BIGINT UNSIGNED NOT NULL, t TEXT,
@@ -457,9 +457,9 @@ UNIQUE INDEX FTS_DOC_ID_INDEX(FTS_DOC_ID),
FULLTEXT INDEX(t)
) ENGINE=InnoDB;
ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
DROP TABLE tv;
ALTER TABLE t1o CHANGE c1 dB_row_Id INT, ALGORITHM=COPY;
ERROR 42000: Incorrect column name 'dB_row_Id'
@@ -500,8 +500,6 @@ ADD COLUMN FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
ALTER TABLE t1o ADD COLUMN FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ALGORITHM=INPLACE;
-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
-ALTER TABLE t1o ADD COLUMN FTS_DOC_ID BIGINT UNSIGNED NOT NULL;
ALTER TABLE t1o DROP COLUMN FTS_DOC_ID, ALGORITHM=INPLACE;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot drop or rename FTS_DOC_ID. Try ALGORITHM=COPY
ALTER TABLE t1o DROP COLUMN FTS_DOC_ID;
@@ -881,6 +879,27 @@ NAME
a
b
DROP TABLE t1;
+# and an MDEV-18041 regression related to indexes prefixes
+create table `test` (
+`test_old` varchar(255) NOT NULL,
+`other` varchar(255) NOT NULL,
+PRIMARY KEY (`test_old`,`other`),
+UNIQUE KEY uk (`test_old`(100), `other`)
+) ENGINE=InnoDB;
+select name, pos from information_schema.innodb_SYS_FIELDS where name in ('test_old', 'other', 'test_new');
+name pos
+test_old 0
+other 1
+test_old 0
+other 1
+alter table `test` CHANGE COLUMN `test_old` `test_new` varchar(255) NOT NULL;
+select name, pos from information_schema.innodb_SYS_FIELDS where name in ('test_old', 'other', 'test_new');
+name pos
+test_new 0
+other 1
+test_new 0
+other 1
+drop table `test`;
#
# BUG 20029625 - HANDLE_FATAL_SIGNAL (SIG=11) IN
# DICT_MEM_TABLE_COL_RENAME_LOW
diff --git a/mysql-test/suite/innodb/r/innodb-index-online.result b/mysql-test/suite/innodb/r/innodb-index-online.result
index c646645ba7a..07b2c0dfaac 100644
--- a/mysql-test/suite/innodb/r/innodb-index-online.result
+++ b/mysql-test/suite/innodb/r/innodb-index-online.result
@@ -123,6 +123,8 @@ ERROR 23000: Duplicate entry '4' for key 'c2'
ALTER TABLE t1 STATS_PERSISTENT=1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c3'
test.t1 analyze status OK
UPDATE mysql.innodb_index_stats SET stat_value = 5
WHERE database_name = 'test' AND table_name= 't1' AND index_name = 'PRIMARY'
@@ -141,6 +143,7 @@ ALTER TABLE t1_c2_stats ENGINE=INNODB;
DROP INDEX c2 ON t1;
ANALYZE TABLE t1_c2_stats;
Table Op Msg_type Msg_text
+test.t1_c2_stats analyze status Engine-independent statistics collected
test.t1_c2_stats analyze status OK
SELECT * FROM mysql.innodb_index_stats WHERE table_name IN ('t1', 't1_c2_stats');
database_name table_name index_name last_update stat_name stat_value sample_size stat_description
@@ -184,9 +187,11 @@ INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1;
INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1;
EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 80 Using where
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'c3'
test.t1 analyze status OK
connection con1;
UPDATE t1_c2_stats SET index_name = 'c2d';
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index df27769b810..09e4da28564 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -77,6 +77,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
@@ -119,6 +120,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
@@ -810,6 +812,7 @@ a b
2 2
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -846,6 +849,7 @@ a
2
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1184,6 +1188,33 @@ t2c CREATE TABLE `t2c` (
KEY `t2a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1,t2,t2c,t2i;
+CREATE TABLE t1 (c VARCHAR(1024),
+c1 CHAR(255) NOT NULL,c2 CHAR(255) NOT NULL,c3 CHAR(255) NOT NULL,
+c4 CHAR(255) NOT NULL,c5 CHAR(255) NOT NULL,c6 CHAR(255) NOT NULL,
+c7 CHAR(255) NOT NULL,c8 CHAR(255) NOT NULL,c9 CHAR(255) NOT NULL,
+ca CHAR(255) NOT NULL,cb CHAR(255) NOT NULL,cc CHAR(255) NOT NULL,
+cd CHAR(255) NOT NULL,ce CHAR(255) NOT NULL,cf CHAR(255) NOT NULL,
+d0 CHAR(255) NOT NULL,d1 CHAR(255) NOT NULL,d2 CHAR(255) NOT NULL,
+d3 CHAR(255) NOT NULL,d4 CHAR(255) NOT NULL,d5 CHAR(255) NOT NULL,
+d6 CHAR(255) NOT NULL,d7 CHAR(255) NOT NULL,d8 CHAR(255) NOT NULL,
+d9 CHAR(255) NOT NULL,da CHAR(255) NOT NULL,db CHAR(255) NOT NULL,
+dc CHAR(255) NOT NULL,dd CHAR(255) NOT NULL,de CHAR(255) NOT NULL,
+UNIQUE KEY(c))
+ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES
+(repeat('a',999),'','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''),
+(CONCAT(repeat('a',999),'b'),'','','','','','','','','','','','','','','','','','','','','','','','','','','','','','');
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT, algorithm=inplace;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT, algorithm=copy;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+2
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
#
# Bug #17657223 EXCESSIVE TEMPORARY FILE USAGE IN ALTER TABLE
#
@@ -1540,6 +1571,7 @@ create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
alter table t1 drop primary key, lock=none;
+alter table t1 drop index f1, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: Dropping a primary key is not allowed without also adding a new primary key. Try LOCK=SHARED
drop table t1;
#
@@ -1865,3 +1897,19 @@ f1
SELECT * FROM t2;
f1
DROP TABLE t1, t2;
+#
+# MDEV-18186 assertion failure on missing InnoDB index
+#
+CREATE TABLE t (a INT, INDEX i1 (a)) ENGINE=INNODB;
+DROP TABLE t;
+CREATE TABLE t (a INT) ENGINE=INNODB;
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `a` int(11) DEFAULT NULL,
+ KEY `i1` (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+Warnings:
+Warning 1082 InnoDB: Table test/t contains 0 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MariaDB
+Warning 1082 InnoDB: Table test/t contains 0 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MariaDB
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-online-alter-gis.result b/mysql-test/suite/innodb/r/innodb-online-alter-gis.result
index 34cc62f0a55..0f467c649db 100644
--- a/mysql-test/suite/innodb/r/innodb-online-alter-gis.result
+++ b/mysql-test/suite/innodb/r/innodb-online-alter-gis.result
@@ -42,7 +42,7 @@ drop table t1;
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN b LINESTRING DEFAULT POINT(1,1);
-ERROR 22007: Incorrect LINESTRING value: 'POINT' for column 'b' at row 1
+ERROR 22007: Incorrect LINESTRING value: 'POINT' for column ``.``.`b` at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
a int(11) YES NULL
diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result
index 5b5c4d6b9e1..363ca07e1bc 100644
--- a/mysql-test/suite/innodb/r/innodb-table-online.result
+++ b/mysql-test/suite/innodb/r/innodb-table-online.result
@@ -99,17 +99,6 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `c2` (`c2`),
UNIQUE KEY `c2_2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
-ALTER TABLE t1 DROP INDEX c2, ALGORITHM = INPLACE;
-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Dropping a primary key is not allowed without also adding a new primary key. Try ALGORITHM=COPY
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) NOT NULL,
- `c2` int(11) NOT NULL,
- `c3` char(255) NOT NULL,
- UNIQUE KEY `c2` (`c2`),
- UNIQUE KEY `c2_2` (`c2`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
# session default
connection default;
@@ -212,6 +201,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL ROWS Using where
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET @merge_encrypt_0=
(SELECT variable_value FROM information_schema.global_status
diff --git a/mysql-test/suite/innodb/r/innodb-update-insert.result b/mysql-test/suite/innodb/r/innodb-update-insert.result
index 6265adb6e21..b50c35578d9 100644
--- a/mysql-test/suite/innodb/r/innodb-update-insert.result
+++ b/mysql-test/suite/innodb/r/innodb-update-insert.result
@@ -28,7 +28,7 @@ charset=utf8 engine=innodb;
set statement sql_mode = '' for
replace into t1 set f1=0xa3;
Warnings:
-Warning 1366 Incorrect string value: '\xA3' for column 'f1' at row 1
+Warning 1366 Incorrect string value: '\xA3' for column `test`.`t1`.`f1` at row 1
select f1 from t1;
f1
?
@@ -37,7 +37,7 @@ update t1 set f3=repeat(0xb1,8103);
update t1 set f1=0x4a;
update ignore t1 set f1=0x82;
Warnings:
-Warning 1366 Incorrect string value: '\x82' for column 'f1' at row 1
+Warning 1366 Incorrect string value: '\x82' for column `test`.`t1`.`f1` at row 1
select f1 from t1;
f1
?
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
index 6fbb7dcc58f..bf21e352681 100644
--- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
@@ -330,3 +330,16 @@ term uw_id plan wdraw_rsn admit_term
1035 2 CSM ACAD 1009
drop table grad_degree;
drop table gso_grad_supr;
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL, FULLTEXT KEY(b)) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+SELECT * FROM t1;
+a b c
+1 foo 1
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+ALTER TABLE t1 ADD FULLTEXT KEY(b);
+SELECT * FROM t1;
+a b c
+1 foo 1
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index ec3856c20b8..ed7477fa033 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -479,12 +479,6 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-unlink: t1.ibd
-unlink: t1.cfg
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (
c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index cb82d292d7e..100845a081b 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -217,6 +217,7 @@ create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -3236,7 +3237,7 @@ select f1 from t1;
f1
show status like "handler_read_key";
Variable_name Value
-Handler_read_key 0
+Handler_read_key 3
drop table t1;
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t2 (c1 INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_28867993.result b/mysql-test/suite/innodb/r/innodb_28867993.result
new file mode 100644
index 00000000000..acc6734eaee
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_28867993.result
@@ -0,0 +1,9 @@
+create table t1 (a int) engine=innodb;
+insert t1 values (1),(2);
+create database ib_logfile2;
+select * from t1;
+a
+1
+2
+drop table t1;
+drop database ib_logfile2;
diff --git a/mysql-test/suite/innodb/r/innodb_bug14676111.result b/mysql-test/suite/innodb/r/innodb_bug14676111.result
index d1e21c92d95..f8f0b3fbccb 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14676111.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14676111.result
@@ -16,6 +16,7 @@ insert into t1 values (2);
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -26,6 +27,7 @@ disconnect con4;
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -36,6 +38,7 @@ disconnect con5;
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -47,6 +50,7 @@ disconnect con2;
connection default;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -56,6 +60,7 @@ insert into t1 values (2);
rollback;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
@@ -65,6 +70,7 @@ insert into t1 values (2);
rollback;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
select CLUST_INDEX_SIZE from information_schema.INNODB_SYS_TABLESTATS where NAME = 'test/t1';
CLUST_INDEX_SIZE
diff --git a/mysql-test/suite/innodb/r/innodb_bug30423.result b/mysql-test/suite/innodb/r/innodb_bug30423.result
index c7f823a06ae..786041370ef 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30423.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30423.result
@@ -19,12 +19,15 @@ select @@innodb_stats_method;
nulls_equal
analyze table bug30243_1;
Table Op Msg_type Msg_text
+test.bug30243_1 analyze status Engine-independent statistics collected
test.bug30243_1 analyze status OK
analyze table bug30243_2;
Table Op Msg_type Msg_text
+test.bug30243_2 analyze status Engine-independent statistics collected
test.bug30243_2 analyze status OK
analyze table bug30243_3;
Table Op Msg_type Msg_text
+test.bug30243_3 analyze status Engine-independent statistics collected
test.bug30243_3 analyze status OK
set global innodb_stats_method = "NULL";
ERROR 42000: Variable 'innodb_stats_method' can't be set to the value of 'NULL'
@@ -34,12 +37,15 @@ select @@innodb_stats_method;
nulls_ignored
analyze table bug30243_1;
Table Op Msg_type Msg_text
+test.bug30243_1 analyze status Engine-independent statistics collected
test.bug30243_1 analyze status OK
analyze table bug30243_2;
Table Op Msg_type Msg_text
+test.bug30243_2 analyze status Engine-independent statistics collected
test.bug30243_2 analyze status OK
analyze table bug30243_3;
Table Op Msg_type Msg_text
+test.bug30243_3 analyze status Engine-independent statistics collected
test.bug30243_3 analyze status OK
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
@@ -60,12 +66,15 @@ select @@innodb_stats_method;
nulls_unequal
analyze table bug30243_1;
Table Op Msg_type Msg_text
+test.bug30243_1 analyze status Engine-independent statistics collected
test.bug30243_1 analyze status OK
analyze table bug30243_2;
Table Op Msg_type Msg_text
+test.bug30243_2 analyze status Engine-independent statistics collected
test.bug30243_2 analyze status OK
analyze table bug30243_3;
Table Op Msg_type Msg_text
+test.bug30243_3 analyze status Engine-independent statistics collected
test.bug30243_3 analyze status OK
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
@@ -83,10 +92,12 @@ COUNT(*)
set global innodb_stats_method = "nulls_unequal";
analyze table table_bug30423;
Table Op Msg_type Msg_text
+test.table_bug30423 analyze status Engine-independent statistics collected
test.table_bug30423 analyze status OK
set global innodb_stats_method = "nulls_ignored";
analyze table table_bug30423;
Table Op Msg_type Msg_text
+test.table_bug30423 analyze status Engine-independent statistics collected
test.table_bug30423 analyze status OK
set global innodb_stats_method = nulls_equal;
drop table bug30243_2;
diff --git a/mysql-test/suite/innodb/r/innodb_bug53046.result b/mysql-test/suite/innodb/r/innodb_bug53046.result
index 69be6c4e0a7..0321d5ace19 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53046.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53046.result
@@ -16,6 +16,7 @@ FROM bug53046_1;
INSERT INTO bug53046_2 VALUES (1), (2);
ANALYZE TABLE bug53046_1;
Table Op Msg_type Msg_text
+test.bug53046_1 analyze status Engine-independent statistics collected
test.bug53046_1 analyze status OK
SHOW TABLE STATUS LIKE 'bug53046_1';
UPDATE bug53046_1 SET c1 = c1 - 1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug57252.result b/mysql-test/suite/innodb/r/innodb_bug57252.result
index efa50c742e0..2e371cb74ee 100644
--- a/mysql-test/suite/innodb/r/innodb_bug57252.result
+++ b/mysql-test/suite/innodb/r/innodb_bug57252.result
@@ -1,6 +1,7 @@
cardinality
10
Table Op Msg_type Msg_text
+test.bug57252 analyze status Engine-independent statistics collected
test.bug57252 analyze status OK
cardinality
10
diff --git a/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result b/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
index 117b7e4418e..c20c981653c 100644
--- a/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
+++ b/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
@@ -325,6 +325,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -345,6 +347,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -365,6 +369,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
diff --git a/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result b/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
index de957023ff8..a74e7826729 100644
--- a/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
+++ b/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
@@ -528,6 +528,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -548,6 +550,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
@@ -568,6 +572,8 @@ LENGTH(col)
FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
+test.t analyze Warning Engine-independent statistics are not collected for column 'col'
test.t analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index b4e0f090e5d..f1573d46a6f 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -191,8 +191,8 @@ min(7)
7
explain select min(7) from t2i join t1i;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
select min(7) from t2i join t1i;
min(7)
NULL
@@ -207,8 +207,8 @@ max(7)
7
explain select max(7) from t2i join t1i;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2i ALL NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join)
select max(7) from t2i join t1i;
max(7)
NULL
@@ -239,7 +239,7 @@ select 1, max(1) from t1i where 1=99;
explain select count(*), min(7), max(7) from t1m, t1i;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1m system NULL NULL NULL NULL 0 Const row not found
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
select count(*), min(7), max(7) from t1m, t1i;
count(*) min(7) max(7)
0 NULL NULL
@@ -253,7 +253,7 @@ count(*) min(7) max(7)
explain select count(*), min(7), max(7) from t2m, t1i;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2m system NULL NULL NULL NULL 1
-1 SIMPLE t1i ALL NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 0
select count(*), min(7), max(7) from t2m, t1i;
count(*) min(7) max(7)
0 NULL NULL
@@ -303,6 +303,7 @@ create index idx12672_1 on t4 (a1,a2,b,c);
create index idx12672_2 on t4 (a1,a2,b);
analyze table t4;
Table Op Msg_type Msg_text
+test.t4 analyze status Engine-independent statistics collected
test.t4 analyze status OK
select distinct a1 from t4 where pk_col not in (1,2,3,4);
a1
@@ -2699,6 +2700,7 @@ INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
c1 c2 c3
@@ -2851,6 +2853,7 @@ INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
(11,11,11,11,11,11);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT COUNT(*) FROM t1;
id 1
diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
index 2e9f0f0ee21..a90cd22f57a 100644
--- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
+++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
@@ -182,7 +182,6 @@ trx_nl_ro_commits transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL N
trx_commits_insert_update transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions committed with inserts and updates
trx_rollbacks transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions rolled back
trx_rollbacks_savepoint transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of transactions rolled back to savepoint
-trx_rollback_active transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of resurrected active transactions rolled back
trx_active_transactions transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of active transactions
trx_rseg_history_len transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Length of the TRX_RSEG_HISTORY list
trx_undo_slots_used transaction 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of undo slots used
diff --git a/mysql-test/suite/innodb/r/innodb_stats.result b/mysql-test/suite/innodb/r/innodb_stats.result
index d2c3bd0127e..eadce75318b 100644
--- a/mysql-test/suite/innodb/r/innodb_stats.result
+++ b/mysql-test/suite/innodb/r/innodb_stats.result
@@ -4,6 +4,7 @@ dummy INSERT, the table should be empty
dummy INSERT, the table should be empty
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -56,6 +57,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -108,6 +110,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (1);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -160,6 +163,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (1), (1);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -212,6 +216,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (1), (1), (1), (1), (1), (1), (1), (1), (1);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -264,6 +269,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (2);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -316,6 +322,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (1), (2);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -368,6 +375,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (2), (3);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -420,6 +428,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (1), (2), (3), (3);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
@@ -472,6 +481,7 @@ TRUNCATE TABLE test_innodb_stats;
INSERT INTO test_innodb_stats (a) VALUES (1), (2), (3), (4), (5), (1), (2), (3), (4), (5);
ANALYZE TABLE test_innodb_stats;
Table Op Msg_type Msg_text
+test.test_innodb_stats analyze status Engine-independent statistics collected
test.test_innodb_stats analyze status OK
SELECT
stat_name,
diff --git a/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result b/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result
index b8f312ccd63..fc0a590934a 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_drop_locked.result
@@ -1,4 +1,5 @@
Table Op Msg_type Msg_text
+test.innodb_stats_drop_locked analyze status Engine-independent statistics collected
test.innodb_stats_drop_locked analyze status OK
SET autocommit=0;
SELECT table_name FROM mysql.innodb_table_stats
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch.result b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
index b348e41f1d9..67437c46cd3 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
@@ -5,6 +5,10 @@ ANALYZE TABLE test_ps_fetch;
Table test.test_ps_fetch
Op analyze
Msg_type status
+Msg_text Engine-independent statistics collected
+Table test.test_ps_fetch
+Op analyze
+Msg_type status
Msg_text OK
SELECT n_rows, clustered_index_size, sum_of_other_index_sizes
FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_fetch';
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
index 0f0e941b838..c232a841376 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
@@ -7,6 +7,10 @@ ANALYZE TABLE test_ps_fetch_corrupted;
Table test.test_ps_fetch_corrupted
Op analyze
Msg_type status
+Msg_text Engine-independent statistics collected
+Table test.test_ps_fetch_corrupted
+Op analyze
+Msg_type status
Msg_text OK
SELECT n_rows, clustered_index_size, sum_of_other_index_sizes
FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_fetch_corrupted';
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result b/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result
index 6093fbae86b..91bb2bf3ecd 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch_nonexistent.result
@@ -6,6 +6,10 @@ ANALYZE TABLE test_ps_fetch_nonexistent;
Table test.test_ps_fetch_nonexistent
Op analyze
Msg_type status
+Msg_text Engine-independent statistics collected
+Table test.test_ps_fetch_nonexistent
+Op analyze
+Msg_type status
Msg_text OK
SELECT COUNT(*)
FROM mysql.innodb_table_stats WHERE table_name = 'test_ps_fetch_nonexistent';
diff --git a/mysql-test/suite/innodb/r/innodb_stats_persistent.result b/mysql-test/suite/innodb/r/innodb_stats_persistent.result
index f4de4b6b82e..44cb3a81372 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_persistent.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_persistent.result
@@ -19,6 +19,7 @@ COUNT(*)
16
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
connect con1, localhost, root,,;
START TRANSACTION;
@@ -100,7 +101,7 @@ COUNT(*)
# ha_innobase::records_in_range() would count the delete-marked records.
EXPLAIN SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL val 4 NULL 1 Using index
+1 SIMPLE t1 index NULL val 4 NULL 16 Using index
ROLLBACK;
EXPLAIN SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result b/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result
index 9f93f05fd56..ee1ad318d65 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_persistent_debug.result
@@ -17,6 +17,7 @@ SET GLOBAL innodb_limit_optimistic_insert_debug = @save_debug;
connect con1, localhost, root,,;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
+test.t analyze status Engine-independent statistics collected
test.t analyze status OK
disconnect con1;
connection default;
diff --git a/mysql-test/suite/innodb/r/innodb_zip_innochecksum.result b/mysql-test/suite/innodb/r/innodb_zip_innochecksum.result
deleted file mode 100644
index 31d9450df80..00000000000
--- a/mysql-test/suite/innodb/r/innodb_zip_innochecksum.result
+++ /dev/null
@@ -1,91 +0,0 @@
-# Set the environmental variables
-call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
-CREATE INDEX idx1 ON tab1(c2(10));
-INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-insert into t1 values(1,"i");
-insert into t1 values(2,"am");
-insert into t1 values(3,"compressed table");
-# Shutdown the Server
-# Server Default checksum = innodb
-[1b]: check the innochecksum without --strict-check
-[2]: check the innochecksum with full form --strict-check=crc32
-[3]: check the innochecksum with short form -C crc32
-[4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
-FOUND 1 /Error: --no-check must be associated with --write option./ in my_restart.err
-[5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
-FOUND 1 /Error: --no-check must be associated with --write option./ in my_restart.err
-[6]: check the innochecksum with full form strict-check & no-check , an error is expected
-FOUND 1 /Error: --strict-check option cannot be used together with --no-check option./ in my_restart.err
-[7]: check the innochecksum with short form strict-check & no-check , an error is expected
-FOUND 1 /Error: --strict-check option cannot be used together with --no-check option./ in my_restart.err
-[8]: check the innochecksum with short & full form combination
-# strict-check & no-check, an error is expected
-FOUND 1 /Error: --strict-check option cannot be used together with --no-check option./ in my_restart.err
-[9]: check the innochecksum with full form --strict-check=innodb
-[10]: check the innochecksum with full form --strict-check=none
-# when server Default checksum=crc32
-[11]: check the innochecksum with short form -C innodb
-# when server Default checksum=crc32
-[12]: check the innochecksum with short form -C none
-# when server Default checksum=crc32
-[13]: check strict-check with invalid values
-FOUND 1 /Error while setting value \'strict_innodb\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'strict_innodb\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'strict_crc32\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'strict_crc32\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'strict_none\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'strict_none\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'InnoBD\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'InnoBD\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'crc\' to \'strict-check\'/ in my_restart.err
-FOUND 1 /Error while setting value \'no\' to \'strict-check\'/ in my_restart.err
-[14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum
-# Also check the long form of write option.
-[14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
-# Also check the long form of write option.
-# start the server with innodb_checksum_algorithm=InnoDB
-INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
-SELECT c1,c2 FROM tab1 order by c1,c2;
-c1 c2
-1 Innochecksum InnoDB1
-2 Innochecksum CRC32
-# Stop the server
-[15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
-# Also check the short form of write option.
-# Start the server with checksum algorithm=none
-INSERT INTO tab1 VALUES(3, 'Innochecksum None');
-SELECT c1,c2 FROM tab1 order by c1,c2;
-c1 c2
-1 Innochecksum InnoDB1
-2 Innochecksum CRC32
-3 Innochecksum None
-DROP TABLE t1;
-# Stop the server
-[16]: rewrite into new checksum=crc32 with innochecksum
-# Restart the DB server with innodb_checksum_algorithm=crc32
-SELECT * FROM tab1;
-c1 c2
-1 Innochecksum InnoDB1
-2 Innochecksum CRC32
-3 Innochecksum None
-DELETE FROM tab1 where c1=3;
-SELECT c1,c2 FROM tab1 order by c1,c2;
-c1 c2
-1 Innochecksum InnoDB1
-2 Innochecksum CRC32
-# Stop server
-[17]: rewrite into new checksum=InnoDB
-# Restart the DB server with innodb_checksum_algorithm=InnoDB
-DELETE FROM tab1 where c1=2;
-SELECT * FROM tab1;
-c1 c2
-1 Innochecksum InnoDB1
-# Stop server
-[18]:check Innochecksum with invalid write options
-FOUND 1 /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err
-FOUND 1 /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err
-FOUND 1 /Error while setting value \'crc23\' to \'write\'/ in my_restart.err
-DROP TABLE tab1;
diff --git a/mysql-test/suite/innodb/r/innodb_zip_innochecksum2.result b/mysql-test/suite/innodb/r/innodb_zip_innochecksum2.result
deleted file mode 100644
index 582bb42f0cb..00000000000
--- a/mysql-test/suite/innodb/r/innodb_zip_innochecksum2.result
+++ /dev/null
@@ -1,160 +0,0 @@
-SET GLOBAL innodb_compression_level=0;
-SELECT @@innodb_compression_level;
-@@innodb_compression_level
-0
-CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-INSERT INTO t1 SELECT * from t1;
-# stop the server
-
-Variables (--variable-name=value)
-and boolean options {FALSE|TRUE} Value (after reading options)
---------------------------------- ----------------------------------------
-verbose TRUE
-debug FALSE
-count FALSE
-start-page 0
-end-page 0
-page 0
-strict-check crc32
-no-check FALSE
-allow-mismatches 0
-write crc32
-page-type-summary FALSE
-page-type-dump MYSQLTEST_VARDIR/tmp/dump.txt
-per-page-details FALSE
-log (No default value)
-leaf FALSE
-merge 0
-[1]:# check the both short and long options for "help"
-[2]:# Run the innochecksum when file isn't provided.
-# It will print the innochecksum usage similar to --help option.
-innochecksum Ver #.#.#
-Copyright (c) YEAR, YEAR , Oracle, MariaDB Corporation Ab and others.
-
-InnoDB offline file checksum utility.
-Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-i] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] [-l] [-m <merge pages>] <filename or [-]>
- -?, --help Displays this help and exits.
- -I, --info Synonym for --help.
- -V, --version Displays version information and exits.
- -v, --verbose Verbose (prints progress every 5 seconds).
- -c, --count Print the count of pages in the file and exits.
- -s, --start-page=# Start on this page number (0 based).
- -e, --end-page=# End at this page number (0 based).
- -p, --page=# Check only this page (0 based).
- -C, --strict-check=name
- Specify the strict checksum algorithm by the user.. One
- of: crc32, crc32, innodb, innodb, none, none
- -n, --no-check Ignore the checksum verification.
- -a, --allow-mismatches=#
- Maximum checksum mismatch allowed.
- -w, --write=name Rewrite the checksum algorithm by the user.. One of:
- crc32, crc32, innodb, innodb, none, none
- -S, --page-type-summary
- Display a count of each page type in a tablespace.
- -D, --page-type-dump=name
- Dump the page type info for each page in a tablespace.
- -i, --per-page-details
- Print out per-page detail information.
- -l, --log=name log output.
- -f, --leaf Examine leaf index pages
- -m, --merge=# leaf page count if merge given number of consecutive
- pages
-
-Variables (--variable-name=value)
-and boolean options {FALSE|TRUE} Value (after reading options)
---------------------------------- ----------------------------------------
-verbose FALSE
-count FALSE
-start-page 0
-end-page 0
-page 0
-strict-check crc32
-no-check FALSE
-allow-mismatches 0
-write crc32
-page-type-summary FALSE
-page-type-dump (No default value)
-per-page-details FALSE
-log (No default value)
-leaf FALSE
-merge 0
-[3]:# check the both short and long options for "count" and exit
-Number of pages:#
-Number of pages:#
-[4]:# Print the version of innochecksum and exit
-innochecksum Ver #.#.## Restart the DB server
-DROP TABLE t1;
-[5]:# Check the innochecksum for compressed table t1 with different key_block_size
-# Test for KEY_BLOCK_SIZE=1
-===> Testing size=1
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-insert into t1 values(1,"I");
-insert into t1 values(2,"AM");
-insert into t1 values(3,"COMPRESSED");
-select * from t1;
-id msg
-1 I
-2 AM
-3 COMPRESSED
-drop table t1;
-# Test for KEY_BLOCK_SIZE=2
-===> Testing size=2
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-insert into t1 values(1,"I");
-insert into t1 values(2,"AM");
-insert into t1 values(3,"COMPRESSED");
-select * from t1;
-id msg
-1 I
-2 AM
-3 COMPRESSED
-drop table t1;
-# Test for for KEY_BLOCK_SIZE=4
-===> Testing size=4
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-insert into t1 values(1,"I");
-insert into t1 values(2,"AM");
-insert into t1 values(3,"COMPRESSED");
-select * from t1;
-id msg
-1 I
-2 AM
-3 COMPRESSED
-drop table t1;
-set innodb_strict_mode=off;
-# Test for for KEY_BLOCK_SIZE=8
-===> Testing size=8
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
-insert into t1 values(1,"I");
-insert into t1 values(2,"AM");
-insert into t1 values(3,"COMPRESSED");
-select * from t1;
-id msg
-1 I
-2 AM
-3 COMPRESSED
-drop table t1;
-set innodb_strict_mode=off;
-# Test for KEY_BLOCK_SIZE=16
-===> Testing size=16
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
-insert into t1 values(1,"I");
-insert into t1 values(2,"AM");
-insert into t1 values(3,"COMPRESSED");
-select * from t1;
-id msg
-1 I
-2 AM
-3 COMPRESSED
-drop table t1;
-# Test[5] completed
diff --git a/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result b/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result
deleted file mode 100644
index aaab68b3df9..00000000000
--- a/mysql-test/suite/innodb/r/innodb_zip_innochecksum3.result
+++ /dev/null
@@ -1,227 +0,0 @@
-# Set the environmental variables
-call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to.*");
-[1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
-CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
-linestring_key GEOMETRY NOT NULL,
-linestring_nokey GEOMETRY NOT NULL)
-ENGINE=InnoDB ;
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (1, ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) '));
-CREATE INDEX linestring_index ON tab1(linestring_nokey(5));
-ALTER TABLE tab1 ADD KEY (linestring_key(5));
-# create a compressed table
-CREATE TABLE tab2(col_1 CHAR (255) ,
-col_2 VARCHAR (255), col_3 longtext,
-col_4 longtext,col_5 longtext,
-col_6 longtext , col_7 int )
-engine = innodb row_format=compressed key_block_size=4;
-CREATE INDEX idx1 ON tab2(col_3(10));
-CREATE INDEX idx2 ON tab2(col_4(10));
-CREATE INDEX idx3 ON tab2(col_5(10));
-SET @col_1 = repeat('a', 5);
-SET @col_2 = repeat('b', 20);
-SET @col_3 = repeat('c', 100);
-SET @col_4 = repeat('d', 100);
-SET @col_5 = repeat('e', 100);
-SET @col_6 = repeat('f', 100);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,5);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,4);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,3);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,2);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,1);
-SELECT * FROM tab2 ORDER BY col_7;
-# stop the server
-[1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
-: start the server with innodb_checksum_algorithm=strict_innodb
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
-SET @col_1 = repeat('a', 5);
-SET @col_2 = repeat('b', 20);
-SET @col_3 = repeat('c', 100);
-SET @col_4 = repeat('d', 100);
-SET @col_5 = repeat('e', 100);
-SET @col_6 = repeat('f', 100);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,6);
-SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
-FROM tab1 ORDER BY pk;
-SELECT * FROM tab2 ORDER BY col_7;
-# stop the server
-[1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
-# start the server with innodb_checksum_algorithm=strict_crc32
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
-ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
-SET @col_1 = repeat('g', 5);
-SET @col_2 = repeat('h', 20);
-SET @col_3 = repeat('i', 100);
-SET @col_4 = repeat('j', 100);
-SET @col_5 = repeat('k', 100);
-SET @col_6 = repeat('l', 100);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,7);
-SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
-FROM tab1 ORDER BY pk;
-SELECT * FROM tab2 ORDER BY col_7;
-# stop the server
-[1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
-SET @col_1 = repeat('m', 5);
-SET @col_2 = repeat('n', 20);
-SET @col_3 = repeat('o', 100);
-SET @col_4 = repeat('p', 100);
-SET @col_5 = repeat('q', 100);
-SET @col_6 = repeat('r', 100);
-INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,8);
-SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
-FROM tab1 ORDER BY pk;
-SELECT * FROM tab2 ORDER BY col_7;
-# stop the server
-[2]: Check the page type summary with shortform for tab1.ibd
-
-File::tab#.ibd
-================PAGE TYPE SUMMARY==============
-#PAGE_COUNT PAGE_TYPE
-===============================================
- # Index page
- # Undo log page
- # Inode page
- # Insert buffer free list page
- # Freshly allocated page
- # Insert buffer bitmap
- # System page
- # Transaction system page
- # File Space Header
- # Extent descriptor page
- # BLOB page
- # Compressed BLOB page
- # Page compressed page
- # Page compressed encrypted page
- # Other type of page
-
-===============================================
-Additional information:
-Undo page type: # insert, # update, # other
-Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
-index_id #pages #leaf_pages #recs_per_page #bytes_per_page
-# # # # #
-# # # # #
-# # # # #
-
-index_id page_data_bytes_histgram(empty,...,oversized)
-# # # # # # # # # # # # #
-# # # # # # # # # # # # #
-# # # # # # # # # # # # #
-[3]: Check the page type summary with longform for tab1.ibd
-
-File::tab#.ibd
-================PAGE TYPE SUMMARY==============
-#PAGE_COUNT PAGE_TYPE
-===============================================
- # Index page
- # Undo log page
- # Inode page
- # Insert buffer free list page
- # Freshly allocated page
- # Insert buffer bitmap
- # System page
- # Transaction system page
- # File Space Header
- # Extent descriptor page
- # BLOB page
- # Compressed BLOB page
- # Page compressed page
- # Page compressed encrypted page
- # Other type of page
-
-===============================================
-Additional information:
-Undo page type: # insert, # update, # other
-Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
-index_id #pages #leaf_pages #recs_per_page #bytes_per_page
-# # # # #
-# # # # #
-# # # # #
-
-index_id page_data_bytes_histgram(empty,...,oversized)
-# # # # # # # # # # # # #
-# # # # # # # # # # # # #
-# # # # # # # # # # # # #
-[4]: Page type dump for with longform for tab1.ibd
-# Print the contents stored in dump.txt
-
-
-Filename::tab#.ibd
-==============================================================================
- PAGE_NO | PAGE_TYPE | EXTRA INFO
-==============================================================================
-#::# | File Space Header | -
-#::# | Insert Buffer Bitmap | -
-#::# | Inode page | -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Freshly allocated page | -
-# Variables used by page type dump for ibdata1
-
-Variables (--variable-name=value)
-and boolean options {FALSE|TRUE} Value (after reading options)
---------------------------------- ----------------------------------------
-verbose TRUE
-count FALSE
-start-page 0
-end-page 0
-page 0
-strict-check crc32
-no-check FALSE
-allow-mismatches 0
-write crc32
-page-type-summary FALSE
-page-type-dump MYSQLTEST_VARDIR/tmp/dump.txt
-per-page-details FALSE
-log (No default value)
-leaf FALSE
-merge 0
-[5]: Page type dump for with shortform for tab1.ibd
-
-
-Filename::tab#.ibd
-==============================================================================
- PAGE_NO | PAGE_TYPE | EXTRA INFO
-==============================================================================
-#::# | File Space Header | -
-#::# | Insert Buffer Bitmap | -
-#::# | Inode page | -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
-#::# | Freshly allocated page | -
-[6]: check the valid lower bound values for option
-# allow-mismatches,page,start-page,end-page
-[9]: check the both short and long options "page" and "start-page" when
-# seek value is larger than file size.
-FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
-FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
-FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
-FOUND 1 /Error: Unable to seek to necessary offset: Invalid argument/ in my_restart.err
-[34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
-# innochecksum will fail with error code: 1
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-DROP TABLE tab1,tab2;
diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result
index 5f89b31c142..f864221def5 100644
--- a/mysql-test/suite/innodb/r/instant_alter.result
+++ b/mysql-test/suite/innodb/r/instant_alter.result
@@ -236,6 +236,7 @@ UPDATE t2 SET c1 = repeat(id, 4000);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -246,6 +247,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -257,6 +259,7 @@ UPDATE t2 SET d1 = repeat(id, 200);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -267,6 +270,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -386,6 +390,7 @@ COMMIT;
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -409,6 +414,7 @@ test.big 385477733
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -422,6 +428,7 @@ test.big 1705165209
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -523,6 +530,210 @@ SELECT * FROM t1;
i t
1 NULL
DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+a c
+3 42
+4 42
+DROP TABLE t1;
+CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+b i v
+NULL 1 1
+DROP TABLE t1;
+CREATE TABLE t1 (ts TIMESTAMP) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+f
+NULL
+NULL
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+id f
+1 NULL
+2 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+f
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT,
+f2 CHAR(255),
+f3 BIGINT,
+f4 INT,
+f5 CHAR(255),
+f6 CHAR(255),
+f7 CHAR(255) NOT NULL,
+f8 INT,
+f9 CHAR(10)
+) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+(2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+(3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+(4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+(5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+(6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+(7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+(8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+(9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+(10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+(11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+(12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+(13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+(14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+(15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+DELETE FROM t1 WHERE pk=1;
+InnoDB 0 transactions not purged
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT, f2 CHAR(32) NOT NULL,
+f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+f7 CHAR(32), f8 CHAR(32)
+) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES
+(1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+(3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+(5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+(7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+(9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+(11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+(13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+(15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+(17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+(19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+(21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+(23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+(25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+(51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+(53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+(55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+(57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+(59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+(61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+(63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+(101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+(103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+(105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+(107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+(109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+(151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+(153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+(155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+(157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+(159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+(201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+(203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+(205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+(207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+(252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+(254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+(256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+(258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+(301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+(303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+(305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+(307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+(351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+(353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+(355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+(357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+(359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+(361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+(363,75,'',66,76,52,'','','');
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
@@ -705,6 +916,7 @@ UPDATE t2 SET c1 = repeat(id, 4000);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -715,6 +927,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -726,6 +939,7 @@ UPDATE t2 SET d1 = repeat(id, 200);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -736,6 +950,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -855,6 +1070,7 @@ COMMIT;
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -878,6 +1094,7 @@ test.big 385477733
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -891,6 +1108,7 @@ test.big 1705165209
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -992,6 +1210,210 @@ SELECT * FROM t1;
i t
1 NULL
DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+a c
+3 42
+4 42
+DROP TABLE t1;
+CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+b i v
+NULL 1 1
+DROP TABLE t1;
+CREATE TABLE t1 (ts TIMESTAMP) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+f
+NULL
+NULL
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+id f
+1 NULL
+2 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+f
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT,
+f2 CHAR(255),
+f3 BIGINT,
+f4 INT,
+f5 CHAR(255),
+f6 CHAR(255),
+f7 CHAR(255) NOT NULL,
+f8 INT,
+f9 CHAR(10)
+) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+(2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+(3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+(4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+(5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+(6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+(7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+(8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+(9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+(10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+(11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+(12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+(13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+(14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+(15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+DELETE FROM t1 WHERE pk=1;
+InnoDB 0 transactions not purged
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT, f2 CHAR(32) NOT NULL,
+f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+f7 CHAR(32), f8 CHAR(32)
+) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES
+(1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+(3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+(5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+(7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+(9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+(11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+(13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+(15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+(17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+(19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+(21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+(23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+(25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+(51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+(53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+(55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+(57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+(59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+(61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+(63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+(101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+(103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+(105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+(107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+(109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+(151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+(153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+(155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+(157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+(159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+(201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+(203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+(205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+(207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+(252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+(254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+(256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+(258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+(301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+(303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+(305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+(307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+(351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+(353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+(355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+(357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+(359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+(361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+(363,75,'',66,76,52,'','','');
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
@@ -1174,6 +1596,7 @@ UPDATE t2 SET c1 = repeat(id, 4000);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1184,6 +1607,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1195,6 +1619,7 @@ UPDATE t2 SET d1 = repeat(id, 200);
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1205,6 +1630,7 @@ ROLLBACK;
connection analyze;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
@@ -1324,6 +1750,7 @@ COMMIT;
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1347,6 +1774,7 @@ test.big 385477733
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1360,6 +1788,7 @@ test.big 1705165209
connection analyze;
ANALYZE TABLE big;
Table Op Msg_type Msg_text
+test.big analyze status Engine-independent statistics collected
test.big analyze status OK
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
@@ -1461,10 +1890,214 @@ SELECT * FROM t1;
i t
1 NULL
DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+a c
+3 42
+4 42
+DROP TABLE t1;
+CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+b i v
+NULL 1 1
+DROP TABLE t1;
+CREATE TABLE t1 (ts TIMESTAMP) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+f
+NULL
+NULL
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+id f
+1 NULL
+2 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+f
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT,
+f2 CHAR(255),
+f3 BIGINT,
+f4 INT,
+f5 CHAR(255),
+f6 CHAR(255),
+f7 CHAR(255) NOT NULL,
+f8 INT,
+f9 CHAR(10)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+(2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+(3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+(4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+(5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+(6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+(7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+(8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+(9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+(10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+(11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+(12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+(13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+(14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+(15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+DELETE FROM t1 WHERE pk=1;
+InnoDB 0 transactions not purged
+INSERT INTO t1 VALUES
+(1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT PRIMARY KEY,
+f1 INT, f2 CHAR(32) NOT NULL,
+f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+f7 CHAR(32), f8 CHAR(32)
+) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES
+(1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+(3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+(5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+(7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+(9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+(11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+(13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+(15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+(17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+(19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+(21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+(23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+(25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+(51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+(53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+(55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+(57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+(59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+(61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+(63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+(101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+(103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+(105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+(107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+(109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+(151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+(153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+(155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+(157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+(159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+(201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+(203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+(205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+(207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+(252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+(254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+(256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+(258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+(301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+(303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+(305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+(307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+(351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+(353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+(355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+(357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+(359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+(361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+(363,75,'',66,76,52,'','','');
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
disconnect analyze;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-78
+170
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
new file mode 100644
index 00000000000..91298859e42
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -0,0 +1,130 @@
+#
+# MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
+# in btr_pcur_store_position
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+ALTER TABLE t1 ADD COLUMN f VARCHAR(255);
+ALTER TABLE t1 DROP COLUMN f;
+DELETE FROM t1;
+HANDLER t1 OPEN;
+HANDLER t1 READ `PRIMARY` <= (3);
+pk c
+DROP TABLE t1;
+CREATE TABLE t1 (
+pk INT AUTO_INCREMENT,
+f1 CHAR(32),
+f2 CHAR(32),
+f3 CHAR(32),
+f4 INT,
+f5 CHAR(32),
+f6 INT,
+f7 INT,
+f8 INT,
+PRIMARY KEY (pk),
+UNIQUE (f6)
+) ENGINE=InnoDB;
+INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES
+('reality', 'llt', 'within', -1996816384, 'j', 160, 7, -1822687232),
+('h', 'j', 'j', 251, 'civilian', NULL, 211, NULL),
+('ltq', 'b', 'mud', 111, 'v', 90, 0, NULL),
+('toxic', 'breakfast', 'series', 2, 'x', NULL, 118, 2),
+('h', 'n', 'vision', 84, 'n', NULL, 197, 103),
+('h', 'tq', 'q', 6, 'bet', -1927151616, -446038016, 3),
+('pocket', 'qjt', 'jtl', 0, 'blink', NULL, 12, 0),
+('k', 'uv', 'exist', 37, 'g', 149, -1610219520, NULL),
+('parent', 'motion', 'u', 70, 'promote', NULL, 178, NULL),
+('get', 'convict', 'liquid', -780337152, 'd', NULL, 4, NULL),
+('vp', 'px', 'xi', -631111680, 'support', NULL, 8, NULL),
+('ck', 'z', 'minority', 8, 'k', NULL, 864878592, NULL),
+('kxx', 'g', 'container', 1, 'cholesterol', NULL, 4, 1404436480),
+('xxv', 'rail', 'j', 219, 'serious', NULL, -816119808, 62),
+('x', 'v', 'vr', 146, 'm', 16, 170, -1765867520),
+('age', 'm', 'q', -1251278848, 'rte', 6, 224, NULL),
+('discrimination', 't', 'q', 31, 'exl', 0, 2, 244),
+('water', 'x', 'ldb', 98, 'r', 235, 4, 63),
+('d', 'db', 'p', 248, 'so-called', 102, -255524864, 198),
+('last', 'bz', 'us', 0, 'experienced', 137, 240, 134),
+('q', 'z', 'attract', 67, 'code', 67, 75, 1758920704),
+('yellow', 'c', 'u', 6, 'v', 1731985408, 528154624, 2),
+('cognitive', 'he', 'protective', 590020608, 'sentence', NULL, 4, 102),
+('eih', 'l', 'ih', 1266024448, 'traditionally', NULL, 190, NULL),
+('pine', 'i', 'y', 6, 'glimpse', 214, 7, -1486880768),
+('jo', 'everyone', 'ol', 0, 'lj', NULL, 1, 0),
+('blood', 'f', 'scientist', 54, 'j', 1341128704, 168, NULL),
+('z', 'brief', 'ambassador', 115, 'ygp', 82, 129, NULL),
+('gp', 'severe', 'consist', 7, 'p', -1829961728, 602669056, 154),
+('admit', 'poetry', 'x', 116, 'enemy', 174, -2128543744, -407764992),
+('s', 'norm', 'decide', 2055667712, 'rtz', NULL, 99, -1233715200),
+('tzg', 'f', 'beg', 2016280576, 'w', NULL, -643825664, 137),
+('zgg', 'x', 'f', 148, 'y', -987496448, -708116480, 8),
+('attorney', 'perfectly', 's', 49, 'z', -1865285632, 56, -1518534656),
+('concentrate', 's', 'k', -1028849664, 'tir', 83, -1592459264, 1820065792),
+('t', 'sacrifice', 'ir', -2143879168, 'recipe', 156, 217, NULL),
+('wdf', 'd', 'f', 137, 'empty', NULL, 188, NULL),
+('o', 'customer', 'qd', -2135293952, 'z', 1527840768, 227, -1174929408),
+('d', 'qow', 'o', 1472266240, 'whe', NULL, 7, 197),
+('deny', 'reputation', 'dutch', 59, 'v', 124, 2, 191),
+('m', 'liver', 'fv', 0, 'policy', 781582336, 198574080, 177),
+('vk', 'kx', 'immigrant', -1452736512, 'x', 163, 76, 6) ,
+('j', 'ru', 'r', 67, 'joke', NULL, 3, NULL),
+('o', 'u', 'a', -569442304, 'uz', NULL, 933298176, NULL),
+('g', 'zb', 'c', -1694760960, 'fish', 18, -390463488, 1),
+('bb', 'o', 'b', 6, 'z', 9, 12, NULL),
+('compelling', 'xe', 'debut', 89, 'e', -734724096, 119, 175),
+('md', 'r', 'object', 1046478848, 'frequently', 915537920, 0, 1506410496),
+('dwn', 'wnz', 'x', 1767571456, 'nz', 241, -882180096, 9),
+('zvf', 'vfo', 'g', -844824576, 'w', NULL, 1, 9),
+('w', 'pose', 'r', 1029308416, 'a', -48627712, 1756168192, NULL),
+('o', 'jwp', 'patient', 172, 'i', 297140224, 45809664, 3),
+('w', 'p', 'american', 450297856, 'z', 20, 4, 186),
+('ridiculous', 'helpful', 'vy', -2022899712, 'conspiracy', NULL, 162, -264634368),
+('t', 'g', 'spite', 289931264, 'y', 4, 13, NULL),
+('performer', 'i', 'tomato', -1519386624, 'mz', 8, 87, 106),
+('m', 'z', 'hang', 3, 'crowded', -537919488, 1, 2),
+('fu', 'uot', 'j', 1, 'o', 179, 220, -2084569088),
+('ts', 'n', 'su', 1, 'o', 198, 9, 68),
+('ball', 'halfway', 'uf', 40, 'l', 145948672, 9, 149),
+('hunting', 'n', 'teenager', 0, 'neat', 209, 2044461056, 68),
+('independent', 'along', 'fpn', 5, 'pn', 3, 1353252864, 217),
+('p', 'presumably', 'n', -1977548800, 'balanced', 1909260288, 197, NULL),
+('pink', 'h', 'tear', 8, 'n', 254, 8, 1006305280),
+('tyy', 'n', 'yyr', 1107820544, 'yr', NULL, 0, 219),
+('u', 'retirement', 'thread', -2083192832, 'rx', -678232064, 209, 1048969216),
+('xk', 'kb', 'z', 9, 'ba', 218, 7, 8),
+('a', 'plenty', 'forget', 36, 'c', 215, 2027094016, NULL),
+('i', 'compromise', 'n', -1090256896, 'o', 10, 66, 1872887808),
+('x', 'disappointment', 'cognitive', 753860608, 'ua', 77, 123, 10),
+('e', 'added', 'aub', 2, 'u', NULL, 9, 92),
+('bc', 'h', 'n', 146, 'master', NULL, 1003945984, NULL),
+('execution', 'f', 'cgp', 574423040, 'gp', 2, -518782976, -1189085184),
+('pv', 'bad', 'v', 132, 'r', 195, 6, 5),
+('modify', 'participation', 'vol', 237, 'j', -842924032, 88, -747765760),
+('substantially', 'i', 'congressional', 2, 'edit', NULL, 1003159552, NULL),
+('tell', 'forty', 'v', -910098432, 'd', 43, 3, NULL),
+('crawl', 'ad', 'respect', -1851195392, 'p', 72, -1709047808, 1343225856),
+('w', 'reception', 'fiber', 56, 's', NULL, 2, -993787904),
+('successful', 'instruct', 'dug', 2, 'u', 7, -411500544, NULL),
+('appointment', 'pregnant', 'weird', 2, 'r', NULL, -897384448, 76),
+('g', 'j', 'thin', 663617536, 'oan', 1, 7, NULL),
+('secretary', 'a', 'o', 103, 'nj', 1977745408, -1291124736, -1314521088),
+('g', 'jq', 'q', 1875116032, 'blame', NULL, 1, 4),
+('oj', 'j', 'breast', 150, 'c', NULL, 3, NULL),
+('rd', 'm', 'comprehensive', 1723334656, 't', NULL, 155, -312344576) ,
+('a', 'd', 'criminal', -1155137536, 'airplane', 242, -662896640, 1),
+('fast', 'i', 'k', -386662400, 'zxe', NULL, 7, 119),
+('xe', 'mouse', 'c', -205717504, 'ew', NULL, -729612288, 86),
+('hang', 'j', 'o', 3, 'hungry', NULL, 200, 49),
+('expense', 'z', 'sum', 2, 'gob', -472055808, -538181632, NULL),
+('nest', 'o', 'k', 116, 'weak', NULL, 223, NULL);
+INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES ('impact', 'b', 'h', 185, 'fj', 7, 7, 3);
+ERROR 23000: Duplicate entry '7' for key 'f6'
+ALTER TABLE t1 ADD COLUMN filler VARCHAR(255) DEFAULT '';
+SELECT * INTO OUTFILE 'load.data' FROM t1;
+UPDATE IGNORE t1 SET pk = 0;
+LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
+HANDLER t1 OPEN AS h;
+HANDLER h READ `PRIMARY` PREV WHERE 0;
+pk f1 f2 f3 f4 f5 f6 f7 f8 filler
+HANDLER h CLOSE;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result
index 807a4091822..db16ecc5a89 100644
--- a/mysql-test/suite/innodb/r/instant_alter_crash.result
+++ b/mysql-test/suite/innodb/r/instant_alter_crash.result
@@ -5,7 +5,7 @@ FLUSH TABLES;
CREATE TABLE t1(id INT PRIMARY KEY, c2 INT UNIQUE)
ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE t2 LIKE t1;
-INSERT INTO t1 VALUES(1,2);
+INSERT INTO t1 VALUES(0,2);
BEGIN;
INSERT INTO t2 VALUES(2,1);
ALTER TABLE t2 ADD COLUMN (c3 TEXT NOT NULL DEFAULT 'De finibus bonorum');
@@ -15,16 +15,17 @@ ALTER TABLE t1 ADD COLUMN (c3 TEXT NOT NULL DEFAULT ' et malorum');
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-COMMIT;
+INSERT INTO t2 VALUES(3,4,'accusantium doloremque laudantium');
# Kill the server
disconnect ddl;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
id c2
-1 2
+0 2
SELECT * FROM t2;
id c2 c3
2 1 De finibus bonorum
+3 4 accusantium doloremque laudantium
BEGIN;
DELETE FROM t1;
ROLLBACK;
@@ -37,16 +38,18 @@ ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-DELETE FROM t1;
+UPDATE t1 SET c2=c2+1;
# Kill the server
disconnect ddl;
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
SELECT * FROM t1;
id c2
+0 3
SELECT * FROM t2;
id c2 c3
2 1 De finibus bonorum
+3 4 accusantium doloremque laudantium
16 1551 Omnium enim rerum
128 1571 principia parva sunt
BEGIN;
@@ -67,11 +70,13 @@ DELETE FROM t1;
disconnect ddl;
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+FOUND 3 /\[Note\] InnoDB: Rolled back recovered transaction / in mysqld.1.err
SELECT * FROM t1;
id c2
SELECT * FROM t2;
id c2
2 1
+3 4
64 42
16 1551
128 1571
@@ -87,7 +92,7 @@ N_RECS=0; LEVEL=0
header=0x010000030074 (id=0x696e66696d756d00)
header=0x010008030000 (id=0x73757072656d756d00)
t2 clustered index root page(type 18):
-N_RECS=6; LEVEL=0
+N_RECS=7; LEVEL=0
header=0x01000003008f (id=0x0000000000000000)
header=0x3000100c00d4 (id=0x80000000,
DB_TRX_ID=0x000000000000,
@@ -99,26 +104,31 @@ header=0x0000180900f4 (id=0x80000002,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x80000001)
-header=0x0000200b0124 (id=0x80000010,
+header=0x0000200b0135 (id=0x80000003,
+ DB_TRX_ID=0x000000000000,
+ DB_ROLL_PTR=0x80000000000000,
+ c2=0x80000004,
+ c3=0x6163637573616e7469756d20646f6c6f72656d717565206c617564616e7469756d)
+header=0x0000280b0165 (id=0x80000010,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x8000060f,
c3=0x4f6d6e69756d20656e696d20726572756d)
-header=0x000028090144 (id=0x80000040,
+header=0x000030090185 (id=0x80000040,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x8000002a)
-header=0x0000300b0179 (id=0x80000080,
+header=0x0000380b01ba (id=0x80000080,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x80000623,
c3=0x207072696e63697069612070617276612073756e74)
-header=0x0000380b0074 (id=0x8000015b,
+header=0x0000400b0074 (id=0x8000015b,
DB_TRX_ID=0x000000000000,
DB_ROLL_PTR=0x80000000000000,
c2=0x8000814d,
c3=0x206574206d616c6f72756d)
-header=0x070008030000 (id=0x000000000000000100)
+header=0x080008030000 (id=0x000000000000000100)
UNLOCK TABLES;
DELETE FROM t2;
InnoDB 0 transactions not purged
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result
index c017a466516..4989c801738 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug.result
+++ b/mysql-test/suite/innodb/r/instant_alter_debug.result
@@ -1,5 +1,8 @@
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
CREATE TABLE t1 (
pk INT AUTO_INCREMENT PRIMARY KEY,
c1 INT,
@@ -260,4 +263,41 @@ a b c d
1 2 NULL 1
2 3 4 1
DROP TABLE t1;
+#
+# MDEV-17899 Assertion failures on rollback of instant ADD/DROP
+# MDEV-18098 Crash after rollback of instant DROP COLUMN
+#
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,ib_commit_inplace_fail_1';
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+ALTER TABLE t1 DROP COLUMN b;
+ERROR HY000: Internal error: Injected error!
+ALTER TABLE t1 DROP COLUMN b;
+ERROR HY000: Internal error: Injected error!
+ALTER TABLE t1 ADD COLUMN c INT;
+ERROR HY000: Internal error: Injected error!
+SELECT * FROM t1;
+a b
+1 2
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN c INT;
+ERROR HY000: Internal error: Injected error!
+BEGIN;
+INSERT INTO t1 VALUES(1, 1);
+ROLLBACK;
+ALTER TABLE t1 DROP COLUMN b;
+ERROR HY000: Internal error: Injected error!
+INSERT INTO t1 values (1,1);
+SELECT * FROM t1;
+a b
+1 1
+DROP TABLE t1;
+SET debug_dbug = @save_dbug;
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+instants
+21
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
diff --git a/mysql-test/suite/innodb/r/instant_alter_null.result b/mysql-test/suite/innodb/r/instant_alter_null.result
new file mode 100644
index 00000000000..f49d60fc301
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_null.result
@@ -0,0 +1,56 @@
+create table t (a int NOT NULL) engine=innodb row_format= compressed;
+alter table t modify a int NULL, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+drop table t;
+create table t (a int NOT NULL) engine=innodb row_format= dynamic;
+alter table t modify a int NULL, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+drop table t;
+create table t (a int NOT NULL) engine=innodb row_format= compact;
+alter table t modify a int NULL, algorithm=instant;
+ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE
+drop table t;
+create table t (
+id int primary key,
+a int NOT NULL default 0,
+b int NOT NULL default 0,
+c int NOT NULL default 0,
+index idx (a,b,c)
+) engine=innodb row_format=redundant;
+insert into t (id, a) values (0, NULL);
+ERROR 23000: Column 'a' cannot be null
+insert into t (id, b) values (0, NULL);
+ERROR 23000: Column 'b' cannot be null
+insert into t (id, c) values (0, NULL);
+ERROR 23000: Column 'c' cannot be null
+insert into t values (1,1,1,1);
+set @id = (select table_id from information_schema.innodb_sys_tables
+where name = 'test/t');
+select * from information_schema.innodb_sys_columns where table_id=@id;
+TABLE_ID NAME POS MTYPE PRTYPE LEN
+TABLE_ID id 0 6 1283 4
+TABLE_ID a 1 6 1283 4
+TABLE_ID b 2 6 1283 4
+TABLE_ID c 3 6 1283 4
+alter table t modify a int NULL, algorithm=instant;
+insert into t values (2, NULL, 2, 2);
+alter table t modify b int NULL, algorithm=nocopy;
+insert into t values (3, NULL, NULL, 3);
+alter table t modify c int NULL, algorithm=inplace;
+insert into t values (4, NULL, NULL, NULL);
+select * from information_schema.innodb_sys_columns where table_id=@id;
+TABLE_ID NAME POS MTYPE PRTYPE LEN
+TABLE_ID id 0 6 1283 4
+TABLE_ID a 1 6 1027 4
+TABLE_ID b 2 6 1027 4
+TABLE_ID c 3 6 1027 4
+select * from t;
+id a b c
+4 NULL NULL NULL
+3 NULL NULL 3
+2 NULL 2 2
+1 1 1 1
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
diff --git a/mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff b/mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff
new file mode 100644
index 00000000000..53d2be18f9c
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_purge,release.rdiff
@@ -0,0 +1,18 @@
+--- instant_alter_purge.result
++++ instant_alter_purge,release.result
+@@ -32,15 +32,11 @@
+ START TRANSACTION WITH CONSISTENT SNAPSHOT;
+ connection default;
+ DELETE FROM t1;
+-SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL go WAIT_FOR do';
+ ALTER TABLE t1 ADD COLUMN f3 INT;
+ connection purge_control;
+-SET DEBUG_SYNC='now WAIT_FOR go';
+ COMMIT;
+ InnoDB 0 transactions not purged
+-SET DEBUG_SYNC='now SIGNAL do';
+ disconnect purge_control;
+ connection default;
+-SET DEBUG_SYNC=RESET;
+ DROP TABLE t1;
+ SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/r/instant_alter_purge.result b/mysql-test/suite/innodb/r/instant_alter_purge.result
new file mode 100644
index 00000000000..a3643610f04
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_alter_purge.result
@@ -0,0 +1,46 @@
+SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+#
+# MDEV-17793 Crash in purge after instant DROP and emptying the table
+#
+connect prevent_purge,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+ALTER TABLE t1 DROP f2, ADD COLUMN f2 INT;
+ALTER TABLE t1 DROP f1;
+DELETE FROM t1;
+connection prevent_purge;
+COMMIT;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+ALTER TABLE t1 ADD COLUMN extra TINYINT UNSIGNED NOT NULL DEFAULT 42;
+InnoDB 1 transactions not purged
+ALTER TABLE t1 DROP extra;
+disconnect prevent_purge;
+InnoDB 0 transactions not purged
+DROP TABLE t1;
+#
+# MDEV-17813 Crash in instant ALTER TABLE due to purge
+# concurrently emptying table
+#
+CREATE TABLE t1 (f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 SET f2=1;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+connect purge_control,localhost,root;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+DELETE FROM t1;
+SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL go WAIT_FOR do';
+ALTER TABLE t1 ADD COLUMN f3 INT;
+connection purge_control;
+SET DEBUG_SYNC='now WAIT_FOR go';
+COMMIT;
+InnoDB 0 transactions not purged
+SET DEBUG_SYNC='now SIGNAL do';
+disconnect purge_control;
+connection default;
+SET DEBUG_SYNC=RESET;
+DROP TABLE t1;
+SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/r/instant_drop.result b/mysql-test/suite/innodb/r/instant_drop.result
index 3f029c3f7d0..0650229dc13 100644
--- a/mysql-test/suite/innodb/r/instant_drop.result
+++ b/mysql-test/suite/innodb/r/instant_drop.result
@@ -130,11 +130,12 @@ update t1 set f3 = 19;
select * from t1;
f1 f3
1 19
-alter table t1 drop column f1, add column f5 int default 10, algorithm=instant;
+alter table t1 drop column f1, add column f5 tinyint default 10 first,
+algorithm=instant;
insert into t1 values(4, 10);
select * from t1;
-f3 f5
-19 10
+f5 f3
+10 19
4 10
create table t2(f1 int, f2 int not null) engine=innodb;
insert into t2(f1, f2) values(1, 2);
@@ -153,9 +154,12 @@ alter table t2 add column f6 char(100) default repeat('a', 99), algorithm=instan
create table t3(f1 int, f2 int not null)engine=innodb;
insert into t3 values(1, 2);
alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant;
+create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb;
+insert into t4 values('4',5,6);
+alter table t4 drop column c;
select * from t1;
-f3 f5
-19 10
+f5 f3
+10 19
4 10
alter table t1 add column f6 int default 9,drop column f5, algorithm = instant;
insert into t1 values(4, 9);
@@ -163,7 +167,7 @@ alter table t1 force, algorithm=inplace;
select * from t1;
f3 f6
19 9
-4 9
+10 9
4 9
select * from t2;
f1 f4 f5 f6
@@ -184,7 +188,16 @@ select * from t3;
f1 f3 f4
1 1 4
alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant;
+select * from t4;
+a b
+4 5
+alter table t4 add column d varchar(5) default 'fubar';
+insert into t4 values('',0,'snafu');
select * from t3;
f1 f3 f4 f5
1 1 4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-drop table t1,t2,t3;
+select * from t4;
+a b d
+ 0 snafu
+4 5 fubar
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/r/instant_varchar_enlarge.result b/mysql-test/suite/innodb/r/instant_varchar_enlarge.result
new file mode 100644
index 00000000000..14f16bd4fe2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/instant_varchar_enlarge.result
@@ -0,0 +1,9 @@
+create table t (a varchar(100)) engine=innodb;
+select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
+name pos mtype prtype len
+a 0 1 524303 100
+alter table t modify a varchar(110), algorithm=inplace;
+select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
+name pos mtype prtype len
+a 0 1 524303 110
+drop table t;
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index 4168a94928f..4a72a37a7ea 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -147,7 +147,6 @@ trx_nl_ro_commits disabled
trx_commits_insert_update disabled
trx_rollbacks disabled
trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
trx_active_transactions disabled
trx_rseg_history_len disabled
trx_undo_slots_used disabled
diff --git a/mysql-test/suite/innodb/r/purge_secondary.result b/mysql-test/suite/innodb/r/purge_secondary.result
index 8f20f5baacb..1b5f2896887 100644
--- a/mysql-test/suite/innodb/r/purge_secondary.result
+++ b/mysql-test/suite/innodb/r/purge_secondary.result
@@ -134,6 +134,7 @@ test.t1 check status OK
InnoDB 0 transactions not purged
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT OTHER_INDEX_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE NAME='test/t1';
diff --git a/mysql-test/suite/innodb/r/table_flags.result b/mysql-test/suite/innodb/r/table_flags.result
index c82cd6ceccb..8c4280738e1 100644
--- a/mysql-test/suite/innodb/r/table_flags.result
+++ b/mysql-test/suite/innodb/r/table_flags.result
@@ -192,3 +192,8 @@ ib_logfile0
ib_logfile1
ibdata1
sys_tables.bin
+call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
+CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
+FULLTEXT KEY(f2),
+FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
+ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
diff --git a/mysql-test/suite/innodb/r/truncate.result b/mysql-test/suite/innodb/r/truncate.result
index 3ade1e7f8de..0e5ffeea34f 100644
--- a/mysql-test/suite/innodb/r/truncate.result
+++ b/mysql-test/suite/innodb/r/truncate.result
@@ -6,3 +6,36 @@ connection default;
TRUNCATE TABLE t;
disconnect dml;
DROP TABLE t;
+#
+# MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSED
+#
+CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB KEY_BLOCK_SIZE=4;
+TRUNCATE TABLE t1;
+SHOW TABLE STATUS;
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 InnoDB # Compressed # # # # # # 1 # # NULL latin1_swedish_ci NULL key_block_size=4 0 N
+DROP TABLE t1;
+#
+# MDEV-17859 Operating system errors in file operations
+# after failed CREATE
+#
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+call mtr.add_suppression("InnoDB: (Operating system )?[Ee]rror number");
+call mtr.add_suppression("InnoDB: Cannot create file '.*t1\\.ibd");
+FLUSH TABLES;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+ERROR HY000: Tablespace for table '`test`.`t1`' exists. Please DISCARD the tablespace before IMPORT
+SELECT * FROM t1;
+a
+1
+DROP TABLE t1;
+#
+# MDEV-17885 TRUNCATE on temporary table causes ER_GET_ERRNO
+#
+CREATE TEMPORARY TABLE t1 (a INT) ENCRYPTED=NO ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+TRUNCATE t1;
+SELECT * FROM t1;
+a
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb/r/undo_truncate_recover.result b/mysql-test/suite/innodb/r/undo_truncate_recover.result
index 2619f384847..018ac65537a 100644
--- a/mysql-test/suite/innodb/r/undo_truncate_recover.result
+++ b/mysql-test/suite/innodb/r/undo_truncate_recover.result
@@ -9,7 +9,6 @@ update t1 set c = 'MariaDB';
update t1 set c = 'InnoDB';
set global debug_dbug = '+d,ib_undo_trunc';
commit;
-call mtr.add_suppression("InnoDB: The redo log transaction size ");
SET GLOBAL innodb_fast_shutdown=0;
FOUND 1 /ib_undo_trunc/ in mysqld.1.err
drop table t1;
diff --git a/mysql-test/suite/innodb/t/alter_candidate_key.test b/mysql-test/suite/innodb/t/alter_candidate_key.test
new file mode 100644
index 00000000000..7429cd89a1a
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_candidate_key.test
@@ -0,0 +1,72 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL,
+ UNIQUE KEY uidx2(f1,f2),
+ UNIQUE KEY uidx1(f2)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1);
+SHOW CREATE TABLE t1;
+SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
+ SIGNAL conc_dml WAIT_FOR go_ahead';
+--send ALTER TABLE t1 CHANGE COLUMN f1 f11 INT, ALGORITHM=INPLACE
+connect (con1,localhost,root,,);
+SET DEBUG_SYNC = 'now WAIT_FOR conc_dml';
+DELETE FROM t1;
+SET DEBUG_SYNC = 'now SIGNAL go_ahead';
+connection default;
+reap;
+SHOW CREATE TABLE t1;
+CHECK TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT, f2 INT,
+ PRIMARY KEY(f1, f2),
+ UNIQUE INDEX uidx2 (f1, f2),
+ UNIQUE INDEX uidx1 (f2))ENGINE=InnoDB;
+ALTER TABLE t1 DROP PRIMARY KEY;
+SHOW CREATE TABLE t1;
+SET DEBUG_SYNC = 'innodb_inplace_alter_table_enter
+ SIGNAL conc_dml WAIT_FOR go_ahead';
+--send ALTER TABLE t1 CHANGE COLUMN f1 f11 INT, ALGORITHM=INPLACE
+connection con1;
+SET DEBUG_SYNC = 'now WAIT_FOR conc_dml';
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES(1, 1), (1, 1);
+SET DEBUG_SYNC = 'now SIGNAL go_ahead';
+connection default;
+reap;
+SHOW CREATE TABLE t1;
+CHECK TABLE t1;
+DROP TABLE t1;
+
+SET SQL_MODE= strict_trans_tables;
+CREATE TABLE t1(a INT UNIQUE) ENGINE=InnoDB;
+SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done';
+--send ALTER TABLE t1 MODIFY COLUMN a INT NOT NULL
+connection con1;
+SET DEBUG_SYNC='now WAIT_FOR dml';
+BEGIN;
+INSERT INTO t1 SET a=NULL;
+ROLLBACK;
+set DEBUG_SYNC='now SIGNAL dml_done';
+connection default;
+--error ER_INVALID_USE_OF_NULL
+reap;
+DROP TABLE t1;
+disconnect con1;
+SET DEBUG_SYNC="RESET";
+SET SQL_MODE=DEFAULT;
+
+CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY(f1, f2),
+ UNIQUE KEY(f2))ENGINE=InnoDB;
+ALTER TABLE t1 DROP PRIMARY KEY;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL,
+ UNIQUE KEY(f2), UNIQUE KEY(f2))ENGINE=InnoDB;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 DROP INDEX f2, ALGORITHM=INPLACE;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
index b832596647f..e0451e121a6 100644
--- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
+++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
@@ -4,6 +4,7 @@
--source include/have_debug_sync.inc
--source include/not_embedded.inc
+select count_star into @init_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
connect (ddl, localhost, root,,);
update performance_schema.setup_instruments set enabled='yes';
update performance_schema.setup_consumers set enabled='yes';
@@ -24,9 +25,10 @@ send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR go';
---replace_regex /.*[\\\/]tmp/tmp/
-SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
-WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
+
+select count_star into @final_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
+
+SELECT @final_count - @init_count;
#--exec lsof -p `pidof mysqld`
SET DEBUG_SYNC = 'now SIGNAL gone';
diff --git a/mysql-test/suite/innodb/t/data_types.test b/mysql-test/suite/innodb/t/data_types.test
index 0978146361c..cfdd5201af2 100644
--- a/mysql-test/suite/innodb/t/data_types.test
+++ b/mysql-test/suite/innodb/t/data_types.test
@@ -88,9 +88,15 @@ CREATE TABLE t1
t1_VARCHAR_500 VARCHAR(500),
t1_VARCHAR_500_BINARY VARCHAR(500) BINARY,
t1_YEAR_2 YEAR(2),
- t1_YEAR_4 YEAR(4)
+ t1_YEAR_4 YEAR(4),
+ t1_CHAR_0 CHAR(0),
+ t1_MYSQL_0 CHAR(0) CHARACTER SET utf8,
+ t1_VARCHAR_0 VARCHAR(0),
+ t1_VARMYSQL_0 VARCHAR(0) CHARACTER SET utf8
) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+
SELECT
name,
CASE mtype
@@ -116,3 +122,17 @@ WHERE name LIKE "t1\_%"
ORDER BY name;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17815 Assertion failed in btr_node_ptr_max_size for CHAR(0)
+--echo #
+CREATE TABLE t1 (c CHAR(0), KEY(c)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('');
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18039 Assertion failed in btr_node_ptr_max_size for VARCHAR(0)
+--echo #
+CREATE TABLE t1 (c VARCHAR(0), KEY(c)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('');
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/default_row_format_create.test b/mysql-test/suite/innodb/t/default_row_format_create.test
index e0981abf7eb..03a7ebd3752 100644
--- a/mysql-test/suite/innodb/t/default_row_format_create.test
+++ b/mysql-test/suite/innodb/t/default_row_format_create.test
@@ -22,7 +22,25 @@ SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+ROW_FORMAT=COMPRESSED;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+TRUNCATE TABLE t1;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+--error 0,ER_CANT_CREATE_TABLE
+CREATE TABLE t1 (c1 INT) ENGINE=InnoDB page_compressed=1;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE IF EXISTS t1;
+
+SET @save_format = @@GLOBAL.innodb_default_row_format;
+SET GLOBAL innodb_default_row_format = redundant;
+CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
+SET GLOBAL innodb_default_row_format = @save_format;
+TRUNCATE TABLE t1;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innochecksum.test b/mysql-test/suite/innodb/t/innochecksum.test
deleted file mode 100644
index 79896ed1e3f..00000000000
--- a/mysql-test/suite/innodb/t/innochecksum.test
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Test innochecksum
-#
-
---source include/have_innodb.inc
-# Embedded server test does not support restarting
---source include/not_embedded.inc
-
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
-INSERT INTO t1 (b) VALUES ('corrupt me');
---disable_query_log
---let $i = 1000
-while ($i)
-{
- INSERT INTO t1 (b) VALUES (REPEAT('abcdefghijklmnopqrstuvwxyz', 100));
- dec $i;
-}
---enable_query_log
-INSERT INTO t1 (b) VALUES ('corrupt me');
-
-let $MYSQLD_DATADIR=`select @@datadir`;
-
---source include/shutdown_mysqld.inc
-
---echo # Run innochecksum on t1
---disable_result_log
---exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd
---enable_result_log
-
---source include/start_mysqld.inc
-
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test
index 5c8025265e5..00300bfdccc 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test
@@ -98,5 +98,37 @@ SET DEBUG_SYNC='RESET';
DROP TABLE t1;
+--echo #
+--echo # MDEV-17470 Orphan temporary files after interrupted ALTER
+--echo # cause InnoDB: Operating system error number 17 and eventual
+--echo # fatal error 71
+--echo #
+CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, i INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6),(NULL,7),(NULL,8);
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+INSERT INTO t1 SELECT NULL, i FROM t1;
+
+LOCK TABLE t1 READ;
+
+--connect (con1,localhost,root,,test)
+let $ID= `SELECT @id := CONNECTION_ID()`;
+send ALTER TABLE t1 FORCE, ALGORITHM=COPY;
+
+--connection default
+let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock';
+source include/wait_condition.inc;
+let $ignore= `SELECT @id := $ID`;
+kill query @id;
+--connection con1
+--error ER_QUERY_INTERRUPTED
+reap;
+--disconnect con1
+--connection default
+UNLOCK TABLES;
+DROP TABLE t1;
+
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index a7f1eb56dce..961d8653e90 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -272,13 +272,8 @@ ALTER TABLE t1o ADD FULLTEXT INDEX(cu),
ADD COLUMN FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE;
# Replace the hidden FTS_DOC_ID column with a user-visible one.
-# This used to work if there is at most one fulltext index.
-# Currently, we disallow native ALTER TABLE if the table
-# contains any FULLTEXT indexes.
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1o ADD COLUMN FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
ALGORITHM=INPLACE;
-ALTER TABLE t1o ADD COLUMN FTS_DOC_ID BIGINT UNSIGNED NOT NULL;
# Replace the user-visible FTS_DOC_ID column with a hidden one.
# We do not support this in-place.
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
@@ -545,6 +540,19 @@ SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN
WHERE T.NAME='test/t1';
DROP TABLE t1;
+--echo # and an MDEV-18041 regression related to indexes prefixes
+create table `test` (
+ `test_old` varchar(255) NOT NULL,
+ `other` varchar(255) NOT NULL,
+ PRIMARY KEY (`test_old`,`other`),
+ UNIQUE KEY uk (`test_old`(100), `other`)
+) ENGINE=InnoDB;
+
+select name, pos from information_schema.innodb_SYS_FIELDS where name in ('test_old', 'other', 'test_new');
+alter table `test` CHANGE COLUMN `test_old` `test_new` varchar(255) NOT NULL;
+select name, pos from information_schema.innodb_SYS_FIELDS where name in ('test_old', 'other', 'test_new');
+drop table `test`;
+
--echo #
--echo # BUG 20029625 - HANDLE_FATAL_SIGNAL (SIG=11) IN
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 97014d84ca7..bfbe62699fd 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -549,6 +549,31 @@ show create table t2c;
--disable_info
DROP TABLE t1,t2,t2c,t2i;
+
+CREATE TABLE t1 (c VARCHAR(1024),
+c1 CHAR(255) NOT NULL,c2 CHAR(255) NOT NULL,c3 CHAR(255) NOT NULL,
+c4 CHAR(255) NOT NULL,c5 CHAR(255) NOT NULL,c6 CHAR(255) NOT NULL,
+c7 CHAR(255) NOT NULL,c8 CHAR(255) NOT NULL,c9 CHAR(255) NOT NULL,
+ca CHAR(255) NOT NULL,cb CHAR(255) NOT NULL,cc CHAR(255) NOT NULL,
+cd CHAR(255) NOT NULL,ce CHAR(255) NOT NULL,cf CHAR(255) NOT NULL,
+d0 CHAR(255) NOT NULL,d1 CHAR(255) NOT NULL,d2 CHAR(255) NOT NULL,
+d3 CHAR(255) NOT NULL,d4 CHAR(255) NOT NULL,d5 CHAR(255) NOT NULL,
+d6 CHAR(255) NOT NULL,d7 CHAR(255) NOT NULL,d8 CHAR(255) NOT NULL,
+d9 CHAR(255) NOT NULL,da CHAR(255) NOT NULL,db CHAR(255) NOT NULL,
+dc CHAR(255) NOT NULL,dd CHAR(255) NOT NULL,de CHAR(255) NOT NULL,
+UNIQUE KEY(c))
+ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES
+(repeat('a',999),'','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''),
+(CONCAT(repeat('a',999),'b'),'','','','','','','','','','','','','','','','','','','','','','','','','','','','','','');
+--error ER_INDEX_COLUMN_TOO_LONG
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT, algorithm=inplace;
+--error ER_INDEX_COLUMN_TOO_LONG
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT, algorithm=copy;
+SELECT COUNT(*) FROM t1;
+CHECK TABLE t1;
+DROP TABLE t1;
+
--echo #
--echo # Bug #17657223 EXCESSIVE TEMPORARY FILE USAGE IN ALTER TABLE
--echo #
@@ -880,8 +905,9 @@ drop table t1;
create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t1 drop primary key, lock=none;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+alter table t1 drop index f1, lock=none;
drop table t1;
--echo #
@@ -1115,12 +1141,39 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
--move_file $MYSQLD_DATADIR/test/t0.ibd $MYSQLD_DATADIR/test/t1.ibd
--source include/start_mysqld.inc
+if ($have_debug) {
+# Initiate shutdown in order to issue a redo log checkpoint and to discard
+# the redo log record that was emitted due to '+d,fil_names_write_bogus'.
+--source include/restart_mysqld.inc
+}
SELECT * FROM t1;
SELECT * FROM t2;
DROP TABLE t1, t2;
+--echo #
+--echo # MDEV-18186 assertion failure on missing InnoDB index
+--echo #
+
+--disable_query_log
+call mtr.add_suppression("Cannot find index i1 in InnoDB index dictionary");
+call mtr.add_suppression("InnoDB indexes are inconsistent with what defined");
+call mtr.add_suppression("Table test/t contains 0 indexes");
+call mtr.add_suppression("InnoDB could not find key no");
+--enable_query_log
+
+# Test an attempt to rename a nonexistent index inside InnoDB
+-- let $MYSQL_DATA_DIR = `SELECT @@datadir`
+CREATE TABLE t (a INT, INDEX i1 (a)) ENGINE=INNODB;
+-- copy_file $MYSQL_DATA_DIR/test/t.frm $MYSQL_DATA_DIR/test/t.fr_
+DROP TABLE t;
+CREATE TABLE t (a INT) ENGINE=INNODB;
+-- remove_file $MYSQL_DATA_DIR/test/t.frm
+-- move_file $MYSQL_DATA_DIR/test/t.fr_ $MYSQL_DATA_DIR/test/t.frm
+SHOW CREATE TABLE t;
+DROP TABLE t;
+
--disable_query_log
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*t[12].ibd.");
diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test
index edf83247142..2b3879bc707 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online.test
+++ b/mysql-test/suite/innodb/t/innodb-table-online.test
@@ -102,10 +102,6 @@ ALTER TABLE t1 ADD UNIQUE INDEX(c2),
LOCK = EXCLUSIVE, ALGORITHM = INPLACE;
SHOW CREATE TABLE t1;
-# We do not support plain DROP_PK_INDEX without ADD_PK_INDEX.
---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
-ALTER TABLE t1 DROP INDEX c2, ALGORITHM = INPLACE;
-SHOW CREATE TABLE t1;
# Now the previous DEBUG_SYNC should kick in.
--send
ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1);
diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns.test b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
index 0e0d6dbb2f5..faf542645fb 100644
--- a/mysql-test/suite/innodb/t/innodb-virtual-columns.test
+++ b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
@@ -306,3 +306,14 @@ select * from gso_grad_supr;
drop table grad_degree;
drop table gso_grad_supr;
+
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL, FULLTEXT KEY(b)) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT, b CHAR(12), c INT AS (a) VIRTUAL) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1,'foo');
+ALTER TABLE t1 ADD FULLTEXT KEY(b);
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index ca37521b9cf..15f8544088d 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -1017,20 +1017,6 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_restore_tablespaces("test_wl5522", "t1");
EOF
-# Test failure after importing the cluster index
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-
---error ER_NOT_KEYFILE
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-
-SET SESSION debug_dbug=@saved_debug_dbug;
-
-# Left over from the failed IMPORT
-perl;
-do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
-ib_unlink_tablespace("test_wl5522", "t1");
-EOF
-
DROP TABLE test_wl5522.t1;
--disable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_28867993.test b/mysql-test/suite/innodb/t/innodb_28867993.test
new file mode 100644
index 00000000000..61e9578df7b
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_28867993.test
@@ -0,0 +1,12 @@
+#
+# Bug#28867993: POSSIBLE ISSUE WITH MYSQL SERVER RESTART
+#
+
+source include/have_innodb.inc;
+create table t1 (a int) engine=innodb;
+insert t1 values (1),(2);
+create database ib_logfile2;
+source include/restart_mysqld.inc;
+select * from t1;
+drop table t1;
+drop database ib_logfile2;
diff --git a/mysql-test/suite/innodb/t/innodb_zip_innochecksum.opt b/mysql-test/suite/innodb/t/innodb_zip_innochecksum.opt
deleted file mode 100644
index 1dcd1367b3a..00000000000
--- a/mysql-test/suite/innodb/t/innodb_zip_innochecksum.opt
+++ /dev/null
@@ -1,2 +0,0 @@
---skip-innodb-doublewrite
---innodb-file-per-table
diff --git a/mysql-test/suite/innodb/t/innodb_zip_innochecksum.test b/mysql-test/suite/innodb/t/innodb_zip_innochecksum.test
deleted file mode 100644
index 63a4b418677..00000000000
--- a/mysql-test/suite/innodb/t/innodb_zip_innochecksum.test
+++ /dev/null
@@ -1,239 +0,0 @@
-#************************************************************
-# WL6045:Improve Innochecksum
-#************************************************************
---source include/innodb_page_size_small.inc
---source include/no_valgrind_without_big.inc
-# Embedded server does not support crashing.
---source include/not_embedded.inc
-
-# Avoid CrashReporter popup on Mac.
---source include/not_crashrep.inc
-
---echo # Set the environmental variables
-let MYSQLD_BASEDIR= `SELECT @@basedir`;
-let MYSQLD_DATADIR= `SELECT @@datadir`;
-let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
-call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-
-CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
-CREATE INDEX idx1 ON tab1(c2(10));
-INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
-CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-insert into t1 values(1,"i");
-insert into t1 values(2,"am");
-insert into t1 values(3,"compressed table");
-
---echo # Shutdown the Server
---source include/shutdown_mysqld.inc
---echo # Server Default checksum = innodb
-
-#
-# Not repeatable with --parallel= >1
-#
-#--echo [1a]: check the innochecksum when file doesn't exists
-#--error 1
-#--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/aa.ibd 2> $SEARCH_FILE
-#let SEARCH_PATTERN= Error: $MYSQLD_DATADIR/test/aa.ibd cannot be found;
-#--source include/search_pattern_in_file.inc
-
---echo [1b]: check the innochecksum without --strict-check
---exec $INNOCHECKSUM $MYSQLD_DATADIR/test/tab1.ibd
-
---echo [2]: check the innochecksum with full form --strict-check=crc32
---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd
-
---echo [3]: check the innochecksum with short form -C crc32
---exec $INNOCHECKSUM -C crc32 $MYSQLD_DATADIR/test/tab1.ibd
-
---echo [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
---error 1
---exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
---source include/search_pattern_in_file.inc
-
---echo [5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
---error 1
---exec $INNOCHECKSUM -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
---source include/search_pattern_in_file.inc
-
---echo [6]: check the innochecksum with full form strict-check & no-check , an error is expected
---error 1
---exec $INNOCHECKSUM --strict-check=innodb --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
---source include/search_pattern_in_file.inc
-
---echo [7]: check the innochecksum with short form strict-check & no-check , an error is expected
---error 1
---exec $INNOCHECKSUM -C innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
---source include/search_pattern_in_file.inc
-
---echo [8]: check the innochecksum with short & full form combination
---echo # strict-check & no-check, an error is expected
---error 1
---exec $INNOCHECKSUM --strict-check=innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
---source include/search_pattern_in_file.inc
-
---echo [9]: check the innochecksum with full form --strict-check=innodb
-# Server Default checksum = crc32
---exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-
---echo [10]: check the innochecksum with full form --strict-check=none
---echo # when server Default checksum=crc32
---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-
---echo [11]: check the innochecksum with short form -C innodb
---echo # when server Default checksum=crc32
---exec $INNOCHECKSUM -C innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-
---echo [12]: check the innochecksum with short form -C none
---echo # when server Default checksum=crc32
---exec $INNOCHECKSUM -C none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-
---echo [13]: check strict-check with invalid values
---error 1
---exec $INNOCHECKSUM --strict-check=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -C strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --strict-check=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -C strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --strict-check=strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -C strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --strict-check=InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -C InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2>$SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --strict-check=crc $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'crc\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --strict-check=no $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error while setting value \'no\' to \'strict-check\';
---source include/search_pattern_in_file.inc
-
---echo [14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum
---echo # Also check the long form of write option.
---exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/t1.ibd
-# Rewrite done, verify with --strict-check=crc32
---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd
-
---echo [14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
---echo # Also check the long form of write option.
---exec $INNOCHECKSUM --no-check --write=innodb $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --strict-check=crc32 --write=innodb $MYSQLD_DATADIR/test/t1.ibd
-# Rewrite done, verify with --strict-check=innodb
---exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd
-
---echo # start the server with innodb_checksum_algorithm=InnoDB
---let $restart_parameters= --innodb_checksum_algorithm=innodb
---source include/start_mysqld.inc
-
-INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
-SELECT c1,c2 FROM tab1 order by c1,c2;
-
---echo # Stop the server
---source include/shutdown_mysqld.inc
-
---echo [15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
---echo # Also check the short form of write option.
---exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/t1.ibd
-# Rewrite done, verify with --strict-check=none
---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd
-
---echo # Start the server with checksum algorithm=none
---let $restart_parameters= --innodb_checksum_algorithm=none
---source include/start_mysqld.inc
-
-INSERT INTO tab1 VALUES(3, 'Innochecksum None');
-SELECT c1,c2 FROM tab1 order by c1,c2;
-DROP TABLE t1;
-
---echo # Stop the server
---source include/shutdown_mysqld.inc
-
---echo [16]: rewrite into new checksum=crc32 with innochecksum
---exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
-
---echo # Restart the DB server with innodb_checksum_algorithm=crc32
---let $restart_parameters= --innodb_checksum_algorithm=crc32
---source include/start_mysqld.inc
-
-SELECT * FROM tab1;
-DELETE FROM tab1 where c1=3;
-SELECT c1,c2 FROM tab1 order by c1,c2;
-
---echo # Stop server
---source include/shutdown_mysqld.inc
-
---echo [17]: rewrite into new checksum=InnoDB
---exec $INNOCHECKSUM --no-check --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
-
---echo # Restart the DB server with innodb_checksum_algorithm=InnoDB
---let $restart_parameters= --innodb_checksum_algorithm=innodb
---source include/start_mysqld.inc
-
-DELETE FROM tab1 where c1=2;
-SELECT * FROM tab1;
-
---echo # Stop server
---source include/shutdown_mysqld.inc
-
---echo [18]:check Innochecksum with invalid write options
---error 1
---exec $INNOCHECKSUM --no-check --write=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN=Error while setting value \'strict_crc32\' to \'write\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --no-check --write=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN=Error while setting value \'strict_innodb\' to \'write\';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --no-check --write=crc23 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN=Error while setting value \'crc23\' to \'write\';
---source include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
-
-# Cleanup
---let $restart_parameters=
---source include/start_mysqld.inc
-
-DROP TABLE tab1;
diff --git a/mysql-test/suite/innodb/t/innodb_zip_innochecksum2.opt b/mysql-test/suite/innodb/t/innodb_zip_innochecksum2.opt
deleted file mode 100644
index 5bbafd986e5..00000000000
--- a/mysql-test/suite/innodb/t/innodb_zip_innochecksum2.opt
+++ /dev/null
@@ -1,3 +0,0 @@
---skip-innodb-doublewrite
---innodb-file-per-table
---innodb-change-buffering=none
diff --git a/mysql-test/suite/innodb/t/innodb_zip_innochecksum2.test b/mysql-test/suite/innodb/t/innodb_zip_innochecksum2.test
deleted file mode 100644
index 330bb81ba75..00000000000
--- a/mysql-test/suite/innodb/t/innodb_zip_innochecksum2.test
+++ /dev/null
@@ -1,118 +0,0 @@
-#************************************************************
-# WL6045:Improve Innochecksum
-#************************************************************
---source include/innodb_page_size_small.inc
---source include/have_debug.inc
---source include/no_valgrind_without_big.inc
-# Avoid CrashReporter popup on Mac.
---source include/not_crashrep.inc
-
---source include/not_embedded.inc
--- source include/big_test.inc
-
---disable_query_log
-# This warning occurs due to small buffer pool size(i.e. 8MB). It doesn't occur
-# with --mysqld=--innodb_buffer_pool_size=10MB
-call mtr.add_suppression("\\[Warning\\] InnoDB: Difficult to find free blocks in the buffer pool.*");
---enable_query_log
-let MYSQLD_BASEDIR= `SELECT @@basedir`;
-let MYSQLD_DATADIR= `SELECT @@datadir`;
-let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
-
-SET GLOBAL innodb_compression_level=0;
-SELECT @@innodb_compression_level;
-
-CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
-let $i=10;
-while ($i > 0) {
- INSERT INTO t1 SELECT * from t1;
- dec $i;
-}
-
---echo # stop the server
---source include/shutdown_mysqld.inc
-
-# Page_type_dump for t1
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/t1.ibd
---file_exists $MYSQLTEST_VARDIR/tmp/dump.txt
---remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
-
---echo [1]:# check the both short and long options for "help"
---exec $INNOCHECKSUM --help $MYSQLD_DATADIR/test/t1.ibd > $MYSQLTEST_VARDIR/tmp/help_output_long.txt
---exec $INNOCHECKSUM -I $MYSQLD_DATADIR/test/t1.ibd > $MYSQLTEST_VARDIR/tmp/help_output_short.txt
---diff_files $MYSQLTEST_VARDIR/tmp/help_output_long.txt $MYSQLTEST_VARDIR/tmp/help_output_short.txt
-
---echo [2]:# Run the innochecksum when file isn't provided.
---echo # It will print the innochecksum usage similar to --help option.
---error 1
---exec $INNOCHECKSUM > $MYSQLTEST_VARDIR/tmp/usage.txt
---diff_files $MYSQLTEST_VARDIR/tmp/help_output_long.txt $MYSQLTEST_VARDIR/tmp/usage.txt
---remove_file $MYSQLTEST_VARDIR/tmp/usage.txt
-
-perl;
-use strict;
-use warnings;
-use File::Copy;
-my $dir = $ENV{'MYSQLTEST_VARDIR'};
-my $file= 'help_output_long.txt';
-# open file in write mode
-open IN_FILE,"<", "$dir/tmp/$file" or die $!;
-open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
-while(<IN_FILE>) {
- unless ($_=~ /^debug.*$/ || $_=~ /\-#, \-\-debug.*$/ || $_=~ /http:.*html/) {
- $_=~ s/^\S*innochecksum.+Ver.+[0-9]*\.[0-9]*\.[0-9]*.+$/innochecksum Ver #.#.#/g;
- $_=~ s/(Copyright\s\(c\))\s([0-9]*),\s([0-9]*)(.*)/$1 YEAR, YEAR $4/g;
- $_=~ s/Usage:.*\[-c/Usage: innochecksum [-c/g;
- print OUT_FILE $_;
- }
-}
-close(IN_FILE);
-close(OUT_FILE);
-# move the new content from tmp file to the orginal file.
-move ("$dir/tmp/tmpfile", "$dir/tmp/$file");
-EOF
-
---cat_file $MYSQLTEST_VARDIR/tmp/help_output_long.txt
---remove_file $MYSQLTEST_VARDIR/tmp/help_output_long.txt
---remove_file $MYSQLTEST_VARDIR/tmp/help_output_short.txt
-
---echo [3]:# check the both short and long options for "count" and exit
---replace_regex /[0-9]+/#/
---exec $INNOCHECKSUM --count $MYSQLD_DATADIR/test/t1.ibd
---replace_regex /[0-9]+/#/
---exec $INNOCHECKSUM -c $MYSQLD_DATADIR/test/t1.ibd
-
---echo [4]:# Print the version of innochecksum and exit
---replace_regex /.*innochecksum.*Ver.*[0-9]*.[0-9]*.[0-9]*.*/innochecksum Ver #.#.#/
---exec $INNOCHECKSUM -V $MYSQLD_DATADIR/test/t1.ibd
-
---echo # Restart the DB server
---source include/start_mysqld.inc
-
-DROP TABLE t1;
-
---echo [5]:# Check the innochecksum for compressed table t1 with different key_block_size
---echo # Test for KEY_BLOCK_SIZE=1
---let $size=1
---source ../include/innodb-wl6045.inc
-
---echo # Test for KEY_BLOCK_SIZE=2
---let $size=2
---source ../include/innodb-wl6045.inc
-
---echo # Test for for KEY_BLOCK_SIZE=4
---let $size=4
---source ../include/innodb-wl6045.inc
-
-set innodb_strict_mode=off;
---echo # Test for for KEY_BLOCK_SIZE=8
---let $size=8
---source ../include/innodb-wl6045.inc
-
-set innodb_strict_mode=off;
---echo # Test for KEY_BLOCK_SIZE=16
---let $size=16
---source ../include/innodb-wl6045.inc
---echo # Test[5] completed
diff --git a/mysql-test/suite/innodb/t/innodb_zip_innochecksum3.opt b/mysql-test/suite/innodb/t/innodb_zip_innochecksum3.opt
deleted file mode 100644
index 302a9872a26..00000000000
--- a/mysql-test/suite/innodb/t/innodb_zip_innochecksum3.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb-file-per-table
diff --git a/mysql-test/suite/innodb/t/innodb_zip_innochecksum3.test b/mysql-test/suite/innodb/t/innodb_zip_innochecksum3.test
deleted file mode 100644
index dab10dcc997..00000000000
--- a/mysql-test/suite/innodb/t/innodb_zip_innochecksum3.test
+++ /dev/null
@@ -1,406 +0,0 @@
-#************************************************************
-# WL6045:Improve Innochecksum
-#************************************************************
---source include/innodb_page_size_small.inc
-
---source include/no_valgrind_without_big.inc
-
-# Embedded server does not support crashing.
---source include/not_embedded.inc
-
-# Avoid CrashReporter popup on Mac.
---source include/not_crashrep.inc
-
---echo # Set the environmental variables
-let MYSQLD_BASEDIR= `SELECT @@basedir`;
-let MYSQLD_DATADIR= `SELECT @@datadir`;
-let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
-
-call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to.*");
-
---echo [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
-
-CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
-linestring_key GEOMETRY NOT NULL,
-linestring_nokey GEOMETRY NOT NULL)
-ENGINE=InnoDB ;
-
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (1, ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) '));
-
-CREATE INDEX linestring_index ON tab1(linestring_nokey(5));
-ALTER TABLE tab1 ADD KEY (linestring_key(5));
-
---echo # create a compressed table
-CREATE TABLE tab2(col_1 CHAR (255) ,
-col_2 VARCHAR (255), col_3 longtext,
-col_4 longtext,col_5 longtext,
-col_6 longtext , col_7 int )
-engine = innodb row_format=compressed key_block_size=4;
-
-CREATE INDEX idx1 ON tab2(col_3(10));
-CREATE INDEX idx2 ON tab2(col_4(10));
-CREATE INDEX idx3 ON tab2(col_5(10));
-
-# load the with repeat function
-SET @col_1 = repeat('a', 5);
-SET @col_2 = repeat('b', 20);
-SET @col_3 = repeat('c', 100);
-SET @col_4 = repeat('d', 100);
-SET @col_5 = repeat('e', 100);
-SET @col_6 = repeat('f', 100);
-
-# insert 5 records
-let $i = 5;
-while ($i) {
- eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
- VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
- dec $i;
-}
-
---disable_result_log
-SELECT * FROM tab2 ORDER BY col_7;
-
---echo # stop the server
---source include/shutdown_mysqld.inc
-
---echo [1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
---exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab2.ibd
---exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/ibdata1
-perl;
-foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
- system("$ENV{INNOCHECKSUM} --no-check --write=InnoDB $_")
-}
-EOF
-
---echo : start the server with innodb_checksum_algorithm=strict_innodb
---let $restart_parameters= --innodb_checksum_algorithm=strict_innodb
---source include/start_mysqld.inc
-
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
-
-# load the with repeat function
-SET @col_1 = repeat('a', 5);
-SET @col_2 = repeat('b', 20);
-SET @col_3 = repeat('c', 100);
-SET @col_4 = repeat('d', 100);
-SET @col_5 = repeat('e', 100);
-SET @col_6 = repeat('f', 100);
-
-# check the table status is GOOD with DML
-let $i = 6;
-eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
-
--- disable_result_log
-SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
-FROM tab1 ORDER BY pk;
-
--- disable_result_log
-SELECT * FROM tab2 ORDER BY col_7;
-
---echo # stop the server
---source include/shutdown_mysqld.inc
-
---echo [1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
---exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab2.ibd
---exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/ibdata1
-perl;
-foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
- system("$ENV{INNOCHECKSUM} --no-check --write=crc32 $_")
-}
-EOF
-
---echo # start the server with innodb_checksum_algorithm=strict_crc32
---let $restart_parameters= --innodb_checksum_algorithm=strict_crc32
---source include/start_mysqld.inc
-
-# check the table status is GOOD with DML
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
-ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
-
-# load the with repeat function
-SET @col_1 = repeat('g', 5);
-SET @col_2 = repeat('h', 20);
-SET @col_3 = repeat('i', 100);
-SET @col_4 = repeat('j', 100);
-SET @col_5 = repeat('k', 100);
-SET @col_6 = repeat('l', 100);
-
-# check the table status is GOOD with DML
-let $i = 7;
-eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
-
-# check the records from table
--- disable_result_log
-SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
-FROM tab1 ORDER BY pk;
-
--- disable_result_log
-SELECT * FROM tab2 ORDER BY col_7;
-
---echo # stop the server
---source include/shutdown_mysqld.inc
-
---echo [1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab2.ibd
---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/ibdata1
-perl;
-foreach (glob("$ENV{MYSQLD_DATADIR}/undo*")) {
- system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_")
-}
-foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
- system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_")
-}
-EOF
-
---let $restart_parameters= --innodb_checksum_algorithm=strict_none
---source include/start_mysqld.inc
---let $restart_parameters=
-# check the table status is GOOD with DML
-INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
-VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
-
-# load the with repeat function
-SET @col_1 = repeat('m', 5);
-SET @col_2 = repeat('n', 20);
-SET @col_3 = repeat('o', 100);
-SET @col_4 = repeat('p', 100);
-SET @col_5 = repeat('q', 100);
-SET @col_6 = repeat('r', 100);
-
-# check the table status is GOOD with DML
-let $i = 8;
-eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
-VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
-
-# check the records from table
--- disable_result_log
-SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
-FROM tab1 ORDER BY pk;
-
---disable_result_log
-SELECT * FROM tab2 ORDER BY col_7;
---enable_result_log
-
---echo # stop the server
---source include/shutdown_mysqld.inc
-
---echo [2]: Check the page type summary with shortform for tab1.ibd
---replace_regex /File.*.ibd/File::tab1.ibd/ /[0-9]+/#/
---exec $INNOCHECKSUM -S $MYSQLD_DATADIR/test/tab1.ibd 2>$MYSQLTEST_VARDIR/tmp/page_summary_short.txt
-
---echo [3]: Check the page type summary with longform for tab1.ibd
---replace_regex /File.*.ibd/File::tab1.ibd/ /[0-9]+/#/
---exec $INNOCHECKSUM --page-type-summary $MYSQLD_DATADIR/test/tab1.ibd 2>$MYSQLTEST_VARDIR/tmp/page_summary_long.txt
-
---remove_file $MYSQLTEST_VARDIR/tmp/page_summary_short.txt
---remove_file $MYSQLTEST_VARDIR/tmp/page_summary_long.txt
---echo [4]: Page type dump for with longform for tab1.ibd
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---exec $INNOCHECKSUM --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/tab1.ibd
-
-perl;
-use strict;
-use warnings;
-use File::Copy;
-my $dir = $ENV{'MYSQLTEST_VARDIR'};
-opendir(DIR, $dir) or die $!;
-my $file= 'dump.txt';
-# open file in write mode
-open IN_FILE,"<", "$dir/tmp/$file" or die $!;
-open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!;
-while(<IN_FILE>)
-{
- # Replace the intergers to # and complete file path to file name only.
- $_=~ s/Filename.+/Filename::tab1.ibd/g;
- $_=~ s/\d+/#/g;
- print OUT_FILE $_;
-}
-close(IN_FILE);
-close(OUT_FILE);
-# move the new content from tmp file to the orginal file.
-move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file");
-closedir(DIR);
-EOF
-
---echo # Print the contents stored in dump.txt
-cat_file $MYSQLTEST_VARDIR/tmp/dump.txt;
---remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
-
---echo # Variables used by page type dump for ibdata1
---exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/ibdata1 > $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt
-
---file_exists $MYSQLTEST_VARDIR/tmp/dump.txt
---remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
-
-perl;
-use strict;
-use warnings;
-use File::Copy;
-my $dir = $ENV{'MYSQLTEST_VARDIR'};
-opendir(DIR, $dir) or die $!;
-my $file= 'page_verbose_summary.txt';
-# open file in write mode
-open IN_FILE,"<", "$dir/tmp/$file" or die $!;
-open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!;
-while(<IN_FILE>)
-{
- # Replace complete file path to file name only.
- $_=~ s/$dir/MYSQLTEST_VARDIR/;
- # Remove debug option, which is not in all builds
- next if (/debug/);
- print OUT_FILE $_;
-}
-close(IN_FILE);
-close(OUT_FILE);
-# move the new content from tmp file to the orginal file.
-move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file");
-closedir(DIR);
-EOF
-
-cat_file $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt;
---remove_file $MYSQLTEST_VARDIR/tmp/page_verbose_summary.txt
-
---echo [5]: Page type dump for with shortform for tab1.ibd
---exec $INNOCHECKSUM -D $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/tab1.ibd
-
-perl;
-use strict;
-use warnings;
-use File::Copy;
-my $dir = $ENV{'MYSQLTEST_VARDIR'};
-opendir(DIR, $dir) or die $!;
-my $file= 'dump.txt';
-# open file in write mode
-open IN_FILE,"<", "$dir/tmp/$file" or die $!;
-open OUT_FILE, ">", "$dir/tmp/innochecksum_3_tempfile" or die $!;
-while(<IN_FILE>)
-{
- # Replace the intergers to # and complete file path to file name only.
- $_=~ s/Filename.+/Filename::tab1.ibd/g;
- $_=~ s/\d+/#/g;
- print OUT_FILE $_;
-}
-close(IN_FILE);
-close(OUT_FILE);
-# move the new content from tmp file to the orginal file.
-move ("$dir/tmp/innochecksum_3_tempfile", "$dir/tmp/$file");
-closedir(DIR);
-EOF
-
-# Print the contents stored in dump.txt
-cat_file $MYSQLTEST_VARDIR/tmp/dump.txt;
---remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
-
---echo [6]: check the valid lower bound values for option
---echo # allow-mismatches,page,start-page,end-page
---exec $INNOCHECKSUM --allow-mismatches=0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM -a 0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --page=0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM -p 0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --start-page=0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM -s 0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM --end-page=0 $MYSQLD_DATADIR/test/tab1.ibd
---exec $INNOCHECKSUM -e 0 $MYSQLD_DATADIR/test/tab1.ibd
-
-#
-# These produce now errors
-#
-#--echo [7]: check the negative values for option
-#--echo # allow-mismatches,page,start-page,end-page.
-#--echo # They will reset to zero for negative values.
-#--echo # check the invalid lower bound values
-#--exec $INNOCHECKSUM --allow-mismatches=-1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM -a -1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM --page=-1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM -p -1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM --start-page=-1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM -s -1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM --end-page=-1 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM -e -1 $MYSQLD_DATADIR/test/tab1.ibd
-#
-#--echo [8]: check the valid upper bound values for
-#--echo # both short and long options "allow-mismatches" and "end-page"
-#
-#--exec $INNOCHECKSUM --allow-mismatches=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM -a 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM --end-page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
-#--exec $INNOCHECKSUM -e 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
-
---echo [9]: check the both short and long options "page" and "start-page" when
---echo # seek value is larger than file size.
---error 1
---exec $INNOCHECKSUM --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -p 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --start-page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -s 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
---source include/search_pattern_in_file.inc
-
---echo [34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
---echo # innochecksum will fail with error code: 1
---error 1
---exec $INNOCHECKSUM --allow-mismatches=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -a 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --end-page=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -e 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --page=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -p 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM --start-page=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
-
---error 1
---exec $INNOCHECKSUM -s 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
-let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
---source include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
-
-# Cleanup
---source include/start_mysqld.inc
-
-DROP TABLE tab1,tab2;
diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test
index fd7fbe94450..b1679023e11 100644
--- a/mysql-test/suite/innodb/t/instant_alter.test
+++ b/mysql-test/suite/innodb/t/instant_alter.test
@@ -397,6 +397,242 @@ ALTER TABLE t1 ADD COLUMN t TEXT;
SELECT * FROM t1;
DROP TABLE t1;
+#
+# MDEV-17735 Assertion failure in row_parse_int() on first ADD/DROP COLUMN
+# when an AUTO_INCREMENT column is not in PRIMARY KEY
+#
+eval CREATE TABLE t1 (a INT AUTO_INCREMENT, b INT, KEY(a)) $engine;
+INSERT INTO t1 SET a=NULL;
+ALTER TABLE t1 DROP COLUMN b;
+ALTER TABLE t1 ADD COLUMN c INT NOT NULL DEFAULT 42;
+INSERT INTO t1 SET a=NULL;
+UPDATE t1 SET a=a+2;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (i INT) $engine;
+INSERT INTO t1 SET i=1;
+ALTER TABLE t1 ADD COLUMN b BIT FIRST;
+ALTER TABLE t1 ADD COLUMN v INT AS (i) VIRTUAL;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-17721 Corrupted data dictionary after instant DROP COLUMN
+eval CREATE TABLE t1 (ts TIMESTAMP) $engine;
+ALTER TABLE t1 ADD COLUMN f VARCHAR(8), ADD COLUMN dt DATETIME;
+ALTER TABLE t1 ADD COLUMN b BIT, DROP COLUMN f, ADD COLUMN t TIME FIRST;
+ALTER TABLE t1 ADD COLUMN ts2 TIMESTAMP;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) $engine;
+INSERT INTO t1 VALUES (4,4,4);
+ALTER TABLE t1 DROP f1, DROP f2, ADD f4 INT, ADD f5 INT;
+DELETE FROM t1;
+ALTER TABLE t1 DROP COLUMN f4;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT) $engine;
+ALTER TABLE t1 DROP f2, ADD COLUMN f4 INT;
+ALTER TABLE t1 DROP f4;
+ALTER TABLE t1 DROP f1;
+DROP TABLE t1;
+
+# MDEV-17901 Crash after instant DROP COLUMN of AUTO_INCREMENT column
+eval CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) $engine;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 () VALUES (),();
+SELECT * FROM t1;
+# Adding AUTO_INCREMENT column will always require rebuild.
+ALTER TABLE t1 ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD KEY(id);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-18149 Crash after DROP COLUMN of AUTO_INCREMENT column on nonempty table
+eval CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT, f INT, KEY(id)) $engine;
+INSERT INTO t1 SET f=NULL;
+ALTER TABLE t1 DROP COLUMN id;
+INSERT INTO t1 SET f=NULL;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# MDEV-18076/MDEV-18077 Crash on AUTO_INCREMENT column after instant DROP
+eval CREATE TABLE t1(f INT, k INT NOT NULL AUTO_INCREMENT, KEY(k)) $engine;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+
+eval CREATE TABLE t1(pk INT PRIMARY KEY, f INT, k INT AUTO_INCREMENT, KEY(k))
+$engine;
+ALTER TABLE t1 DROP COLUMN f;
+INSERT INTO t1 (pk) VALUES (1);
+DROP TABLE t1;
+
+# MDEV-17763 Assertion `len == 20U' failed in rec_convert_dtuple_to_rec_comp
+# upon DROP COLUMN
+eval CREATE TABLE t1 (
+ pk INT PRIMARY KEY,
+ f1 INT,
+ f2 CHAR(255),
+ f3 BIGINT,
+ f4 INT,
+ f5 CHAR(255),
+ f6 CHAR(255),
+ f7 CHAR(255) NOT NULL,
+ f8 INT,
+ f9 CHAR(10)
+) $engine;
+
+INSERT INTO t1 VALUES
+ (1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a'),
+ (2, 2, 'b', 2, 2, 'b', 'b', 'b', 2, 'b'),
+ (3, 3, 'c', 3, 3, 'c', 'c', 'c', 3, 'c'),
+ (4, 4, 'd', 4, 4, 'd', 'd', 'd', 4, 'd'),
+ (5, 5, 'e', 5, 5, 'e', 'e', 'e', 5, 'e'),
+ (6, 6, 'f', 6, 6, 'f', 'f', 'f', 6, 'f'),
+ (7, 7, 'g', 7, 7, 'g', 'g', 'g', 7, 'g'),
+ (8, 8, 'h', 8, 8, 'h', 'h', 'h', 8, 'h'),
+ (9, 9, 'i', 9, 9, 'i', 'i', 'i', 9, 'i'),
+ (10, 0, 'j', 0, 0, 'j', 'j', 'j', 0, 'j'),
+ (11, 1, 'k', 1, 1, 'k', 'k', 'k', 1, 'k'),
+ (12, 2, 'l', 2, 2, 'l', 'l', 'l', 2, 'l'),
+ (13, 3, 'm', 3, 3, 'm', 'm', 'm', 3, 'm'),
+ (14, 4, 'n', 4, 4, 'n', 'n', 'n', 4, 'n'),
+ (15, 5, 'o', 5, 5, 'o', 'o', 'o', 5, 'o');
+
+DELETE FROM t1 WHERE pk=1;
+--source include/wait_all_purged.inc
+INSERT INTO t1 VALUES
+ (1, 1, 'a', 1, 1, 'a', 'a', 'a', 1, 'a');
+ALTER TABLE t1 DROP COLUMN f1;
+DROP TABLE t1;
+
+# MDEV-17820 Assertion failures on DROP COLUMN
+eval CREATE TABLE t1 (
+ pk INT PRIMARY KEY,
+ f1 INT, f2 CHAR(32) NOT NULL,
+ f3 INT NOT NULL, f4 INT NOT NULL, f5 INT, f6 CHAR(32) NOT NULL,
+ f7 CHAR(32), f8 CHAR(32)
+) $engine;
+
+INSERT INTO t1 VALUES
+ (1,9,'',2,88,88,'','',''),(2,48,'',8,68,92,'','',''),
+ (3,41,'',56,84,37,'','',''),(4,NULL,'',6,6,NULL,'','',''),
+ (5,52,'',37,44,20,'','',''),(6,44,'',53,4,NULL,'','',''),
+ (7,24,'',54,8,54,'','',''),(8,80,'',3,52,20,'','',''),
+ (9,71,'',34,32,NULL,'','',''),(10,14,'',6,64,88,'','',''),
+ (11,48,'',8,25,42,'','',''),(12,16,'',8,7,NULL,'','',''),
+ (13,NULL,'',22,0,95,'','',''),(14,4,'',72,48,NULL,'','',''),
+ (15,4,'',5,64,2,'','',''),(16,NULL,'',9,40,30,'','',''),
+ (17,92,'',48,2,NULL,'','',''),(18,36,'',48,51,7,'','',''),
+ (19,NULL,'',80,96,NULL,'','',''),(20,96,'',9,80,NULL,'','',''),
+ (21,50,'',16,40,NULL,'','',''),(22,NULL,'',7,84,8,'','',''),
+ (23,28,'',93,80,NULL,'','',''),(24,31,'',40,38,NULL,'','',''),
+ (25,85,'',8,5,88,'','',''),(26,66,'',8,32,4,'','',''),
+ (51,52,'',6,92,15,'','',''),(52,77,'',24,24,28,'','',''),
+ (53,8,'',75,31,NULL,'','',''),(54,48,'',5,8,1,'','',''),
+ (55,90,'',56,12,5,'','',''),(56,92,'',4,9,88,'','',''),
+ (57,83,'',23,40,72,'','',''),(58,7,'',4,40,32,'','',''),
+ (59,28,'',2,3,32,'','',''),(60,16,'',80,4,NULL,'','',''),
+ (61,44,'',88,24,NULL,'','',''),(62,4,'',5,25,3,'','',''),
+ (63,NULL,'',7,24,76,'','',''),(64,0,'',13,40,73,'','',''),
+ (101,NULL,'',1,49,75,'','',''),(102,34,'',10,17,20,'','',''),
+ (103,8,'',2,2,NULL,'','',''),(104,12,'',44,48,52,'','',''),
+ (105,8,'',4,19,38,'','',''),(106,20,'',6,80,9,'','',''),
+ (107,72,'',72,16,56,'','',''),(108,76,'',98,24,21,'','',''),
+ (109,67,'',16,91,NULL,'','',''),(110,72,'',72,3,48,'','',''),
+ (151,8,'',3,86,NULL,'','',''),(152,NULL,'',52,72,0,'','',''),
+ (153,NULL,'',46,30,92,'','',''),(154,80,'',1,40,48,'','',''),
+ (155,24,'',68,68,8,'','',''),(156,85,'',85,72,60,'','',''),
+ (157,7,'',7,12,6,'','',''),(158,NULL,'',48,48,80,'','',''),
+ (159,12,'',0,36,0,'','',''),(160,2,'',6,52,NULL,'','',''),
+ (201,0,'',1,3,NULL,'','',''),(202,NULL,'',3,53,14,'','',''),
+ (203,84,'',6,20,NULL,'','',''),(204,38,'',25,13,88,'','',''),
+ (205,1,'',2,69,5,'','',''),(206,7,'',60,22,NULL,'','',''),
+ (207,NULL,'',5,4,NULL,'','',''),(251,7,'',0,4,40,'','',''),
+ (252,4,'',16,8,NULL,'','',''),(253,14,'',60,12,99,'','',''),
+ (254,84,'',68,16,5,'','',''),(255,3,'',70,36,61,'','',''),
+ (256,7,'',18,48,NULL,'','',''),(257,NULL,'',68,53,NULL,'','',''),
+ (258,29,'',52,16,64,'','',''),(259,NULL,'',80,92,40,'','',''),
+ (301,68,'',1,48,48,'','',''),(302,2,'',1,1,32,'','',''),
+ (303,44,'',60,96,16,'','',''),(304,32,'',52,64,32,'','',''),
+ (305,88,'',37,72,NULL,'','',''),(306,5,'',35,60,20,'','',''),
+ (307,35,'',4,48,NULL,'','',''),(308,4,'',92,44,80,'','',''),
+ (351,48,'',60,4,40,'','',''),(352,7,'',9,61,13,'','',''),
+ (353,0,'',5,93,53,'','',''),(354,7,'',1,20,NULL,'','',''),
+ (355,84,'',5,48,96,'','',''),(356,NULL,'',39,92,36,'','',''),
+ (357,88,'',9,76,44,'','',''),(358,66,'',34,67,80,'','',''),
+ (359,8,'',8,52,NULL,'','',''),(360,3,'',53,83,NULL,'','',''),
+ (361,23,'',44,9,48,'','',''),(362,4,'',0,54,48,'','',''),
+ (363,75,'',66,76,52,'','','');
+
+ALTER TABLE t1 ADD COLUMN x VARCHAR(255) DEFAULT ' foobar ';
+UPDATE t1 SET f1 = 0;
+ALTER TABLE t1 DROP COLUMN x;
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (f1 VARCHAR(1), f2 VARCHAR(2)) $engine;
+ALTER TABLE t1 MODIFY f2 VARCHAR (8) FIRST;
+DROP TABLE t1;
+
+# MDEV-18035 Failing assertion on DELETE
+eval CREATE TABLE t1 (a INT UNIQUE, b INT UNIQUE, PRIMARY KEY(a,b)) $engine;
+ALTER TABLE t1 DROP PRIMARY KEY;
+ALTER TABLE t1 CHANGE COLUMN a a INT;
+DELETE FROM t1 WHERE a = NULL OR a IS NULL;
+DROP TABLE t1;
+
+# MDEV-18048 Failing assertion on ALTER
+eval CREATE TABLE t1 (a INT, b INT, c INT NOT NULL, d INT,
+e INT, f INT, g INT, h INT, j INT) $engine;
+ALTER TABLE t1 MODIFY COLUMN c INT, MODIFY COLUMN a INT AFTER b;
+DROP TABLE t1;
+
+# MDEV-18033/MDEV-18034 Failing assertion on ALTER
+eval CREATE TABLE t1 (a INT NOT NULL) $engine;
+INSERT INTO t1 VALUES (1);
+ALTER TABLE t1 ADD COLUMN b INT;
+ALTER TABLE t1 MODIFY COLUMN a INT NULL;
+DROP TABLE t1;
+
+# MDEV-18160/MDEV-18162 Failing assertion on ALTER
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT) $engine;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+
+eval CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT) $engine;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t1 DROP c;
+ALTER TABLE t1 DROP b, ADD v INT AS (a);
+DROP TABLE t1;
+
+# MDEV-18218 Assertion `0' failed in btr_page_reorganize_low upon DROP COLUMN
+eval CREATE TABLE t1 (pk INT PRIMARY KEY, i INT, b BLOB NOT NULL) $engine;
+INSERT INTO t1 VALUES (1,10,REPEAT('foobar',2000));
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 VALUES (2,20);
+# this evicts and reloads the table definition until MDEV-17468 is fixed
+ALTER TABLE t1 ADD COLUMN vpk INT AS (pk);
+# this would load wrong metadata from the previous DROP COLUMN b, causing a crash
+ALTER TABLE t1 DROP COLUMN i;
+DROP TABLE t1;
+
+# MDEV-18315 Assertion instant.fields[i].col->same_format(*fields[i].col)
+# failed in dict_index_t::instant_add_field
+eval CREATE TABLE t1 (a INT, b INT) $engine;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD f DATE AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+
+# MDEV-18316 Assertion is_added() failed in dict_col_t::instant_value
+eval CREATE TABLE t1 (a INT, b INT) $engine;
+INSERT INTO t1 VALUES (1,1);
+ALTER TABLE t1 ADD COLUMN f INT AFTER a;
+ALTER TABLE t1 DROP b, DROP f;
+DROP TABLE t1;
+
dec $format;
}
disconnect analyze;
diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test
new file mode 100644
index 00000000000..18ace4cc521
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test
@@ -0,0 +1,138 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-17821 Assertion `!page_rec_is_supremum(rec)' failed
+--echo # in btr_pcur_store_position
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+ALTER TABLE t1 ADD COLUMN f VARCHAR(255);
+ALTER TABLE t1 DROP COLUMN f;
+DELETE FROM t1;
+HANDLER t1 OPEN;
+HANDLER t1 READ `PRIMARY` <= (3);
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ pk INT AUTO_INCREMENT,
+ f1 CHAR(32),
+ f2 CHAR(32),
+ f3 CHAR(32),
+ f4 INT,
+ f5 CHAR(32),
+ f6 INT,
+ f7 INT,
+ f8 INT,
+ PRIMARY KEY (pk),
+ UNIQUE (f6)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES
+ ('reality', 'llt', 'within', -1996816384, 'j', 160, 7, -1822687232),
+ ('h', 'j', 'j', 251, 'civilian', NULL, 211, NULL),
+ ('ltq', 'b', 'mud', 111, 'v', 90, 0, NULL),
+ ('toxic', 'breakfast', 'series', 2, 'x', NULL, 118, 2),
+ ('h', 'n', 'vision', 84, 'n', NULL, 197, 103),
+ ('h', 'tq', 'q', 6, 'bet', -1927151616, -446038016, 3),
+ ('pocket', 'qjt', 'jtl', 0, 'blink', NULL, 12, 0),
+ ('k', 'uv', 'exist', 37, 'g', 149, -1610219520, NULL),
+ ('parent', 'motion', 'u', 70, 'promote', NULL, 178, NULL),
+ ('get', 'convict', 'liquid', -780337152, 'd', NULL, 4, NULL),
+ ('vp', 'px', 'xi', -631111680, 'support', NULL, 8, NULL),
+ ('ck', 'z', 'minority', 8, 'k', NULL, 864878592, NULL),
+ ('kxx', 'g', 'container', 1, 'cholesterol', NULL, 4, 1404436480),
+ ('xxv', 'rail', 'j', 219, 'serious', NULL, -816119808, 62),
+ ('x', 'v', 'vr', 146, 'm', 16, 170, -1765867520),
+ ('age', 'm', 'q', -1251278848, 'rte', 6, 224, NULL),
+ ('discrimination', 't', 'q', 31, 'exl', 0, 2, 244),
+ ('water', 'x', 'ldb', 98, 'r', 235, 4, 63),
+ ('d', 'db', 'p', 248, 'so-called', 102, -255524864, 198),
+ ('last', 'bz', 'us', 0, 'experienced', 137, 240, 134),
+ ('q', 'z', 'attract', 67, 'code', 67, 75, 1758920704),
+ ('yellow', 'c', 'u', 6, 'v', 1731985408, 528154624, 2),
+ ('cognitive', 'he', 'protective', 590020608, 'sentence', NULL, 4, 102),
+ ('eih', 'l', 'ih', 1266024448, 'traditionally', NULL, 190, NULL),
+ ('pine', 'i', 'y', 6, 'glimpse', 214, 7, -1486880768),
+ ('jo', 'everyone', 'ol', 0, 'lj', NULL, 1, 0),
+ ('blood', 'f', 'scientist', 54, 'j', 1341128704, 168, NULL),
+ ('z', 'brief', 'ambassador', 115, 'ygp', 82, 129, NULL),
+ ('gp', 'severe', 'consist', 7, 'p', -1829961728, 602669056, 154),
+ ('admit', 'poetry', 'x', 116, 'enemy', 174, -2128543744, -407764992),
+ ('s', 'norm', 'decide', 2055667712, 'rtz', NULL, 99, -1233715200),
+ ('tzg', 'f', 'beg', 2016280576, 'w', NULL, -643825664, 137),
+ ('zgg', 'x', 'f', 148, 'y', -987496448, -708116480, 8),
+ ('attorney', 'perfectly', 's', 49, 'z', -1865285632, 56, -1518534656),
+ ('concentrate', 's', 'k', -1028849664, 'tir', 83, -1592459264, 1820065792),
+ ('t', 'sacrifice', 'ir', -2143879168, 'recipe', 156, 217, NULL),
+ ('wdf', 'd', 'f', 137, 'empty', NULL, 188, NULL),
+ ('o', 'customer', 'qd', -2135293952, 'z', 1527840768, 227, -1174929408),
+ ('d', 'qow', 'o', 1472266240, 'whe', NULL, 7, 197),
+ ('deny', 'reputation', 'dutch', 59, 'v', 124, 2, 191),
+ ('m', 'liver', 'fv', 0, 'policy', 781582336, 198574080, 177),
+ ('vk', 'kx', 'immigrant', -1452736512, 'x', 163, 76, 6) ,
+ ('j', 'ru', 'r', 67, 'joke', NULL, 3, NULL),
+ ('o', 'u', 'a', -569442304, 'uz', NULL, 933298176, NULL),
+ ('g', 'zb', 'c', -1694760960, 'fish', 18, -390463488, 1),
+ ('bb', 'o', 'b', 6, 'z', 9, 12, NULL),
+ ('compelling', 'xe', 'debut', 89, 'e', -734724096, 119, 175),
+ ('md', 'r', 'object', 1046478848, 'frequently', 915537920, 0, 1506410496),
+ ('dwn', 'wnz', 'x', 1767571456, 'nz', 241, -882180096, 9),
+ ('zvf', 'vfo', 'g', -844824576, 'w', NULL, 1, 9),
+ ('w', 'pose', 'r', 1029308416, 'a', -48627712, 1756168192, NULL),
+ ('o', 'jwp', 'patient', 172, 'i', 297140224, 45809664, 3),
+ ('w', 'p', 'american', 450297856, 'z', 20, 4, 186),
+ ('ridiculous', 'helpful', 'vy', -2022899712, 'conspiracy', NULL, 162, -264634368),
+ ('t', 'g', 'spite', 289931264, 'y', 4, 13, NULL),
+ ('performer', 'i', 'tomato', -1519386624, 'mz', 8, 87, 106),
+ ('m', 'z', 'hang', 3, 'crowded', -537919488, 1, 2),
+ ('fu', 'uot', 'j', 1, 'o', 179, 220, -2084569088),
+ ('ts', 'n', 'su', 1, 'o', 198, 9, 68),
+ ('ball', 'halfway', 'uf', 40, 'l', 145948672, 9, 149),
+ ('hunting', 'n', 'teenager', 0, 'neat', 209, 2044461056, 68),
+ ('independent', 'along', 'fpn', 5, 'pn', 3, 1353252864, 217),
+ ('p', 'presumably', 'n', -1977548800, 'balanced', 1909260288, 197, NULL),
+ ('pink', 'h', 'tear', 8, 'n', 254, 8, 1006305280),
+ ('tyy', 'n', 'yyr', 1107820544, 'yr', NULL, 0, 219),
+ ('u', 'retirement', 'thread', -2083192832, 'rx', -678232064, 209, 1048969216),
+ ('xk', 'kb', 'z', 9, 'ba', 218, 7, 8),
+ ('a', 'plenty', 'forget', 36, 'c', 215, 2027094016, NULL),
+ ('i', 'compromise', 'n', -1090256896, 'o', 10, 66, 1872887808),
+ ('x', 'disappointment', 'cognitive', 753860608, 'ua', 77, 123, 10),
+ ('e', 'added', 'aub', 2, 'u', NULL, 9, 92),
+ ('bc', 'h', 'n', 146, 'master', NULL, 1003945984, NULL),
+ ('execution', 'f', 'cgp', 574423040, 'gp', 2, -518782976, -1189085184),
+ ('pv', 'bad', 'v', 132, 'r', 195, 6, 5),
+ ('modify', 'participation', 'vol', 237, 'j', -842924032, 88, -747765760),
+ ('substantially', 'i', 'congressional', 2, 'edit', NULL, 1003159552, NULL),
+ ('tell', 'forty', 'v', -910098432, 'd', 43, 3, NULL),
+ ('crawl', 'ad', 'respect', -1851195392, 'p', 72, -1709047808, 1343225856),
+ ('w', 'reception', 'fiber', 56, 's', NULL, 2, -993787904),
+ ('successful', 'instruct', 'dug', 2, 'u', 7, -411500544, NULL),
+ ('appointment', 'pregnant', 'weird', 2, 'r', NULL, -897384448, 76),
+ ('g', 'j', 'thin', 663617536, 'oan', 1, 7, NULL),
+ ('secretary', 'a', 'o', 103, 'nj', 1977745408, -1291124736, -1314521088),
+ ('g', 'jq', 'q', 1875116032, 'blame', NULL, 1, 4),
+ ('oj', 'j', 'breast', 150, 'c', NULL, 3, NULL),
+ ('rd', 'm', 'comprehensive', 1723334656, 't', NULL, 155, -312344576) ,
+ ('a', 'd', 'criminal', -1155137536, 'airplane', 242, -662896640, 1),
+ ('fast', 'i', 'k', -386662400, 'zxe', NULL, 7, 119),
+ ('xe', 'mouse', 'c', -205717504, 'ew', NULL, -729612288, 86),
+ ('hang', 'j', 'o', 3, 'hungry', NULL, 200, 49),
+ ('expense', 'z', 'sum', 2, 'gob', -472055808, -538181632, NULL),
+ ('nest', 'o', 'k', 116, 'weak', NULL, 223, NULL);
+--error ER_DUP_ENTRY
+INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES ('impact', 'b', 'h', 185, 'fj', 7, 7, 3);
+
+ALTER TABLE t1 ADD COLUMN filler VARCHAR(255) DEFAULT '';
+SELECT * INTO OUTFILE 'load.data' FROM t1;
+UPDATE IGNORE t1 SET pk = 0;
+LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
+HANDLER t1 OPEN AS h;
+HANDLER h READ `PRIMARY` PREV WHERE 0;
+
+# Cleanup
+HANDLER h CLOSE;
+DROP TABLE t1;
+--let $datadir= `select @@datadir`
+--remove_file $datadir/test/load.data
diff --git a/mysql-test/suite/innodb/t/instant_alter_crash.test b/mysql-test/suite/innodb/t/instant_alter_crash.test
index b1615041393..d16ee6c929a 100644
--- a/mysql-test/suite/innodb/t/instant_alter_crash.test
+++ b/mysql-test/suite/innodb/t/instant_alter_crash.test
@@ -16,7 +16,7 @@ let MYSQLD_DATADIR=`select @@datadir`;
CREATE TABLE t1(id INT PRIMARY KEY, c2 INT UNIQUE)
ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE t2 LIKE t1;
-INSERT INTO t1 VALUES(1,2);
+INSERT INTO t1 VALUES(0,2);
BEGIN;
INSERT INTO t2 VALUES(2,1);
ALTER TABLE t2 ADD COLUMN (c3 TEXT NOT NULL DEFAULT 'De finibus bonorum');
@@ -29,7 +29,7 @@ ALTER TABLE t1 ADD COLUMN (c3 TEXT NOT NULL DEFAULT ' et malorum');
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-COMMIT;
+INSERT INTO t2 VALUES(3,4,'accusantium doloremque laudantium');
--source include/kill_mysqld.inc
disconnect ddl;
@@ -54,7 +54,7 @@ ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere';
connection default;
SET DEBUG_SYNC='now WAIT_FOR ddl';
SET GLOBAL innodb_flush_log_at_trx_commit=1;
-DELETE FROM t1;
+UPDATE t1 SET c2=c2+1;
--source include/kill_mysqld.inc
disconnect ddl;
@@ -91,6 +91,10 @@ disconnect ddl;
SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_PATTERN= \[Note\] InnoDB: Rolled back recovered transaction ;
+-- source include/search_pattern_in_file.inc
+
SELECT * FROM t1;
SELECT * FROM t2;
BEGIN;
diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test
index 05812322317..fcccbd9a750 100644
--- a/mysql-test/suite/innodb/t/instant_alter_debug.test
+++ b/mysql-test/suite/innodb/t/instant_alter_debug.test
@@ -5,6 +5,10 @@
SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+SET @old_instant=
+(SELECT variable_value FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column');
+
CREATE TABLE t1 (
pk INT AUTO_INCREMENT PRIMARY KEY,
c1 INT,
@@ -296,4 +300,40 @@ SET DEBUG_SYNC = RESET;
SELECT * FROM t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-17899 Assertion failures on rollback of instant ADD/DROP
+--echo # MDEV-18098 Crash after rollback of instant DROP COLUMN
+--echo #
+
+SET @save_dbug = @@SESSION.debug_dbug;
+SET debug_dbug='+d,ib_commit_inplace_fail_1';
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 DROP COLUMN b;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 DROP COLUMN b;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 ADD COLUMN c INT;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a int, b int) ENGINE=InnoDB;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 ADD COLUMN c INT;
+BEGIN;
+INSERT INTO t1 VALUES(1, 1);
+ROLLBACK;
+--error ER_INTERNAL_ERROR
+ALTER TABLE t1 DROP COLUMN b;
+INSERT INTO t1 values (1,1);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SET debug_dbug = @save_dbug;
+
+SELECT variable_value-@old_instant instants
+FROM information_schema.global_status
+WHERE variable_name = 'innodb_instant_alter_column';
+
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
diff --git a/mysql-test/suite/innodb/t/instant_alter_null.test b/mysql-test/suite/innodb/t/instant_alter_null.test
new file mode 100644
index 00000000000..69fb1ae4495
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_null.test
@@ -0,0 +1,57 @@
+--source include/have_innodb.inc
+
+create table t (a int NOT NULL) engine=innodb row_format= compressed;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t modify a int NULL, algorithm=instant;
+drop table t;
+
+create table t (a int NOT NULL) engine=innodb row_format= dynamic;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t modify a int NULL, algorithm=instant;
+drop table t;
+
+create table t (a int NOT NULL) engine=innodb row_format= compact;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t modify a int NULL, algorithm=instant;
+drop table t;
+
+create table t (
+ id int primary key,
+ a int NOT NULL default 0,
+ b int NOT NULL default 0,
+ c int NOT NULL default 0,
+ index idx (a,b,c)
+) engine=innodb row_format=redundant;
+
+--error ER_BAD_NULL_ERROR
+insert into t (id, a) values (0, NULL);
+--error ER_BAD_NULL_ERROR
+insert into t (id, b) values (0, NULL);
+--error ER_BAD_NULL_ERROR
+insert into t (id, c) values (0, NULL);
+
+insert into t values (1,1,1,1);
+
+set @id = (select table_id from information_schema.innodb_sys_tables
+where name = 'test/t');
+
+--replace_column 1 TABLE_ID
+select * from information_schema.innodb_sys_columns where table_id=@id;
+
+alter table t modify a int NULL, algorithm=instant;
+insert into t values (2, NULL, 2, 2);
+
+alter table t modify b int NULL, algorithm=nocopy;
+insert into t values (3, NULL, NULL, 3);
+
+alter table t modify c int NULL, algorithm=inplace;
+insert into t values (4, NULL, NULL, NULL);
+
+--replace_column 1 TABLE_ID
+select * from information_schema.innodb_sys_columns where table_id=@id;
+
+select * from t;
+
+check table t;
+
+drop table t;
diff --git a/mysql-test/suite/innodb/t/instant_alter_purge.test b/mysql-test/suite/innodb/t/instant_alter_purge.test
new file mode 100644
index 00000000000..152d200d977
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_alter_purge.test
@@ -0,0 +1,75 @@
+--source include/have_innodb.inc
+--source include/maybe_debug.inc
+if ($have_debug) {
+--source include/have_debug_sync.inc
+}
+
+SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
+SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
+
+--echo #
+--echo # MDEV-17793 Crash in purge after instant DROP and emptying the table
+--echo #
+
+connect (prevent_purge,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+CREATE TABLE t1 (f1 INT, f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES ();
+ALTER TABLE t1 DROP f2, ADD COLUMN f2 INT;
+ALTER TABLE t1 DROP f1;
+DELETE FROM t1;
+
+connection prevent_purge;
+COMMIT;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+
+ALTER TABLE t1 ADD COLUMN extra TINYINT UNSIGNED NOT NULL DEFAULT 42;
+let $wait_all_purged= 1;
+--source include/wait_all_purged.inc
+ALTER TABLE t1 DROP extra;
+disconnect prevent_purge;
+let $wait_all_purged= 0;
+--source include/wait_all_purged.inc
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17813 Crash in instant ALTER TABLE due to purge
+--echo # concurrently emptying table
+--echo #
+CREATE TABLE t1 (f2 INT) ENGINE=InnoDB;
+INSERT INTO t1 SET f2=1;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+
+connect (purge_control,localhost,root);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+DELETE FROM t1;
+
+if ($have_debug) {
+SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL go WAIT_FOR do';
+}
+send ALTER TABLE t1 ADD COLUMN f3 INT;
+
+connection purge_control;
+if ($have_debug) {
+SET DEBUG_SYNC='now WAIT_FOR go';
+}
+COMMIT;
+--source include/wait_all_purged.inc
+if ($have_debug) {
+SET DEBUG_SYNC='now SIGNAL do';
+}
+disconnect purge_control;
+
+connection default;
+reap;
+if ($have_debug) {
+SET DEBUG_SYNC=RESET;
+}
+DROP TABLE t1;
+
+SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
diff --git a/mysql-test/suite/innodb/t/instant_drop.test b/mysql-test/suite/innodb/t/instant_drop.test
index 7be4998dccd..566ac02b314 100644
--- a/mysql-test/suite/innodb/t/instant_drop.test
+++ b/mysql-test/suite/innodb/t/instant_drop.test
@@ -64,7 +64,8 @@ alter table t1 drop column f2, add column f3 int default 3, algorithm=instant;
select * from t1;
update t1 set f3 = 19;
select * from t1;
-alter table t1 drop column f1, add column f5 int default 10, algorithm=instant;
+alter table t1 drop column f1, add column f5 tinyint default 10 first,
+algorithm=instant;
insert into t1 values(4, 10);
select * from t1;
@@ -79,6 +80,10 @@ create table t3(f1 int, f2 int not null)engine=innodb;
insert into t3 values(1, 2);
alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant;
+create table t4(a varchar(1), b int, c int, primary key(a,b))engine=innodb;
+insert into t4 values('4',5,6);
+alter table t4 drop column c;
+
--source include/restart_mysqld.inc
select * from t1;
alter table t1 add column f6 int default 9,drop column f5, algorithm = instant;
@@ -93,6 +98,11 @@ show create table t2;
select * from t3;
alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant;
+
+select * from t4;
+alter table t4 add column d varchar(5) default 'fubar';
+insert into t4 values('',0,'snafu');
--source include/restart_mysqld.inc
select * from t3;
-drop table t1,t2,t3;
+select * from t4;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/suite/innodb/t/instant_varchar_enlarge.test b/mysql-test/suite/innodb/t/instant_varchar_enlarge.test
new file mode 100644
index 00000000000..42689deca11
--- /dev/null
+++ b/mysql-test/suite/innodb/t/instant_varchar_enlarge.test
@@ -0,0 +1,8 @@
+--source include/have_innodb.inc
+
+# LEN must increase here
+create table t (a varchar(100)) engine=innodb;
+select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
+alter table t modify a varchar(110), algorithm=inplace;
+select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
+drop table t;
diff --git a/mysql-test/suite/innodb/t/log_file_name_debug.test b/mysql-test/suite/innodb/t/log_file_name_debug.test
index 0aaf798e2b3..d85fbf08194 100644
--- a/mysql-test/suite/innodb/t/log_file_name_debug.test
+++ b/mysql-test/suite/innodb/t/log_file_name_debug.test
@@ -44,5 +44,7 @@ SELECT * FROM t1;
--let $restart_parameters=
--source include/restart_mysqld.inc
+# Initiate shutdown in order to issue a redo log checkpoint and to discard
+# the redo log record that was emitted due to '+d,fil_names_write_bogus'.
+--source include/restart_mysqld.inc
DROP TABLE t1;
-
diff --git a/mysql-test/suite/innodb/t/purge_thread_shutdown.test b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
index 8a9a834454c..5be29b7a6a3 100644
--- a/mysql-test/suite/innodb/t/purge_thread_shutdown.test
+++ b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
@@ -32,7 +32,9 @@ delete from t1 where a=3;
error ER_WRONG_VALUE_FOR_VAR;
set global innodb_fast_shutdown=0;
-let $me=`select connection_id()`;
+# Get id with space prefix to ensure that replace_result doesn't replace
+# the error code
+let $me=`select concat(' ', connection_id())`;
replace_result $me ID;
error ER_CONNECTION_KILLED;
eval kill $me;
diff --git a/mysql-test/suite/innodb/t/recovery_shutdown.test b/mysql-test/suite/innodb/t/recovery_shutdown.test
index d796189c724..3bd01653065 100644
--- a/mysql-test/suite/innodb/t/recovery_shutdown.test
+++ b/mysql-test/suite/innodb/t/recovery_shutdown.test
@@ -51,6 +51,12 @@ FLUSH TABLES;
--let $shutdown_timeout=60
--source include/restart_mysqld.inc
+# Perform a slow shutdown in order to roll back all recovered transactions
+# and to avoid locking conflicts with the DROP TABLE below.
+--disable_query_log
+SET GLOBAL innodb_fast_shutdown=0;
+--source include/restart_mysqld.inc
+
--disable_query_log
let $c = $trx;
while ($c)
diff --git a/mysql-test/suite/innodb/t/table_flags.test b/mysql-test/suite/innodb/t/table_flags.test
index 284589a17c8..e979b5fffe0 100644
--- a/mysql-test/suite/innodb/t/table_flags.test
+++ b/mysql-test/suite/innodb/t/table_flags.test
@@ -216,3 +216,9 @@ DROP TABLE tr,tc,td,tz,tp;
--list_files $bugdir
--remove_files_wildcard $bugdir
--rmdir $bugdir
+
+call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
+ FULLTEXT KEY(f2),
+ FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb/t/truncate.test b/mysql-test/suite/innodb/t/truncate.test
index cf71ca83c4c..cd1d827e157 100644
--- a/mysql-test/suite/innodb/t/truncate.test
+++ b/mysql-test/suite/innodb/t/truncate.test
@@ -15,3 +15,38 @@ TRUNCATE TABLE t;
disconnect dml;
DROP TABLE t;
+
+--echo #
+--echo # MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSED
+--echo #
+CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB KEY_BLOCK_SIZE=4;
+TRUNCATE TABLE t1;
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
+SHOW TABLE STATUS;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17859 Operating system errors in file operations
+--echo # after failed CREATE
+--echo #
+let $MYSQLD_DATADIR= `select @@datadir`;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+call mtr.add_suppression("InnoDB: (Operating system )?[Ee]rror number");
+call mtr.add_suppression("InnoDB: Cannot create file '.*t1\\.ibd");
+FLUSH TABLES;
+--move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/hidden.frm
+--error ER_TABLESPACE_EXISTS
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+--move_file $MYSQLD_DATADIR/test/hidden.frm $MYSQLD_DATADIR/test/t1.frm
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17885 TRUNCATE on temporary table causes ER_GET_ERRNO
+--echo #
+CREATE TEMPORARY TABLE t1 (a INT) ENCRYPTED=NO ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+TRUNCATE t1;
+SELECT * FROM t1;
+DROP TEMPORARY TABLE t1;
diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.test b/mysql-test/suite/innodb/t/undo_truncate_recover.test
index 56647bcc567..d31bc7821ac 100644
--- a/mysql-test/suite/innodb/t/undo_truncate_recover.test
+++ b/mysql-test/suite/innodb/t/undo_truncate_recover.test
@@ -38,13 +38,9 @@ update t1 set c = 'MariaDB';
update t1 set c = 'InnoDB';
eval set global debug_dbug = '+d,$SEARCH_PATTERN';
commit;
-# FIXME: remove this work-around, and generate less log!
-call mtr.add_suppression("InnoDB: The redo log transaction size ");
SET GLOBAL innodb_fast_shutdown=0;
--source include/shutdown_mysqld.inc
--source include/search_pattern_in_file.inc
-# FIXME: remove this work-around, and generate less log!
---let $restart_parameters= --innodb-buffer-pool-size=16m
--source include/start_mysqld.inc
drop table t1;
diff --git a/mysql-test/suite/innodb_fts/r/create.result b/mysql-test/suite/innodb_fts/r/create.result
index f3650fb3dc9..55c5c45f643 100644
--- a/mysql-test/suite/innodb_fts/r/create.result
+++ b/mysql-test/suite/innodb_fts/r/create.result
@@ -16,10 +16,10 @@ INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
# The data below is not 3-byte UTF-8, but 4-byte chars.
INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x96\x95\xF0\x9F...' for column 't' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x96\x95\xF0\x9F...' for column `test`.`t`.`t` at row 1
INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
Warnings:
-Warning 1366 Incorrect string value: '\xF0\x9F\x96\x96\xF0\x9F...' for column 't' at row 1
+Warning 1366 Incorrect string value: '\xF0\x9F\x96\x96\xF0\x9F...' for column `test`.`t`.`t` at row 1
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST
(REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5));
COUNT(*)
@@ -162,3 +162,19 @@ SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word'
len COUNT(*)
84 6
DROP TABLE t;
+#
+# MDEV-17923 Assertion memcmp(field, field_ref_zero, 7) failed in
+# trx_undo_page_report_modify upon optimizing table
+# under innodb_optimize_fulltext_only
+#
+CREATE TABLE t1 (f1 TEXT, f2 TEXT, FULLTEXT KEY (f2)) ENGINE=InnoDB;
+INSERT INTO t1 (f1) VALUES ('foo'),('bar');
+DELETE FROM t1 LIMIT 1;
+ALTER TABLE t1 ADD FULLTEXT KEY (f1);
+SET @optimize_fulltext.save= @@innodb_optimize_fulltext_only;
+SET GLOBAL innodb_optimize_fulltext_only= 1;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+DROP TABLE t1;
+SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save;
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result b/mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result
index 6ee5f9f4322..1382457debf 100644
--- a/mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result
@@ -79,7 +79,7 @@ CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
-ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED
+ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT;
SELECT * FROM fts_test WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
@@ -228,3 +228,12 @@ DROP TABLE articles;
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b);
DROP TABLE t1;
+#
+# MDEV-18152 Assertion 'num_fts_index <= 1' failed
+# in prepare_inplace_alter_table_dict
+#
+CREATE TABLE t1
+(a VARCHAR(128), b VARCHAR(128), FULLTEXT INDEX(a), FULLTEXT INDEX(b))
+ENGINE=InnoDB;
+ALTER TABLE t1 ADD c SERIAL;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result b/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result
index 36d3826be59..f998881f11b 100644
--- a/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-fic.result
@@ -36,6 +36,8 @@ count
2
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('+MySQL -YourSQL' IN BOOLEAN MODE);
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result b/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result
index dea2f2360da..cad1acb3b01 100644
--- a/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-stopword.result
@@ -249,6 +249,8 @@ articles CREATE TABLE `articles` (
ALTER TABLE articles ADD FULLTEXT INDEX idx (title,body);
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH(title,body) AGAINST ("where will");
id title body
@@ -571,6 +573,8 @@ select @@innodb_ft_enable_stopword;
1
ANALYZE TABLE articles;
Table Op Msg_type Msg_text
+test.articles analyze status Engine-independent statistics collected
+test.articles analyze Warning Engine-independent statistics are not collected for column 'body'
test.articles analyze status OK
SELECT * FROM articles WHERE MATCH(title,body) AGAINST ("where will");
id title body
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result
index aec3d7f777d..431a95442e6 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result
@@ -37,9 +37,13 @@ DELETE FROM t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a2`) REFERENCES `t1` (`a1`) ON UPDATE CASCADE)
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze Warning Engine-independent statistics are not collected for column 'b1'
test.t1 analyze status OK
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze Warning Engine-independent statistics are not collected for column 'b2'
test.t2 analyze status OK
SELECT id1 FROM t1 WHERE MATCH (a1,b1) AGAINST ('tutorial') ORDER BY id1;
id1
diff --git a/mysql-test/suite/innodb_fts/t/create.test b/mysql-test/suite/innodb_fts/t/create.test
index fe0273af750..4e522994fcc 100644
--- a/mysql-test/suite/innodb_fts/t/create.test
+++ b/mysql-test/suite/innodb_fts/t/create.test
@@ -90,3 +90,19 @@ ENGINE=InnoDB;
# The column length should be 84 bytes (84 characters * 1 byte/character).
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
DROP TABLE t;
+
+--echo #
+--echo # MDEV-17923 Assertion memcmp(field, field_ref_zero, 7) failed in
+--echo # trx_undo_page_report_modify upon optimizing table
+--echo # under innodb_optimize_fulltext_only
+--echo #
+
+CREATE TABLE t1 (f1 TEXT, f2 TEXT, FULLTEXT KEY (f2)) ENGINE=InnoDB;
+INSERT INTO t1 (f1) VALUES ('foo'),('bar');
+DELETE FROM t1 LIMIT 1;
+ALTER TABLE t1 ADD FULLTEXT KEY (f1);
+SET @optimize_fulltext.save= @@innodb_optimize_fulltext_only;
+SET GLOBAL innodb_optimize_fulltext_only= 1;
+OPTIMIZE TABLE t1;
+DROP TABLE t1;
+SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save;
diff --git a/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test b/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
index ddd92556772..c81ec18a4e6 100644
--- a/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
+++ b/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
@@ -276,3 +276,13 @@ ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b)
# Cleanup
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18152 Assertion 'num_fts_index <= 1' failed
+--echo # in prepare_inplace_alter_table_dict
+--echo #
+CREATE TABLE t1
+(a VARCHAR(128), b VARCHAR(128), FULLTEXT INDEX(a), FULLTEXT INDEX(b))
+ENGINE=InnoDB;
+ALTER TABLE t1 ADD c SERIAL;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result
index 03a8543da27..84e7bec53cd 100644
--- a/mysql-test/suite/innodb_gis/r/1.result
+++ b/mysql-test/suite/innodb_gis/r/1.result
@@ -1036,9 +1036,9 @@ SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000
SET @a=ST_POLYFROMWKB(@a);
create table t1(a polygon NOT NULL)engine=InnoDB;
insert into t1 values (ST_geomfromtext("point(0 1)"));
-ERROR 22007: Incorrect POLYGON value: 'POINT' for column 'a' at row 1
+ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
insert into t1 values (ST_geomfromtext("point(1 0)"));
-ERROR 22007: Incorrect POLYGON value: 'POINT' for column 'a' at row 1
+ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
p
drop table t1;
diff --git a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
index d9febe4b6b6..2253c62bebf 100644
--- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
@@ -464,6 +464,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
ALTER TABLE tab ADD SPATIAL INDEX idx2(c2 ASC);
affected rows: 0
@@ -586,6 +587,7 @@ tab 1 idx5 1 c5 A # 32 NULL SPATIAL testing spatial index on Geometry
tab 1 idx6 1 c4 A # 10 NULL BTREE
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))');
SET @g2 = ST_GeomFromText('LINESTRING(140 140,150 150,160 160)');
@@ -605,6 +607,7 @@ AND MBREquals(tab.c3,@g2) ORDER BY c1;
c1 ST_Astext(c2) ST_AsText(c3) ST_Astext(c4)
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText('POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010))');
SET @g2 = ST_GeomFromText('LINESTRING(1 1,2 2,3 3)');
@@ -644,6 +647,7 @@ tab 1 idx5 1 c5 A # 32 NULL SPATIAL testing spatial index on Geometry
tab 1 idx6 1 c4 A # 10 NULL BTREE
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))');
SET @g2 = ST_GeomFromText('LINESTRING(1 1,2 2,3 3)');
@@ -678,6 +682,7 @@ ALTER TABLE tab ENGINE Myisam;
ALTER TABLE tab ENGINE InnoDB;
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText('POLYGON((1010 1010,1020 1020,1030 1030,1040 1030,1020 1010,1010 1010))');
SET @g2 = ST_GeomFromText('LINESTRING(400 400,500 500,600 700)');
@@ -789,13 +794,13 @@ DROP TABLE t1;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1)))) ENGINE=innodb;
set timestamp=10;
insert into t1 values(default);
-ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column 'p' at row 1
+ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
drop table t1;
SET timestamp=default;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1)))) ENGINE=innodb;
set timestamp=10;
alter table t1 add column i int;
-ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column 'p' at row 1
+ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`(temporary)`.`p` at row 1
drop table t1;
SET timestamp=default;
CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb_gis/r/create_spatial_index.result b/mysql-test/suite/innodb_gis/r/create_spatial_index.result
index 1af03c251bf..c69d67c411f 100644
--- a/mysql-test/suite/innodb_gis/r/create_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/create_spatial_index.result
@@ -55,6 +55,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
@@ -483,6 +484,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
@@ -900,6 +902,7 @@ ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010
ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'));
ANALYZE TABLE tab;
Table Op Msg_type Msg_text
+test.tab analyze status Engine-independent statistics collected
test.tab analyze status OK
SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))');
EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1;
diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result
index 5d825561bf3..65d1e940cd3 100644
--- a/mysql-test/suite/innodb_gis/r/gis.result
+++ b/mysql-test/suite/innodb_gis/r/gis.result
@@ -1032,9 +1032,9 @@ SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000
SET @a=ST_POLYFROMWKB(@a);
create table t1(a polygon NOT NULL)engine=innodb;
insert into t1 values (ST_geomfromtext("point(0 1)"));
-ERROR 22007: Incorrect POLYGON value: 'POINT' for column 'a' at row 1
+ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
insert into t1 values (ST_geomfromtext("point(1 0)"));
-ERROR 22007: Incorrect POLYGON value: 'POINT' for column 'a' at row 1
+ERROR 22007: Incorrect POLYGON value: 'POINT' for column `test`.`t1`.`a` at row 1
select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
p
drop table t1;
diff --git a/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result b/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result
index 5d4708dd111..2ef8757339e 100644
--- a/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result
+++ b/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result
@@ -744,6 +744,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/innodb_gis/r/rt_precise.result b/mysql-test/suite/innodb_gis/r/rt_precise.result
index 9e2c6adc2d9..c83b88b568c 100644
--- a/mysql-test/suite/innodb_gis/r/rt_precise.result
+++ b/mysql-test/suite/innodb_gis/r/rt_precise.result
@@ -18,6 +18,7 @@ count(*)
150
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 140))'));
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/suite/innodb_gis/r/rtree.result b/mysql-test/suite/innodb_gis/r/rtree.result
index d6604314909..53719f12205 100644
--- a/mysql-test/suite/innodb_gis/r/rtree.result
+++ b/mysql-test/suite/innodb_gis/r/rtree.result
@@ -6,6 +6,7 @@ insert into t1 values (1, POINT(3.1,3.1));
insert into t1 values (1, POINT(5,5));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
@@ -150,6 +151,7 @@ insert into t1 values (4, "444", POINT(3.1,3.1));
insert into t1 values (5, "555", POINT(5,5));
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1);
diff --git a/mysql-test/suite/innodb_gis/r/rtree_estimate.result b/mysql-test/suite/innodb_gis/r/rtree_estimate.result
index 251685df018..dafcc40aba8 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_estimate.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_estimate.result
@@ -20,6 +20,7 @@ POLYGON((5 5,20 5,20 21,5 21,5 5))
POLYGON((1.79769e308 1.79769e308,20 5,-1.79769e308 -1.79769e308,1.79769e308 1.79769e308))
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g1);
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result
index 0da1d6bbe85..e0a454b75a4 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-zip.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result
@@ -121,9 +121,13 @@ disconnect a;
disconnect b;
analyze table t1;
Table Op Msg_type Msg_text
+mysqltest_innodb_zip.t1 analyze status Engine-independent statistics collected
+mysqltest_innodb_zip.t1 analyze Warning Engine-independent statistics are not collected for column 'b'
mysqltest_innodb_zip.t1 analyze status OK
analyze table t2;
Table Op Msg_type Msg_text
+mysqltest_innodb_zip.t2 analyze status Engine-independent statistics collected
+mysqltest_innodb_zip.t2 analyze Warning Engine-independent statistics are not collected for column 'b'
mysqltest_innodb_zip.t2 analyze status OK
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql' order by table_name;
table_schema table_name row_format data_length index_length
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 394a2ea1f09..b3a4ad2b0ba 100644
--- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
+++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result
@@ -107,12 +107,6 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-unlink: t1.ibd
-unlink: t1.cfg
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (
c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test
index 63a4b418677..fec8acf52c4 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum.test
@@ -79,18 +79,22 @@ let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --
--echo [9]: check the innochecksum with full form --strict-check=innodb
# Server Default checksum = crc32
+--error 1
--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [10]: check the innochecksum with full form --strict-check=none
--echo # when server Default checksum=crc32
+--error 1
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [11]: check the innochecksum with short form -C innodb
--echo # when server Default checksum=crc32
+--error 1
--exec $INNOCHECKSUM -C innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [12]: check the innochecksum with short form -C none
--echo # when server Default checksum=crc32
+--error 1
--exec $INNOCHECKSUM -C none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
--echo [13]: check strict-check with invalid values
diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
index 986c0508891..c81eca69db8 100644
--- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
+++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
@@ -282,20 +282,6 @@ do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl";
ib_restore_tablespaces("test_wl5522", "t1");
EOF
-# Test failure after importing the cluster index
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-
---error ER_NOT_KEYFILE
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-
-SET SESSION debug_dbug=@saved_debug_dbug;
-
-# Left over from the failed IMPORT
-perl;
-do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl";
-ib_unlink_tablespace("test_wl5522", "t1");
-EOF
-
DROP TABLE test_wl5522.t1;
--disable_query_log
diff --git a/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result b/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
index ad704c0c683..5f3ad54662b 100644
--- a/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
+++ b/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result
@@ -17,7 +17,11 @@ include/start_slave.inc
include/stop_slave.inc
connection master;
select event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time desc limit 1 into @ts_last;
+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 event_time from (select event_time from mysql.general_log as t_1 where command_type like 'Connect' order by event_time desc limit 2) as t_2 order by event_time asc limit 1 into @ts_prev;
+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
include/assert.inc [time between last reconnection and the reconnection before that should be >= slave_net_timeout]
connection master;
set @@global.general_log = @save_general_log;
diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result
index d22e705e6de..8fc93e861a7 100644
--- a/mysql-test/suite/maria/icp.result
+++ b/mysql-test/suite/maria/icp.result
@@ -851,7 +851,7 @@ DROP TABLE t1;
create table t1 (a int,b char(5),primary key (a), key (b(1)));
insert ignore into t1 values ('a','b');
Warnings:
-Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`a` at row 1
select 1 from t1 where a and b >= 'aa';
1
drop table t1;
diff --git a/mysql-test/suite/maria/maria-autozerofill.result b/mysql-test/suite/maria/maria-autozerofill.result
index 76ccc67ebb5..064ac9e6496 100644
--- a/mysql-test/suite/maria/maria-autozerofill.result
+++ b/mysql-test/suite/maria/maria-autozerofill.result
@@ -56,6 +56,7 @@ mysqltest.t3 optimize Note Zerofilling moved table ./mysqltest/t3
mysqltest.t3 optimize status OK
analyze table t4;
Table Op Msg_type Msg_text
+mysqltest.t4 analyze status Engine-independent statistics collected
mysqltest.t4 analyze Note Zerofilling moved table ./mysqltest/t4
mysqltest.t4 analyze status OK
repair table t5;
diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
index 8bea5edb6fb..2f8c1b9408c 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
@@ -749,6 +749,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result
index 4a2f97fbd41..1c0d9e756a4 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result
@@ -749,6 +749,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result
index 901a7bee397..e39430a2efb 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.result
+++ b/mysql-test/suite/maria/maria-gis-rtree.result
@@ -749,6 +749,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
CREATE TABLE t1 (
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result
index 83210676ed8..76b14024bf4 100644
--- a/mysql-test/suite/maria/maria.result
+++ b/mysql-test/suite/maria/maria.result
@@ -739,6 +739,7 @@ insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -759,6 +760,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -770,7 +772,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t1 1 a 1 a A 5 NULL NULL YES BTREE
+t1 1 a 1 a A 10 NULL NULL YES BTREE
set aria_stats_method=DEFAULT;
show variables like 'aria_stats_method';
Variable_name Value
@@ -779,6 +781,7 @@ insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -806,6 +809,7 @@ insert into t1 values ('bce','def1', 'yuu', NULL);
insert into t1 values ('bce','def2', NULL, 'quux');
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -816,6 +820,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE
delete from t1;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -1690,9 +1695,11 @@ create table t1 (a int, key(a));
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 1fd49df00e1..ba8b64f9514 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -209,11 +209,13 @@ create table t2 like t1;
insert into t2 select * from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
delete from t2;
insert into t2 select * from t1;
analyze table t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status Table is already up to date
drop table t1,t2;
create table t1 (a bigint auto_increment, primary key(a), b char(255), c varchar(20000));
diff --git a/mysql-test/suite/maria/system_tables.result b/mysql-test/suite/maria/system_tables.result
index 32fddf6127e..c9944482638 100644
--- a/mysql-test/suite/maria/system_tables.result
+++ b/mysql-test/suite/maria/system_tables.result
@@ -3,6 +3,7 @@ LOCK TABLE t1 WRITE;
connect con1,localhost,root,,test;
SET lock_wait_timeout= 2;
FLUSH TABLES;
+FLUSH TABLES t1;
connection default;
CALL non_existing_sp;
ERROR 42000: PROCEDURE test.non_existing_sp does not exist
diff --git a/mysql-test/suite/maria/system_tables.test b/mysql-test/suite/maria/system_tables.test
index 7b5c20ded85..950989fa5ca 100644
--- a/mysql-test/suite/maria/system_tables.test
+++ b/mysql-test/suite/maria/system_tables.test
@@ -12,8 +12,8 @@ LOCK TABLE t1 WRITE;
--connect (con1,localhost,root,,test)
SET lock_wait_timeout= 2;
---send
- FLUSH TABLES;
+FLUSH TABLES;
+--send FLUSH TABLES t1
--connection default
--error ER_SP_DOES_NOT_EXIST
CALL non_existing_sp;
diff --git a/mysql-test/suite/mariabackup/backup_grants.result b/mysql-test/suite/mariabackup/backup_grants.result
new file mode 100644
index 00000000000..d8869b7ac82
--- /dev/null
+++ b/mysql-test/suite/mariabackup/backup_grants.result
@@ -0,0 +1,5 @@
+CREATE user backup@localhost;
+FOUND 1 /missing required privilege RELOAD/ in backup.log
+FOUND 1 /missing required privilege PROCESS/ in backup.log
+GRANT RELOAD, PROCESS on *.* to backup@localhost;
+DROP USER backup@localhost;
diff --git a/mysql-test/suite/mariabackup/backup_grants.test b/mysql-test/suite/mariabackup/backup_grants.test
new file mode 100644
index 00000000000..1c0c3f89346
--- /dev/null
+++ b/mysql-test/suite/mariabackup/backup_grants.test
@@ -0,0 +1,30 @@
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+CREATE user backup@localhost;
+
+# backup possible for unprivileges user, with --no-lock
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --no-lock --target-dir=$targetdir;
+--enable_result_log
+rmdir $targetdir;
+
+# backup fails without --no-lock, because of FTWRL
+--disable_result_log
+error 1;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log;
+--enable_result_log
+
+let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log;
+--let SEARCH_PATTERN= missing required privilege RELOAD
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= missing required privilege PROCESS
+--source include/search_pattern_in_file.inc
+
+# backup succeeds with RELOAD privilege
+GRANT RELOAD, PROCESS on *.* to backup@localhost;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --target-dir=$targetdir;
+--enable_result_log
+
+DROP USER backup@localhost;
+# Cleanup
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/drop_table_during_backup.result b/mysql-test/suite/mariabackup/drop_table_during_backup.result
index 1472ddbddcf..8a77945e586 100644
--- a/mysql-test/suite/mariabackup/drop_table_during_backup.result
+++ b/mysql-test/suite/mariabackup/drop_table_during_backup.result
@@ -1,6 +1,8 @@
CREATE TABLE t1 (i int) ENGINE=INNODB;
CREATE TABLE t2 (i int) ENGINE=INNODB;
CREATE TABLE t3 (i int) ENGINE=INNODB;
+CREATE TABLE t4 (i int) ENGINE=INNODB;
+CREATE TABLE t5 (i int) ENGINE=INNODB;
# xtrabackup prepare
# shutdown server
# remove datadir
@@ -11,3 +13,6 @@ DROP TABLE t1;
CREATE TABLE t2(i int);
DROP TABLE t2;
DROP TABLE t3;
+CREATE TABLE t4(i int);
+DROP TABLE t4;
+DROP TABLE t5;
diff --git a/mysql-test/suite/mariabackup/drop_table_during_backup.test b/mysql-test/suite/mariabackup/drop_table_during_backup.test
index 02c7710145b..e3a81b77b71 100644
--- a/mysql-test/suite/mariabackup/drop_table_during_backup.test
+++ b/mysql-test/suite/mariabackup/drop_table_during_backup.test
@@ -3,8 +3,14 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
CREATE TABLE t1 (i int) ENGINE=INNODB;
CREATE TABLE t2 (i int) ENGINE=INNODB;
CREATE TABLE t3 (i int) ENGINE=INNODB;
+CREATE TABLE t4 (i int) ENGINE=INNODB;
+CREATE TABLE t5 (i int) ENGINE=INNODB;
+
--let before_copy_test_t1=DROP TABLE test.t1
--let after_copy_test_t2=DROP TABLE test.t2;
+# MDEV-18185, drop + rename combination
+--let after_copy_test_t5=BEGIN NOT ATOMIC DROP TABLE test.t5; RENAME TABLE test.t4 TO test.t5; END
+
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
--enable_result_log
@@ -21,4 +27,7 @@ DROP TABLE t1;
CREATE TABLE t2(i int);
DROP TABLE t2;
DROP TABLE t3;
+CREATE TABLE t4(i int);
+DROP TABLE t4;
+DROP TABLE t5;
rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_compressed.opt b/mysql-test/suite/mariabackup/encrypted_page_compressed.opt
new file mode 100644
index 00000000000..e5a02a1a1c9
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_compressed.opt
@@ -0,0 +1,6 @@
+--innodb-encryption-rotate-key-age=2
+--innodb-encryption-threads=4
+--innodb-tablespaces-encryption
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--loose-file-key-management
+--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt
diff --git a/mysql-test/suite/mariabackup/encrypted_page_compressed.result b/mysql-test/suite/mariabackup/encrypted_page_compressed.result
new file mode 100644
index 00000000000..293addd2b03
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_compressed.result
@@ -0,0 +1,7 @@
+call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
+insert into t1(b, c) values("mariadb", "mariabackup");
+# Corrupt the table
+# xtrabackup backup
+FOUND 1 /Database page corruption detected.*/ in backup.log
+drop table t1;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_compressed.test b/mysql-test/suite/mariabackup/encrypted_page_compressed.test
new file mode 100644
index 00000000000..b4ca7eded14
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_compressed.test
@@ -0,0 +1,48 @@
+source include/have_file_key_management.inc;
+call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
+insert into t1(b, c) values("mariadb", "mariabackup");
+
+let $MYSQLD_DATADIR=`select @@datadir`;
+let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
+let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+
+--source include/shutdown_mysqld.inc
+
+--echo # Corrupt the table
+
+perl;
+use strict;
+use warnings;
+use Fcntl qw(:DEFAULT :seek);
+
+my $ibd_file = $ENV{'t1_IBD'};
+
+my $chunk;
+my $page_size = $ENV{'INNODB_PAGE_SIZE'};
+
+sysopen IBD_FILE, $ibd_file, O_RDWR || die "Unable to open $ibd_file";
+sysseek IBD_FILE, $page_size * 3 + 75, SEEK_CUR;
+$chunk = '\xAA\xAA\xAA\xAA';
+syswrite IBD_FILE, $chunk, 4;
+
+close IBD_FILE;
+EOF
+
+--source include/start_mysqld.inc
+
+echo # xtrabackup backup;
+--disable_result_log
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
+--error 1
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $backuplog;
+--enable_result_log
+
+--let SEARCH_PATTERN=Database page corruption detected.*
+--let SEARCH_FILE=$backuplog
+--source include/search_pattern_in_file.inc
+remove_file $backuplog;
+
+drop table t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.opt b/mysql-test/suite/mariabackup/encrypted_page_corruption.opt
new file mode 100644
index 00000000000..74a6450a1ef
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.opt
@@ -0,0 +1,6 @@
+--innodb-encrypt-log=ON
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--loose-file-key-management
+--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key
+--loose-file-key-management-filename=$MTR_SUITE_DIR/filekeys-data.enc
+--loose-file-key-management-encryption-algorithm=aes_cbc
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.result b/mysql-test/suite/mariabackup/encrypted_page_corruption.result
new file mode 100644
index 00000000000..9a6202a5ea1
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.result
@@ -0,0 +1,8 @@
+call mtr.add_suppression("\\[ERROR\\] InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Table `test`\\.`t1` has an unreadable root page");
+CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB, encrypted=yes;
+insert into t1 select repeat('a',100);
+# Corrupt the table
+# xtrabackup backup
+FOUND 1 /Database page corruption detected.*/ in backup.log
+drop table t1;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.test b/mysql-test/suite/mariabackup/encrypted_page_corruption.test
new file mode 100644
index 00000000000..4491c235ac4
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.test
@@ -0,0 +1,70 @@
+--source include/have_file_key_management.inc
+--source include/innodb_page_size.inc
+
+call mtr.add_suppression("\\[ERROR\\] InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Table `test`\\.`t1` has an unreadable root page");
+CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB, encrypted=yes;
+insert into t1 select repeat('a',100);
+
+let MYSQLD_DATADIR=`select @@datadir`;
+let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+
+--source include/shutdown_mysqld.inc
+
+--echo # Corrupt the table
+
+perl;
+use strict;
+use warnings;
+use Fcntl qw(:DEFAULT :seek);
+do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
+
+my $page_size = $ENV{INNODB_PAGE_SIZE};
+
+sysopen IBD_FILE, "$ENV{MYSQLD_DATADIR}/test/t1.ibd", O_RDWR
+|| die "Cannot open t1.ibd\n";
+sysread(IBD_FILE, $_, 38) || die "Cannot read t1.ibd\n";
+my $space = unpack("x[34]N", $_);
+sysseek(IBD_FILE, $page_size * 3, SEEK_SET) || die "Cannot seek t1.ibd\n";
+
+my $head = pack("Nx[18]", 3); # better to have a valid page number
+my $body = chr(0) x ($page_size - 38 - 8);
+
+# Calculate innodb_checksum_algorithm=crc32 for the unencrypted page.
+# The following bytes are excluded:
+# bytes 0..3 (the checksum is stored there)
+# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id)
+# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN)
+my $polynomial = 0x82f63b78; # CRC-32C
+my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
+
+my $page= pack("N",$ck).$head.pack("NNN",1,$ck,$space).$body.pack("Nx[4]",$ck);
+die unless syswrite(IBD_FILE, $page, $page_size) == $page_size;
+close IBD_FILE;
+EOF
+
+--source include/start_mysqld.inc
+
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
+
+--disable_result_log
+--error 1
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --extended-validation --target-dir=$targetdir > $backuplog;
+--enable_result_log
+
+
+--let SEARCH_PATTERN=Database page corruption detected.*
+--let SEARCH_FILE=$backuplog
+--source include/search_pattern_in_file.inc
+remove_file $backuplog;
+rmdir $targetdir;
+
+# Due to very constructed nature of the "corruption" (faking checksums), the "corruption" won't be found without --extended-validation
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+--enable_result_log
+
+drop table t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/huge_lsn.opt b/mysql-test/suite/mariabackup/huge_lsn.opt
index 74a6450a1ef..c65b76fb7d2 100644
--- a/mysql-test/suite/mariabackup/huge_lsn.opt
+++ b/mysql-test/suite/mariabackup/huge_lsn.opt
@@ -1,4 +1,8 @@
--innodb-encrypt-log=ON
+--innodb-tablespaces-encryption
+--innodb-encrypt-tables=ON
+--innodb-encryption-rotate-key-age=1
+--innodb-encryption-threads=4
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
--loose-file-key-management
--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key
diff --git a/mysql-test/suite/mariabackup/partition_partial.opt b/mysql-test/suite/mariabackup/partition_partial.opt
new file mode 100644
index 00000000000..508cf185695
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partition_partial.opt
@@ -0,0 +1 @@
+--innodb --loose-partition
diff --git a/mysql-test/suite/mariabackup/partition_partial.result b/mysql-test/suite/mariabackup/partition_partial.result
new file mode 100644
index 00000000000..62b7adf75f8
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partition_partial.result
@@ -0,0 +1,31 @@
+CREATE TABLE t1(i INT) ENGINE INNODB
+PARTITION BY RANGE (i)
+(PARTITION p1 VALUES LESS THAN (100),
+PARTITION p2 VALUES LESS THAN (200),
+PARTITION p3 VALUES LESS THAN (300),
+PARTITION p4 VALUES LESS THAN (400));
+INSERT INTO t1 VALUES (1), (101), (201), (301);
+# xtrabackup backup
+INSERT INTO t1 VALUES (1), (101), (201), (301);
+# xtrabackup prepare
+CREATE TABLE t1_placeholder (i INT) ENGINE INNODB;
+ALTER TABLE t1_placeholder DISCARD TABLESPACE;
+ALTER TABLE t1_placeholder IMPORT TABLESPACE;
+ALTER TABLE t1 EXCHANGE PARTITION p4 WITH TABLE t1_placeholder;
+ALTER TABLE t1_placeholder DISCARD TABLESPACE;
+ALTER TABLE t1_placeholder IMPORT TABLESPACE;
+ALTER TABLE t1 EXCHANGE PARTITION p3 WITH TABLE t1_placeholder;
+ALTER TABLE t1_placeholder DISCARD TABLESPACE;
+ALTER TABLE t1_placeholder IMPORT TABLESPACE;
+ALTER TABLE t1 EXCHANGE PARTITION p2 WITH TABLE t1_placeholder;
+ALTER TABLE t1_placeholder DISCARD TABLESPACE;
+ALTER TABLE t1_placeholder IMPORT TABLESPACE;
+ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t1_placeholder;
+SELECT * FROM t1;
+i
+1
+101
+201
+301
+DROP TABLE t1;
+DROP TABLE t1_placeholder;
diff --git a/mysql-test/suite/mariabackup/partition_partial.test b/mysql-test/suite/mariabackup/partition_partial.test
new file mode 100644
index 00000000000..8e288ec997f
--- /dev/null
+++ b/mysql-test/suite/mariabackup/partition_partial.test
@@ -0,0 +1,44 @@
+#--source include/innodb_page_size.inc
+
+# import partitioned table from table from partial backup
+
+CREATE TABLE t1(i INT) ENGINE INNODB
+PARTITION BY RANGE (i)
+(PARTITION p1 VALUES LESS THAN (100),
+ PARTITION p2 VALUES LESS THAN (200),
+ PARTITION p3 VALUES LESS THAN (300),
+ PARTITION p4 VALUES LESS THAN (400));
+
+INSERT INTO t1 VALUES (1), (101), (201), (301);
+
+echo # xtrabackup backup;
+
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.t1" --target-dir=$targetdir;
+--enable_result_log
+INSERT INTO t1 VALUES (1), (101), (201), (301);
+
+
+echo # xtrabackup prepare;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir;
+--enable_result_log
+
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+CREATE TABLE t1_placeholder (i INT) ENGINE INNODB;
+let $i=4;
+while($i)
+{
+ eval ALTER TABLE t1_placeholder DISCARD TABLESPACE;
+ copy_file $targetdir/test/t1#P#p$i.cfg $MYSQLD_DATADIR/test/t1_placeholder.cfg;
+ copy_file $targetdir/test/t1#P#p$i.ibd $MYSQLD_DATADIR/test/t1_placeholder.ibd;
+ eval ALTER TABLE t1_placeholder IMPORT TABLESPACE;
+ eval ALTER TABLE t1 EXCHANGE PARTITION p$i WITH TABLE t1_placeholder;
+ dec $i;
+}
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP TABLE t1_placeholder;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/rename_during_backup.result b/mysql-test/suite/mariabackup/rename_during_backup.result
index 6e8f365f643..a4cf06b7633 100644
--- a/mysql-test/suite/mariabackup/rename_during_backup.result
+++ b/mysql-test/suite/mariabackup/rename_during_backup.result
@@ -4,6 +4,8 @@ CREATE TABLE t2(i int) ENGINE INNODB;
INSERT INTO t2 values(2);
CREATE TABLE t3(i int) ENGINE INNODB;
CREATE TABLE t4(i int) ENGINE INNODB;
+CREATE TABLE t5(i int) ENGINE INNODB;
+INSERT INTO t5 VALUES(5);
CREATE TABLE a(a int) ENGINE INNODB;
INSERT INTO a values(1);
CREATE TABLE b(b CHAR(1)) ENGINE INNODB;
@@ -51,3 +53,10 @@ SELECT * FROM b1;
a1
1
DROP TABLE a,b,a1,b1;
+SELECT * from t5;
+i
+DROP TABLE t5;
+SELECT * from t6;
+i
+5
+DROP TABLE t6;
diff --git a/mysql-test/suite/mariabackup/rename_during_backup.test b/mysql-test/suite/mariabackup/rename_during_backup.test
index f176af1451b..238a8b1985c 100644
--- a/mysql-test/suite/mariabackup/rename_during_backup.test
+++ b/mysql-test/suite/mariabackup/rename_during_backup.test
@@ -10,6 +10,8 @@ INSERT INTO t2 values(2);
CREATE TABLE t3(i int) ENGINE INNODB;
CREATE TABLE t4(i int) ENGINE INNODB;
+CREATE TABLE t5(i int) ENGINE INNODB;
+INSERT INTO t5 VALUES(5);
CREATE TABLE a(a int) ENGINE INNODB;
INSERT INTO a values(1);
@@ -28,6 +30,7 @@ INSERT INTO b1 VALUES('b1');
--let after_copy_test_t3=BEGIN NOT ATOMIC RENAME TABLE test.t3 TO test.t3_tmp; INSERT INTO test.t3_tmp VALUES(3); RENAME TABLE test.t3_tmp TO test.t3; END
--let before_copy_test_t4=RENAME TABLE test.t4 TO test.t4_tmp
--let after_copy_test_t4=RENAME TABLE test.t4_tmp TO test.t4
+--let after_copy_test_t5=BEGIN NOT ATOMIC RENAME TABLE test.t5 TO test.t6; CREATE TABLE test.t5(i int) ENGINE INNODB; END
# Test circular renames
--let before_copy_test_b=RENAME TABLE test.a to test.tmp, test.b to test.a, test.tmp to test.b
@@ -81,6 +84,10 @@ SELECT * FROM a1;
SELECT * FROM b1;
DROP TABLE a,b,a1,b1;
+SELECT * from t5;
+DROP TABLE t5;
+SELECT * from t6;
+DROP TABLE t6;
rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/unencrypted_page_compressed.result b/mysql-test/suite/mariabackup/unencrypted_page_compressed.result
new file mode 100644
index 00000000000..71eac085769
--- /dev/null
+++ b/mysql-test/suite/mariabackup/unencrypted_page_compressed.result
@@ -0,0 +1,11 @@
+call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes;
+insert into t1(b, c) values("mariadb", "mariabackup");
+InnoDB 0 transactions not purged
+# Corrupt the table
+# xtrabackup backup
+FOUND 1 /Database page corruption detected.*/ in backup.log
+drop table t1;
+Warnings:
+Warning 192 Table test/t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
diff --git a/mysql-test/suite/mariabackup/unencrypted_page_compressed.test b/mysql-test/suite/mariabackup/unencrypted_page_compressed.test
new file mode 100644
index 00000000000..b41d177e572
--- /dev/null
+++ b/mysql-test/suite/mariabackup/unencrypted_page_compressed.test
@@ -0,0 +1,50 @@
+call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
+SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes;
+insert into t1(b, c) values("mariadb", "mariabackup");
+--source ../innodb/include/wait_all_purged.inc
+
+let $MYSQLD_DATADIR=`select @@datadir`;
+let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
+let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+
+--source include/shutdown_mysqld.inc
+
+--echo # Corrupt the table
+
+perl;
+use strict;
+use warnings;
+use Fcntl qw(:DEFAULT :seek);
+
+my $ibd_file = $ENV{'t1_IBD'};
+
+my $chunk;
+my $page_size = $ENV{'INNODB_PAGE_SIZE'};
+
+sysopen IBD_FILE, $ibd_file, O_RDWR || die "Unable to open $ibd_file";
+sysseek IBD_FILE, 16384 * 3 + 75, SEEK_CUR;
+$chunk = '\xAA\xAA\xAA\xAA';
+syswrite IBD_FILE, $chunk, 4;
+
+close IBD_FILE;
+EOF
+
+--let $restart_parameters= --skip-innodb-buffer-pool-load-at-startup
+--source include/start_mysqld.inc
+
+echo # xtrabackup backup;
+--disable_result_log
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
+--error 1
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $backuplog;
+--enable_result_log
+
+--let SEARCH_PATTERN=Database page corruption detected.*
+--let SEARCH_FILE=$backuplog
+--source include/search_pattern_in_file.inc
+remove_file $backuplog;
+
+drop table t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.result b/mysql-test/suite/mariabackup/xb_aws_key_management.result
index 6efc76a8be3..ccad423f631 100644
--- a/mysql-test/suite/mariabackup/xb_aws_key_management.result
+++ b/mysql-test/suite/mariabackup/xb_aws_key_management.result
@@ -1,7 +1,4 @@
CREATE TABLE t(c VARCHAR(10)) ENGINE INNODB encrypted=yes;
-Warnings:
-Note 1105 AWS KMS plugin: generated encrypted datakey for key id=1, version=1
-Note 1105 AWS KMS plugin: loaded key 1, version 1, key length 128 bit
INSERT INTO t VALUES('foobar1');
# xtrabackup backup
# shutdown server
@@ -11,6 +8,4 @@ INSERT INTO t VALUES('foobar1');
SELECT * from t;
c
foobar1
-Warnings:
-Note 1105 AWS KMS plugin: loaded key 1, version 1, key length 128 bit
DROP TABLE t;
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
index 5f3610b7999..0e8db677cdf 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
@@ -517,6 +517,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1009,6 +1010,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1516,6 +1518,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2017,6 +2020,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2516,6 +2520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3026,6 +3031,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3538,6 +3544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4038,6 +4045,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4531,6 +4539,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5023,6 +5032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5530,6 +5540,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6031,6 +6042,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6530,6 +6542,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7040,6 +7053,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7552,6 +7566,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8052,6 +8067,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8562,6 +8578,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9070,6 +9087,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9593,6 +9611,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10110,6 +10129,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10625,6 +10645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11151,6 +11172,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11679,6 +11701,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12195,6 +12218,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12704,6 +12728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13212,6 +13237,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13735,6 +13761,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14252,6 +14279,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14767,6 +14795,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15293,6 +15322,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15821,6 +15851,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16337,6 +16368,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16832,6 +16864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17325,6 +17358,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17833,6 +17867,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18335,6 +18370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18835,6 +18871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19346,6 +19383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19859,6 +19897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20360,6 +20399,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20854,6 +20894,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21347,6 +21388,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21855,6 +21897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22357,6 +22400,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22857,6 +22901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23368,6 +23413,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23881,6 +23927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24382,6 +24429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24876,6 +24924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25369,6 +25418,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25877,6 +25927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26379,6 +26430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26879,6 +26931,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27390,6 +27443,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27903,6 +27957,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28404,6 +28459,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
index ce3dd51496e..0f12c15e4e9 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
@@ -543,6 +543,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1066,6 +1067,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1610,6 +1612,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2144,6 +2147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2680,6 +2684,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3227,6 +3232,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3776,6 +3782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4315,6 +4322,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4833,6 +4841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5356,6 +5365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5900,6 +5910,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6434,6 +6445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6970,6 +6982,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7517,6 +7530,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8066,6 +8080,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8605,6 +8620,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
index 12f028782ed..919e6344615 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
@@ -835,6 +835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1327,6 +1328,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1834,6 +1836,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2335,6 +2338,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2836,6 +2840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3346,6 +3351,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3858,6 +3864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4358,6 +4365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4851,6 +4859,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5343,6 +5352,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5850,6 +5860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6351,6 +6362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6852,6 +6864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7362,6 +7375,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7874,6 +7888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8374,6 +8389,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8884,6 +8900,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9392,6 +9409,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9915,6 +9933,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10432,6 +10451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10949,6 +10969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11475,6 +11496,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12003,6 +12025,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12519,6 +12542,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13028,6 +13052,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13536,6 +13561,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14059,6 +14085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14576,6 +14603,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15093,6 +15121,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15619,6 +15648,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16147,6 +16177,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16663,6 +16694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
index a276e1593ee..05176399246 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
@@ -702,6 +702,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1225,6 +1226,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1769,6 +1771,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2303,6 +2306,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2841,6 +2845,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3388,6 +3393,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3937,6 +3943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4476,6 +4483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4994,6 +5002,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5517,6 +5526,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6061,6 +6071,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6595,6 +6606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7133,6 +7145,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7680,6 +7693,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8229,6 +8243,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8768,6 +8783,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
index 36823665fa1..3f720024f72 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
@@ -464,6 +464,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -904,6 +905,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1359,6 +1361,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1808,6 +1811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2257,6 +2261,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2715,6 +2720,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3175,6 +3181,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3623,6 +3630,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4064,6 +4072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4504,6 +4513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5408,6 +5419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5857,6 +5869,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6315,6 +6328,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6775,6 +6789,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7223,6 +7238,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7680,6 +7696,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8136,6 +8153,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8607,6 +8625,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9072,6 +9091,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9537,6 +9557,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10011,6 +10032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10487,6 +10509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10951,6 +10974,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11396,6 +11420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11836,6 +11861,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12291,6 +12317,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12740,6 +12767,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13187,6 +13215,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13645,6 +13674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14105,6 +14135,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14553,6 +14584,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14994,6 +15026,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15434,6 +15467,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15889,6 +15923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16338,6 +16373,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16785,6 +16821,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17243,6 +17280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17703,6 +17741,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18151,6 +18190,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18609,6 +18649,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19065,6 +19106,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19536,6 +19578,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20001,6 +20044,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20464,6 +20508,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20938,6 +20983,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21414,6 +21460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21878,6 +21925,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22335,6 +22383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22791,6 +22840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23262,6 +23312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23727,6 +23778,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24190,6 +24242,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24664,6 +24717,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25140,6 +25194,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25604,6 +25659,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26046,6 +26102,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26486,6 +26543,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26941,6 +26999,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27390,6 +27449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27837,6 +27897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28295,6 +28356,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28755,6 +28817,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29203,6 +29266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29644,6 +29708,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30084,6 +30149,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30539,6 +30605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30988,6 +31055,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31435,6 +31503,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31893,6 +31962,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32353,6 +32423,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32801,6 +32872,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33258,6 +33330,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33714,6 +33787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34185,6 +34259,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34650,6 +34725,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35113,6 +35189,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35587,6 +35664,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36063,6 +36141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36527,6 +36606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
index b4e1ddc577b..ba6a7e7fbbd 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
@@ -489,6 +489,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -960,6 +961,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1452,6 +1454,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1934,6 +1937,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2420,6 +2424,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2915,6 +2920,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3412,6 +3418,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3899,6 +3906,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4369,6 +4377,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4840,6 +4849,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5332,6 +5342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5814,6 +5825,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6298,6 +6310,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6793,6 +6806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7290,6 +7304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7777,6 +7792,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8243,6 +8259,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8714,6 +8731,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9206,6 +9224,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9688,6 +9707,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10172,6 +10192,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10667,6 +10688,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11164,6 +11186,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11651,6 +11674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12117,6 +12141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12588,6 +12613,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13080,6 +13106,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13562,6 +13589,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14046,6 +14074,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14541,6 +14570,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15038,6 +15068,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15525,6 +15556,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
index 586b24e4049..ff7d659613d 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
@@ -481,6 +481,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -937,6 +938,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1408,6 +1410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1873,6 +1876,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2338,6 +2342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2812,6 +2817,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3288,6 +3294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3752,6 +3759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4248,6 +4256,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4742,6 +4751,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5251,6 +5261,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5754,6 +5765,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6257,6 +6269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6769,6 +6782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7283,6 +7297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7785,6 +7800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8280,6 +8296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8774,6 +8791,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9283,6 +9301,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9786,6 +9805,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10289,6 +10309,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10801,6 +10822,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11315,6 +11337,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11817,6 +11840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12327,6 +12351,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12835,6 +12860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13358,6 +13384,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13875,6 +13902,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14392,6 +14420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14918,6 +14947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15446,6 +15476,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15962,6 +15993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16471,6 +16503,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16979,6 +17012,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17502,6 +17536,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18019,6 +18054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18536,6 +18572,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19062,6 +19099,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19590,6 +19628,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20106,6 +20145,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
index 5a71f1063f5..a537b74201d 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
@@ -477,6 +477,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -933,6 +934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1404,6 +1406,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1869,6 +1872,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2332,6 +2336,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2806,6 +2811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3282,6 +3288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3746,6 +3753,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4243,6 +4251,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4738,6 +4747,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5248,6 +5258,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5752,6 +5763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6254,6 +6266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6767,6 +6780,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7282,6 +7296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7785,6 +7800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8281,6 +8297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8776,6 +8793,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9286,6 +9304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9790,6 +9809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10292,6 +10312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10805,6 +10826,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11320,6 +11342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11823,6 +11846,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12333,6 +12357,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12841,6 +12866,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13364,6 +13390,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13881,6 +13908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14396,6 +14424,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14922,6 +14951,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15450,6 +15480,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15966,6 +15997,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16475,6 +16507,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16983,6 +17016,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17506,6 +17540,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18023,6 +18058,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18538,6 +18574,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19064,6 +19101,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19592,6 +19630,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20108,6 +20147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_maria.result b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
index 7196be3a602..0af69f09639 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
@@ -491,6 +491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -962,6 +963,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1454,6 +1456,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1936,6 +1939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2422,6 +2426,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2917,6 +2922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3414,6 +3420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3901,6 +3908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4420,6 +4428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4943,6 +4952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5487,6 +5497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6021,6 +6032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6559,6 +6571,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7106,6 +7119,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7655,6 +7669,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8194,6 +8209,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8712,6 +8728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9235,6 +9252,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9779,6 +9797,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10313,6 +10332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10851,6 +10871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11398,6 +11419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11947,6 +11969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12486,6 +12509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12957,6 +12981,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13428,6 +13453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13920,6 +13946,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14402,6 +14429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14886,6 +14914,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15381,6 +15410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15878,6 +15908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16365,6 +16396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16884,6 +16916,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17407,6 +17440,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17951,6 +17985,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18485,6 +18520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19021,6 +19057,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19568,6 +19605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20117,6 +20155,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20656,6 +20695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21174,6 +21214,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21697,6 +21738,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22241,6 +22283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22775,6 +22818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23311,6 +23355,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23858,6 +23903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24407,6 +24453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24946,6 +24993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
index 59039b97f65..60cb5a2e733 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
@@ -491,6 +491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -962,6 +963,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1454,6 +1456,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1936,6 +1939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2422,6 +2426,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2917,6 +2922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3414,6 +3420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3901,6 +3908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4420,6 +4428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4943,6 +4952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5487,6 +5497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6021,6 +6032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6559,6 +6571,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7106,6 +7119,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7655,6 +7669,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8194,6 +8209,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8712,6 +8728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9235,6 +9252,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9779,6 +9797,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10313,6 +10332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10851,6 +10871,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11398,6 +11419,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11947,6 +11969,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12486,6 +12509,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12957,6 +12981,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13428,6 +13453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13920,6 +13946,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14402,6 +14429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14886,6 +14914,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15381,6 +15410,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15878,6 +15908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16365,6 +16396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16884,6 +16916,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17407,6 +17440,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17951,6 +17985,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18485,6 +18520,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19021,6 +19057,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19568,6 +19605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20117,6 +20155,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20656,6 +20695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21174,6 +21214,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21697,6 +21738,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22241,6 +22283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22775,6 +22818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23311,6 +23355,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23858,6 +23903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24407,6 +24453,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24946,6 +24993,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
index 1d90f8f6368..d0d4e1602fd 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
@@ -483,6 +483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -941,6 +942,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1414,6 +1416,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1879,6 +1882,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2346,6 +2350,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2820,6 +2825,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3298,6 +3304,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3764,6 +3771,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4261,6 +4269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4757,6 +4766,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5268,6 +5278,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5771,6 +5782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6276,6 +6288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6788,6 +6801,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7304,6 +7318,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7808,6 +7823,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8305,6 +8321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8801,6 +8818,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9312,6 +9330,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9815,6 +9834,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10320,6 +10340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10832,6 +10853,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11348,6 +11370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11852,6 +11875,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12364,6 +12388,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12874,6 +12899,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13399,6 +13425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13916,6 +13943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14435,6 +14463,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14961,6 +14990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15491,6 +15521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16009,6 +16040,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16520,6 +16552,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17030,6 +17063,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17555,6 +17589,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18072,6 +18107,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18591,6 +18627,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19117,6 +19154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19647,6 +19685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20165,6 +20204,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
index 4b0a481340f..4332588fda7 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
@@ -479,6 +479,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -938,6 +939,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1412,6 +1414,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1882,6 +1885,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2350,6 +2354,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2829,6 +2834,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3308,6 +3314,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3775,6 +3782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4275,6 +4283,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4773,6 +4782,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5286,6 +5296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5795,6 +5806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6302,6 +6314,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6820,6 +6833,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7338,6 +7352,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7844,6 +7859,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8343,6 +8359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8841,6 +8858,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9354,6 +9372,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9863,6 +9882,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10370,6 +10390,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10888,6 +10909,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11406,6 +11428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11912,6 +11935,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12425,6 +12449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12936,6 +12961,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13462,6 +13488,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13984,6 +14011,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14504,6 +14532,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15035,6 +15064,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15566,6 +15596,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16085,6 +16116,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16597,6 +16629,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17108,6 +17141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17634,6 +17668,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18156,6 +18191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18676,6 +18712,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19207,6 +19244,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19738,6 +19776,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20257,6 +20296,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_maria.result b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
index 66d5770e20e..9cc64b8239b 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
@@ -493,6 +493,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -966,6 +967,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1462,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1942,6 +1945,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2430,6 +2434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2925,6 +2930,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3424,6 +3430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3913,6 +3920,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4434,6 +4442,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5505,6 +5515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6039,6 +6050,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6579,6 +6591,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7126,6 +7139,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7677,6 +7691,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8218,6 +8233,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8738,6 +8754,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9263,6 +9280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9809,6 +9827,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10343,6 +10362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10883,6 +10903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11430,6 +11451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11981,6 +12003,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12522,6 +12545,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12995,6 +13019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13469,6 +13494,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13964,6 +13990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14451,6 +14478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14940,6 +14968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15440,6 +15469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15940,6 +15970,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16430,6 +16461,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16952,6 +16984,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17478,6 +17511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18025,6 +18059,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18564,6 +18599,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19105,6 +19141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19657,6 +19694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20209,6 +20247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20751,6 +20790,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21272,6 +21312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21798,6 +21839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22345,6 +22387,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22884,6 +22927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23425,6 +23469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23977,6 +24022,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24529,6 +24575,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25071,6 +25118,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
index 69548fdb94b..32a840c1577 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
@@ -493,6 +493,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -966,6 +967,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1462,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1942,6 +1945,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2430,6 +2434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2925,6 +2930,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3424,6 +3430,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3913,6 +3920,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4434,6 +4442,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4959,6 +4968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5505,6 +5515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6039,6 +6050,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6579,6 +6591,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7126,6 +7139,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7677,6 +7691,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8218,6 +8233,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8738,6 +8754,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9263,6 +9280,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9809,6 +9827,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10343,6 +10362,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10883,6 +10903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11430,6 +11451,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11981,6 +12003,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12522,6 +12545,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12995,6 +13019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13469,6 +13494,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13964,6 +13990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14451,6 +14478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14940,6 +14968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15440,6 +15469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15940,6 +15970,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16430,6 +16461,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16952,6 +16984,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17478,6 +17511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18025,6 +18059,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18564,6 +18599,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19105,6 +19141,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19657,6 +19694,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20209,6 +20247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20751,6 +20790,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21272,6 +21312,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21798,6 +21839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22345,6 +22387,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22884,6 +22927,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23425,6 +23469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23977,6 +24022,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24529,6 +24575,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25071,6 +25118,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index 644a5f32f84..d88bdfcbe00 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -60,6 +60,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -483,6 +484,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -519,6 +521,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -945,6 +948,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -989,6 +993,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1418,6 +1423,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1460,6 +1466,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1885,6 +1892,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1925,6 +1933,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2352,6 +2361,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2396,6 +2406,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2828,6 +2839,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2872,6 +2884,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3306,6 +3319,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3346,6 +3360,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3772,6 +3787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3810,6 +3826,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4233,6 +4250,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4269,6 +4287,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4695,6 +4714,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4739,6 +4759,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5168,6 +5189,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5210,6 +5232,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5635,6 +5658,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5675,6 +5699,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6102,6 +6127,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6146,6 +6172,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6578,6 +6605,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6622,6 +6650,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7056,6 +7085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7096,6 +7126,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7522,6 +7553,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7983,6 +8015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8445,6 +8478,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8918,6 +8952,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9385,6 +9420,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9852,6 +9888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10328,6 +10365,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10806,6 +10844,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11272,6 +11311,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11733,6 +11773,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12195,6 +12236,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12668,6 +12710,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13135,6 +13178,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13602,6 +13646,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14078,6 +14123,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14556,6 +14602,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15022,6 +15069,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15060,6 +15108,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15483,6 +15532,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15519,6 +15569,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15945,6 +15996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15989,6 +16041,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16418,6 +16471,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16460,6 +16514,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16885,6 +16940,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16925,6 +16981,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17352,6 +17409,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17396,6 +17454,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17828,6 +17887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17872,6 +17932,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18306,6 +18367,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18346,6 +18408,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18772,6 +18835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19236,6 +19300,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19698,6 +19763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20171,6 +20237,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20638,6 +20705,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21105,6 +21173,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21581,6 +21650,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22059,6 +22129,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22525,6 +22596,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22986,6 +23058,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23448,6 +23521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23921,6 +23995,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24388,6 +24463,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24855,6 +24931,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25331,6 +25408,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25809,6 +25887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26275,6 +26354,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26736,6 +26816,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27198,6 +27279,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27671,6 +27753,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28138,6 +28221,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28605,6 +28689,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29081,6 +29166,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29559,6 +29645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30025,6 +30112,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30486,6 +30574,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30948,6 +31037,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31421,6 +31511,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31888,6 +31979,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32355,6 +32447,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32831,6 +32924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33309,6 +33403,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33775,6 +33870,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34236,6 +34332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34698,6 +34795,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35171,6 +35269,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35638,6 +35737,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36105,6 +36205,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36581,6 +36682,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37059,6 +37161,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37525,6 +37628,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37990,6 +38094,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38453,6 +38558,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38927,6 +39033,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39395,6 +39502,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39863,6 +39971,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40340,6 +40449,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40819,6 +40929,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41286,6 +41397,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41748,6 +41860,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42211,6 +42324,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42685,6 +42799,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43153,6 +43268,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43621,6 +43737,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44098,6 +44215,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44577,6 +44695,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45044,6 +45163,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45505,6 +45625,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45967,6 +46088,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46440,6 +46562,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46907,6 +47030,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47374,6 +47498,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47850,6 +47975,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48328,6 +48454,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48794,6 +48921,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49255,6 +49383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49717,6 +49846,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50190,6 +50320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50657,6 +50788,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51124,6 +51256,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51600,6 +51733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52078,6 +52212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52544,6 +52679,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53006,6 +53142,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53469,6 +53606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53943,6 +54081,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54411,6 +54550,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54879,6 +55019,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55356,6 +55497,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55835,6 +55977,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56302,6 +56445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56764,6 +56908,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57224,6 +57369,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57695,6 +57841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58160,6 +58307,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58625,6 +58773,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59099,6 +59248,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59575,6 +59725,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60039,6 +60190,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60498,6 +60650,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60958,6 +61111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61429,6 +61583,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61894,6 +62049,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62359,6 +62515,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62833,6 +62990,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63309,6 +63467,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63773,6 +63932,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64552,6 +64712,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65012,6 +65173,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65483,6 +65645,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65948,6 +66111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66413,6 +66577,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66887,6 +67052,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67363,6 +67529,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67827,6 +67994,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68291,6 +68459,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68753,6 +68922,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69226,6 +69396,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69693,6 +69864,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70160,6 +70332,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70636,6 +70809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71114,6 +71288,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71580,6 +71755,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72041,6 +72217,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72503,6 +72680,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72976,6 +73154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73443,6 +73622,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73910,6 +74090,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74386,6 +74567,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74864,6 +75046,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75330,6 +75513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75791,6 +75975,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76253,6 +76438,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76726,6 +76912,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77193,6 +77380,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77660,6 +77848,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78136,6 +78325,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78614,6 +78804,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79080,6 +79271,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79541,6 +79733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80003,6 +80196,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80476,6 +80670,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80943,6 +81138,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81410,6 +81606,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81886,6 +82083,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82364,6 +82562,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82830,6 +83029,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83291,6 +83491,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83753,6 +83954,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84226,6 +84428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84693,6 +84896,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85160,6 +85364,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85636,6 +85841,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86114,6 +86320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86580,6 +86787,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87039,6 +87247,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87493,6 +87702,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87955,6 +88165,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88415,6 +88626,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88873,6 +89085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89335,6 +89548,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89797,6 +90011,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90255,6 +90470,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index 41723a268e1..90edd1b2210 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -60,6 +60,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -493,6 +494,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -528,6 +530,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -970,6 +973,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1013,6 +1017,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1464,6 +1469,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1505,6 +1511,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1948,6 +1955,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1987,6 +1995,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2436,6 +2445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2479,6 +2489,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2933,6 +2944,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2976,6 +2988,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3432,6 +3445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3471,6 +3485,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3921,6 +3936,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3958,6 +3974,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4391,6 +4408,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4426,6 +4444,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4868,6 +4887,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4911,6 +4931,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5362,6 +5383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5403,6 +5425,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5846,6 +5869,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5885,6 +5909,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6334,6 +6359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6377,6 +6403,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6831,6 +6858,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6874,6 +6902,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7330,6 +7359,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7369,6 +7399,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7819,6 +7850,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8289,6 +8321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8766,6 +8799,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9260,6 +9294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9744,6 +9779,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10232,6 +10268,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10729,6 +10766,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11228,6 +11266,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11717,6 +11756,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12187,6 +12227,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12664,6 +12705,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13158,6 +13200,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13642,6 +13685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14130,6 +14174,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14627,6 +14672,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15126,6 +15172,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15615,6 +15662,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15652,6 +15700,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16085,6 +16134,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16120,6 +16170,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16562,6 +16613,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16605,6 +16657,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17056,6 +17109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17097,6 +17151,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17540,6 +17595,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17579,6 +17635,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18028,6 +18085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18071,6 +18129,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18525,6 +18584,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18568,6 +18628,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -19024,6 +19085,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19063,6 +19125,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -19513,6 +19576,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19986,6 +20050,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20463,6 +20528,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20957,6 +21023,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21441,6 +21508,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21929,6 +21997,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22426,6 +22495,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22925,6 +22995,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23414,6 +23485,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23884,6 +23956,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24361,6 +24434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24855,6 +24929,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25339,6 +25414,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25827,6 +25903,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26324,6 +26401,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26823,6 +26901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27312,6 +27391,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27782,6 +27862,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28259,6 +28340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28753,6 +28835,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29237,6 +29320,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29725,6 +29809,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30222,6 +30307,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30721,6 +30807,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31210,6 +31297,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31680,6 +31768,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32157,6 +32246,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32651,6 +32741,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33135,6 +33226,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -33623,6 +33715,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34120,6 +34213,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -34619,6 +34713,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35108,6 +35203,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -35578,6 +35674,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36055,6 +36152,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -36549,6 +36647,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37033,6 +37132,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -37521,6 +37621,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38018,6 +38119,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -38517,6 +38619,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39006,6 +39109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39479,6 +39583,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -39956,6 +40061,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40450,6 +40556,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -40934,6 +41041,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41422,6 +41530,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -41919,6 +42028,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42418,6 +42528,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -42907,6 +43018,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43377,6 +43489,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -43854,6 +43967,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44348,6 +44462,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -44832,6 +44947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45320,6 +45436,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -45817,6 +45934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46316,6 +46434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -46805,6 +46924,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47275,6 +47395,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -47752,6 +47873,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48246,6 +48368,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -48730,6 +48853,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49218,6 +49342,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -49715,6 +49840,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50214,6 +50340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -50703,6 +50830,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51173,6 +51301,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -51650,6 +51779,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52144,6 +52274,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -52628,6 +52759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53116,6 +53248,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -53613,6 +53746,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54112,6 +54246,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -54601,6 +54736,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55071,6 +55207,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -55548,6 +55685,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56042,6 +56180,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -56526,6 +56665,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57014,6 +57154,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -57511,6 +57652,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58010,6 +58152,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58499,6 +58642,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -58970,6 +59114,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59445,6 +59590,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -59937,6 +60083,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60419,6 +60566,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -60905,6 +61053,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61400,6 +61549,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -61897,6 +62047,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62384,6 +62535,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -62852,6 +63004,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63327,6 +63480,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -63819,6 +63973,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64301,6 +64456,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -64787,6 +64943,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65282,6 +65439,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -65779,6 +65937,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -66266,6 +66425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67054,6 +67214,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -67529,6 +67690,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68021,6 +68183,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68503,6 +68666,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -68989,6 +69153,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69484,6 +69649,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -69981,6 +70147,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70468,6 +70635,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -70941,6 +71109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71418,6 +71587,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -71912,6 +72082,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72396,6 +72567,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -72884,6 +73056,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73381,6 +73554,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -73880,6 +74054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74369,6 +74544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -74839,6 +75015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75316,6 +75493,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -75810,6 +75988,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76294,6 +76473,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -76782,6 +76962,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77279,6 +77460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -77778,6 +77960,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78267,6 +78450,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -78737,6 +78921,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79214,6 +79399,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -79708,6 +79894,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80192,6 +80379,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -80680,6 +80868,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81177,6 +81366,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -81676,6 +81866,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82165,6 +82356,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -82635,6 +82827,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83112,6 +83305,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -83606,6 +83800,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84090,6 +84285,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -84578,6 +84774,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85075,6 +85272,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -85574,6 +85772,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86063,6 +86262,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -86533,6 +86733,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87010,6 +87211,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87504,6 +87706,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -87988,6 +88191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88476,6 +88680,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -88973,6 +89178,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89472,6 +89678,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -89961,6 +90168,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90426,6 +90634,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -90886,6 +91095,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -91354,6 +91564,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -91820,6 +92031,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -92284,6 +92496,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -92752,6 +92965,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -93220,6 +93434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -93684,6 +93899,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result
index 570a30bcd81..5ea1f98ddcb 100644
--- a/mysql-test/suite/parts/r/partition_basic_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_innodb.result
@@ -486,6 +486,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -946,6 +947,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1424,6 +1426,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1894,6 +1897,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2366,6 +2370,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2847,6 +2852,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3334,6 +3340,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3806,6 +3813,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4265,6 +4273,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4725,6 +4734,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5203,6 +5213,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5673,6 +5684,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6143,6 +6155,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6624,6 +6637,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7107,6 +7121,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7579,6 +7594,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8079,6 +8095,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8576,6 +8593,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9091,6 +9109,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9598,6 +9617,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10107,6 +10127,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10625,6 +10646,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11149,6 +11171,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11658,6 +11681,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12153,6 +12177,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12650,6 +12675,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13165,6 +13191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13672,6 +13699,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14181,6 +14209,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14699,6 +14728,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15223,6 +15253,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15732,6 +15763,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16243,6 +16275,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16756,6 +16789,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17287,6 +17321,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17810,6 +17845,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18335,6 +18371,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18869,6 +18906,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19409,6 +19447,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19934,6 +19973,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20434,6 +20474,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20931,6 +20972,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21446,6 +21488,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -21953,6 +21996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22460,6 +22504,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -22978,6 +23023,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -23498,6 +23544,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24007,6 +24054,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24502,6 +24550,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -24999,6 +25048,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -25514,6 +25564,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26021,6 +26072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -26528,6 +26580,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27046,6 +27099,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -27566,6 +27620,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28075,6 +28130,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -28586,6 +28642,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29099,6 +29156,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -29630,6 +29688,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30153,6 +30212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -30676,6 +30736,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31210,6 +31271,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -31746,6 +31808,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -32271,6 +32334,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index 3b84c0295f2..06bf043b382 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -490,6 +490,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -956,6 +957,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1443,6 +1445,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1920,6 +1923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2401,6 +2405,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2891,6 +2896,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3387,6 +3393,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3869,6 +3876,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4331,6 +4339,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4797,6 +4806,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5284,6 +5294,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5761,6 +5772,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6240,6 +6252,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6730,6 +6743,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7222,6 +7236,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7704,6 +7719,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8223,6 +8239,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8742,6 +8759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9282,6 +9300,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9812,6 +9831,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10346,6 +10366,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10889,6 +10910,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11438,6 +11460,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11973,6 +11996,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12492,6 +12516,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13011,6 +13036,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13551,6 +13577,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14081,6 +14108,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14613,6 +14641,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15156,6 +15185,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15701,6 +15731,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16236,6 +16267,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
index 5e59c8f08ba..df141a93033 100644
--- a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
@@ -505,6 +505,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1000,6 +1001,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1511,6 +1513,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2012,6 +2015,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2517,6 +2521,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3027,6 +3032,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3559,6 +3565,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4065,6 +4072,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4538,6 +4546,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5033,6 +5042,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5544,6 +5554,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6045,6 +6056,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -6548,6 +6560,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7058,6 +7071,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -7590,6 +7604,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8096,6 +8111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -8626,6 +8642,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9174,6 +9191,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -9738,6 +9756,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10292,6 +10311,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -10850,6 +10870,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11413,6 +11434,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -11998,6 +12020,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -12557,6 +12580,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13087,6 +13111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -13635,6 +13660,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14199,6 +14225,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -14753,6 +14780,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15309,6 +15337,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -15872,6 +15901,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -16457,6 +16487,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17016,6 +17047,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -17540,6 +17572,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18078,6 +18111,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -18635,6 +18669,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19177,6 +19212,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -19723,6 +19759,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20279,6 +20316,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -20830,6 +20868,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index 002fe90c78a..38221951ae8 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -475,6 +475,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -933,6 +934,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1395,6 +1397,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1920,6 +1923,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2421,6 +2425,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2883,6 +2888,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3342,6 +3348,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3804,6 +3811,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4269,6 +4277,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4723,6 +4732,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5178,6 +5188,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index f940b250c19..683729fa2f3 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -485,6 +485,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -952,6 +953,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1427,6 +1429,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -1965,6 +1968,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2479,6 +2483,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -2954,6 +2959,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3422,6 +3428,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -3897,6 +3904,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4375,6 +4383,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -4836,6 +4845,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
@@ -5300,6 +5310,7 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
AND f_charbig = '####updated per insert trigger####';
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
index 88469a339ad..023195e9760 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
index 585bd24dca6..0b5f96696b0 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
index 59181388bd0..8461d4136e0 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
@@ -1020,6 +1020,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
index c4d63f663e1..4c541d9467e 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
index d29dfd343a6..8f934506ee2 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
index f26b975b75e..47e07ecc3a6 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
index a1dad1b34b3..6cd4c4991b7 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
index 88f59da8f13..d1b7a599923 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
index a498d4667b1..ad83e95929a 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result
@@ -987,6 +987,7 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
+mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;
diff --git a/mysql-test/suite/parts/r/partition_repair_myisam.result b/mysql-test/suite/parts/r/partition_repair_myisam.result
index 6e99f1d3632..0521263df12 100644
--- a/mysql-test/suite/parts/r/partition_repair_myisam.result
+++ b/mysql-test/suite/parts/r/partition_repair_myisam.result
@@ -322,7 +322,8 @@ FLUSH TABLES;
# replacing p6 with a crashed MYD file (1) (splitted dynamic record)
ANALYZE TABLE t1_will_crash;
Table Op Msg_type Msg_text
-test.t1_will_crash analyze status OK
+test.t1_will_crash analyze Warning Engine-independent statistics are not collected for column 'c'
+test.t1_will_crash analyze status Operation failed
OPTIMIZE TABLE t1_will_crash;
Table Op Msg_type Msg_text
test.t1_will_crash optimize info Found row block followed by deleted block
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index ff184806e2e..e43841c80ac 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -19,16 +19,16 @@ where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
order by name limit 10;
NAME ENABLED TIMED
+wait/synch/rwlock/sql/LOCK_all_status_vars YES YES
wait/synch/rwlock/sql/LOCK_dboptions YES YES
wait/synch/rwlock/sql/LOCK_grant YES YES
wait/synch/rwlock/sql/LOCK_SEQUENCE YES YES
+wait/synch/rwlock/sql/LOCK_ssl_refresh YES YES
wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES
wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES
wait/synch/rwlock/sql/LOCK_sys_init_slave YES YES
wait/synch/rwlock/sql/LOGGER::LOCK_logger YES YES
wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for YES YES
-wait/synch/rwlock/sql/MDL_lock::rwlock YES YES
-wait/synch/rwlock/sql/Query_cache_query::lock YES YES
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Cond/sql/%'
and name not in (
diff --git a/mysql-test/suite/perfschema/r/event_aggregate.result b/mysql-test/suite/perfschema/r/event_aggregate.result
index 9ab62329fc9..7fa08534bb1 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate.result
@@ -235,38 +235,38 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -363,10 +363,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -375,10 +375,10 @@ user2 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -387,24 +387,24 @@ user2 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -518,10 +518,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -530,10 +530,10 @@ user2 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -542,24 +542,24 @@ user2 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -677,10 +677,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -694,10 +694,10 @@ user3 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -711,24 +711,24 @@ user3 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -863,10 +863,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -880,10 +880,10 @@ user3 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -897,24 +897,24 @@ user3 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1053,10 +1053,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1075,10 +1075,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1097,24 +1097,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1270,10 +1270,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1292,10 +1292,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1314,24 +1314,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1478,10 +1478,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1500,10 +1500,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1522,24 +1522,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1684,10 +1684,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1706,10 +1706,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1728,24 +1728,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1887,10 +1887,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1909,10 +1909,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1931,24 +1931,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2087,10 +2087,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2109,10 +2109,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2131,24 +2131,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2288,10 +2288,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2310,10 +2310,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2332,24 +2332,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2488,10 +2488,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2510,10 +2510,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2532,24 +2532,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2688,10 +2688,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2710,10 +2710,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2732,24 +2732,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2888,10 +2888,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2910,10 +2910,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2932,24 +2932,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3088,10 +3088,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -3110,10 +3110,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3132,24 +3132,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3288,10 +3288,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -3310,10 +3310,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3332,24 +3332,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3510,10 +3510,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3532,24 +3532,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3732,24 +3732,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3939,17 +3939,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4146,10 +4146,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4346,10 +4346,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4546,10 +4546,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4746,10 +4746,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4946,10 +4946,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5146,10 +5146,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5310,10 +5310,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5418,10 +5418,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5506,10 +5506,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
index ece0402335d..19dec52aa47 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
@@ -217,31 +217,31 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -326,10 +326,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -338,24 +338,24 @@ user2 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -452,10 +452,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -464,24 +464,24 @@ user2 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -578,10 +578,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -595,24 +595,24 @@ user3 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -721,10 +721,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -738,24 +738,24 @@ user3 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -864,10 +864,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -886,24 +886,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1024,10 +1024,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1046,24 +1046,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1175,10 +1175,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1197,24 +1197,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1324,10 +1324,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1346,24 +1346,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1470,10 +1470,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1492,24 +1492,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1613,10 +1613,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1635,24 +1635,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1757,10 +1757,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1779,24 +1779,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1900,10 +1900,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1922,24 +1922,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2043,10 +2043,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2065,24 +2065,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2186,10 +2186,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2208,24 +2208,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2329,10 +2329,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2351,24 +2351,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2472,10 +2472,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2494,24 +2494,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2615,10 +2615,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2637,24 +2637,24 @@ user4 stage/sql/Opening tables 3
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2780,24 +2780,24 @@ user4 stage/sql/Opening tables 0
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2930,17 +2930,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3080,10 +3080,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3223,10 +3223,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3366,10 +3366,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3509,10 +3509,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3652,10 +3652,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3795,10 +3795,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3938,10 +3938,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4045,10 +4045,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4132,10 +4132,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
index 083e1bffdd2..3aa27664cac 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
@@ -185,26 +185,26 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -280,10 +280,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -294,17 +294,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -392,10 +392,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -406,17 +406,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -504,10 +504,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -523,17 +523,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -633,10 +633,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -652,17 +652,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -762,10 +762,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -786,17 +786,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -908,10 +908,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -932,17 +932,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1045,10 +1045,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1069,17 +1069,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1180,10 +1180,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1204,17 +1204,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1312,10 +1312,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1336,17 +1336,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1441,10 +1441,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1465,17 +1465,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1571,10 +1571,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1595,17 +1595,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1700,10 +1700,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1724,17 +1724,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1829,10 +1829,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1853,17 +1853,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1958,10 +1958,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1982,17 +1982,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2087,10 +2087,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2111,17 +2111,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2216,10 +2216,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2240,17 +2240,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2345,10 +2345,10 @@ user host event_name count_star
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2369,17 +2369,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2498,17 +2498,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2627,17 +2627,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2763,10 +2763,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2892,10 +2892,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3021,10 +3021,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3150,10 +3150,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3279,10 +3279,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3408,10 +3408,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3537,10 +3537,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3630,10 +3630,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3703,10 +3703,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
index c9b2b768691..4d4a842948f 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
@@ -199,24 +199,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -289,24 +289,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -386,24 +386,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -479,24 +479,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -579,24 +579,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -675,24 +675,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -778,24 +778,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -872,24 +872,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -964,24 +964,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1053,24 +1053,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1139,24 +1139,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1226,24 +1226,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1312,24 +1312,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1398,24 +1398,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1484,24 +1484,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1570,24 +1570,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1656,24 +1656,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1742,24 +1742,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1828,24 +1828,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1921,17 +1921,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2014,10 +2014,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2100,10 +2100,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2186,10 +2186,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2272,10 +2272,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2358,10 +2358,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2444,10 +2444,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2530,10 +2530,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2616,10 +2616,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2702,10 +2702,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
index 89443515f31..db281652c0c 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
@@ -169,17 +169,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -245,17 +245,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -328,17 +328,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -407,17 +407,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -493,17 +493,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -575,17 +575,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -664,17 +664,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -744,17 +744,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -822,17 +822,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -897,17 +897,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -969,17 +969,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1042,17 +1042,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1114,17 +1114,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1186,17 +1186,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1258,17 +1258,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1330,17 +1330,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1402,17 +1402,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1474,17 +1474,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1546,17 +1546,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1618,17 +1618,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1697,10 +1697,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1769,10 +1769,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1841,10 +1841,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1913,10 +1913,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1985,10 +1985,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2057,10 +2057,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2129,10 +2129,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2201,10 +2201,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2273,10 +2273,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
index 0ea5d90ea41..c8996fa2846 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
@@ -203,33 +203,33 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -317,10 +317,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -329,10 +329,10 @@ user2 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 0
user2 stage/sql/Closing tables 0
user2 stage/sql/Init 0
@@ -343,17 +343,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -458,10 +458,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -470,10 +470,10 @@ user2 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -484,17 +484,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -603,10 +603,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -620,10 +620,10 @@ user3 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -639,17 +639,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -775,10 +775,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -792,10 +792,10 @@ user3 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -811,17 +811,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -951,10 +951,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -973,10 +973,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -997,17 +997,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1154,10 +1154,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1176,10 +1176,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 5
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1200,17 +1200,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1348,10 +1348,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1370,10 +1370,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 5
@@ -1394,17 +1394,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1540,10 +1540,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1562,10 +1562,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1586,17 +1586,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1729,10 +1729,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1751,10 +1751,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1775,17 +1775,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1915,10 +1915,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1937,10 +1937,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -1961,17 +1961,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2102,10 +2102,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2124,10 +2124,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2148,17 +2148,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2288,10 +2288,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2310,10 +2310,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2334,17 +2334,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2474,10 +2474,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2496,10 +2496,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2520,17 +2520,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2660,10 +2660,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2682,10 +2682,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2706,17 +2706,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2846,10 +2846,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2868,10 +2868,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -2892,17 +2892,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3032,10 +3032,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -3054,10 +3054,10 @@ user4 localhost stage/sql/Opening tables 3
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3078,17 +3078,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3240,10 +3240,10 @@ user4 localhost stage/sql/Opening tables 0
execute dump_stages_user;
user event_name count_star
user1 stage/sql/Checking permissions 3
-user1 stage/sql/Closing tables 4
+user1 stage/sql/Closing tables 6
user1 stage/sql/Init 6
user1 stage/sql/Init for update 1
-user1 stage/sql/Opening tables 3
+user1 stage/sql/Opening tables 4
user2 stage/sql/Checking permissions 3
user2 stage/sql/Closing tables 4
user2 stage/sql/Init 6
@@ -3264,17 +3264,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3450,17 +3450,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3636,17 +3636,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3829,10 +3829,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4015,10 +4015,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4201,10 +4201,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4387,10 +4387,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4573,10 +4573,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4759,10 +4759,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4909,10 +4909,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5003,10 +5003,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5077,10 +5077,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
index 52c674024bd..508a65d9ba0 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
@@ -215,33 +215,33 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -324,10 +324,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -338,24 +338,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 3
-localhost stage/sql/Closing tables 4
+localhost stage/sql/Closing tables 6
localhost stage/sql/Init 5
localhost stage/sql/Init for update 1
-localhost stage/sql/Opening tables 3
+localhost stage/sql/Opening tables 4
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -450,10 +450,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -464,24 +464,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -576,10 +576,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -595,24 +595,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 6
-localhost stage/sql/Closing tables 8
+localhost stage/sql/Closing tables 10
localhost stage/sql/Init 10
localhost stage/sql/Init for update 2
-localhost stage/sql/Opening tables 6
+localhost stage/sql/Opening tables 7
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -719,10 +719,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -738,24 +738,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -862,10 +862,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -886,24 +886,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 9
-localhost stage/sql/Closing tables 12
+localhost stage/sql/Closing tables 14
localhost stage/sql/Init 15
localhost stage/sql/Init for update 3
-localhost stage/sql/Opening tables 9
+localhost stage/sql/Opening tables 10
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1022,10 +1022,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1046,24 +1046,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 20
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1173,10 +1173,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1197,24 +1197,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 21
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1322,10 +1322,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1346,24 +1346,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 22
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1468,10 +1468,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1492,24 +1492,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 23
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1611,10 +1611,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1635,24 +1635,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1755,10 +1755,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1779,24 +1779,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1898,10 +1898,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1922,24 +1922,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2041,10 +2041,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2065,24 +2065,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2184,10 +2184,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2208,24 +2208,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2327,10 +2327,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2351,24 +2351,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2470,10 +2470,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2494,24 +2494,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2637,24 +2637,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2780,24 +2780,24 @@ user event_name count_star
execute dump_stages_host;
host event_name count_star
localhost stage/sql/Checking permissions 12
-localhost stage/sql/Closing tables 16
+localhost stage/sql/Closing tables 18
localhost stage/sql/Init 24
localhost stage/sql/Init for update 4
-localhost stage/sql/Opening tables 12
+localhost stage/sql/Opening tables 13
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2930,17 +2930,17 @@ localhost stage/sql/Opening tables 0
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3080,10 +3080,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3223,10 +3223,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3366,10 +3366,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3509,10 +3509,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3652,10 +3652,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3795,10 +3795,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3902,10 +3902,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3989,10 +3989,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4076,10 +4076,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
index a493631d71f..579fadc51c0 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
@@ -183,10 +183,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -194,17 +194,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -278,10 +278,10 @@ wait/synch/rwlock/sql/LOCK_grant 1
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 0
user2 localhost stage/sql/Closing tables 0
user2 localhost stage/sql/Init 0
@@ -294,17 +294,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 3
-stage/sql/Closing tables 4
+stage/sql/Closing tables 6
stage/sql/Init 5
stage/sql/Init for update 1
-stage/sql/Opening tables 3
+stage/sql/Opening tables 4
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -390,10 +390,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -406,17 +406,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -502,10 +502,10 @@ wait/synch/rwlock/sql/LOCK_grant 2
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -523,17 +523,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 6
-stage/sql/Closing tables 8
+stage/sql/Closing tables 10
stage/sql/Init 10
stage/sql/Init for update 2
-stage/sql/Opening tables 6
+stage/sql/Opening tables 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -631,10 +631,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -652,17 +652,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -760,10 +760,10 @@ wait/synch/rwlock/sql/LOCK_grant 3
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -786,17 +786,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 9
-stage/sql/Closing tables 12
+stage/sql/Closing tables 14
stage/sql/Init 15
stage/sql/Init for update 3
-stage/sql/Opening tables 9
+stage/sql/Opening tables 10
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -906,10 +906,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 5
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -932,17 +932,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 20
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1043,10 +1043,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 5
@@ -1069,17 +1069,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 21
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1178,10 +1178,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1204,17 +1204,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 22
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1310,10 +1310,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1336,17 +1336,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 23
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1439,10 +1439,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1465,17 +1465,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1569,10 +1569,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1595,17 +1595,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1698,10 +1698,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1724,17 +1724,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1827,10 +1827,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1853,17 +1853,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1956,10 +1956,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -1982,17 +1982,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2085,10 +2085,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2111,17 +2111,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2214,10 +2214,10 @@ wait/synch/rwlock/sql/LOCK_grant 4
execute dump_stages_account;
user host event_name count_star
user1 localhost stage/sql/Checking permissions 3
-user1 localhost stage/sql/Closing tables 4
+user1 localhost stage/sql/Closing tables 6
user1 localhost stage/sql/Init 6
user1 localhost stage/sql/Init for update 1
-user1 localhost stage/sql/Opening tables 3
+user1 localhost stage/sql/Opening tables 4
user2 localhost stage/sql/Checking permissions 3
user2 localhost stage/sql/Closing tables 4
user2 localhost stage/sql/Init 6
@@ -2240,17 +2240,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2369,17 +2369,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2498,17 +2498,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2627,17 +2627,17 @@ host event_name count_star
execute dump_stages_global;
event_name count_star
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2763,10 +2763,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2892,10 +2892,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3021,10 +3021,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3150,10 +3150,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3279,10 +3279,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3408,10 +3408,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3501,10 +3501,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3574,10 +3574,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3647,10 +3647,10 @@ stage/sql/Opening tables 0
execute dump_stages_history;
event_name count(event_name)
stage/sql/Checking permissions 12
-stage/sql/Closing tables 16
+stage/sql/Closing tables 18
stage/sql/Init 24
stage/sql/Init for update 4
-stage/sql/Opening tables 12
+stage/sql/Opening tables 13
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
index a172dff7935..7963bed8213 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
@@ -118,7 +118,7 @@ Con4 is alive
Con4 is alive
select current_user();
current_user()
-root@192.0.2.4
+root@santa.claus.ipv4.example.com
disconnect con4;
connection default;
"Dumping performance_schema.host_cache"
@@ -155,7 +155,7 @@ Con5 is alive
Con5 is alive
select current_user();
current_user()
-root@192.0.2.4
+root@santa.claus.ipv4.example.com
disconnect con5;
connection default;
"Dumping performance_schema.host_cache"
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
index 4fdc6ef1b4c..baddc88b116 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
@@ -118,7 +118,7 @@ Con4 is alive
Con4 is alive
select current_user();
current_user()
-root@2001:db8::6:6
+root@santa.claus.ipv6.example.com
disconnect con4;
connection default;
"Dumping performance_schema.host_cache"
@@ -155,7 +155,7 @@ Con5 is alive
Con5 is alive
select current_user();
current_user()
-root@2001:db8::6:6
+root@santa.claus.ipv6.example.com
disconnect con5;
connection default;
"Dumping performance_schema.host_cache"
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 68e55f64880..baa73d28c90 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -95,11 +95,11 @@ where event_name like 'wait/io/table/%'
and object_schema in ("test", "mysql")
order by thread_id, event_id;
event_name short_source object_type object_schema pretty_name operation number_of_bytes
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
-wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
@@ -110,6 +110,8 @@ wait/io/table/sql/handler handler.cc: TABLE mysql roles_mapping fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch NULL
wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql table_stats fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql column_stats fetch NULL
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
diff --git a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
index f31bb1a8b7a..9ce90a2effa 100644
--- a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
+++ b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
@@ -25,7 +25,6 @@ WHERE name IN (
AND enabled = 'yes' AND timed = 'yes'
ORDER BY name;
NAME ENABLED TIMED
-wait/synch/mutex/sql/LOG_INFO::lock YES YES
wait/synch/mutex/sql/THD::LOCK_thd_data YES YES
SELECT * FROM performance_schema.setup_instruments
WHERE name = 'wait/synch/mutex/sql/hash_filo::lock'
diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result
index 1ac22f6ca34..304521b044f 100644
--- a/mysql-test/suite/perfschema/r/socket_connect.result
+++ b/mysql-test/suite/perfschema/r/socket_connect.result
@@ -167,19 +167,6 @@ connection default;
# 6.1 Verify that there are no TCP/IP connections in the socket instance table
-SELECT COUNT(*) = 0 AS 'Expect 1'
-FROM performance_schema.socket_instances
-WHERE EVENT_NAME LIKE '%client_connection%'
- AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
-AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
-Expect 1
-1
# 6.2 Verify that there are no TCP/IP connections in the summary instance table
-SELECT COUNT(*) = 0 AS 'Expect 1'
-FROM performance_schema.socket_summary_by_instance
-WHERE EVENT_NAME LIKE '%client_connection%'
- AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
-Expect 1
-1
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
index 7d15b250bd9..11531124cae 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_global.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -22,7 +22,7 @@ call dump_one_thread('user2');
username event_name sql_text
user2 statement/sql/insert insert into test.t1 values (1), (2), (3)
username event_name nesting_event_type
-user2 stage/sql/Waiting for global read lock STATEMENT
+user2 stage/sql/Waiting for backup lock STATEMENT
username event_name nesting_event_type
user2 stage/sql/Init STATEMENT
user2 stage/sql/Checking permissions STATEMENT
diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test
index 909840144ef..b4579605eb5 100644
--- a/mysql-test/suite/perfschema/t/socket_connect.test
+++ b/mysql-test/suite/perfschema/t/socket_connect.test
@@ -273,18 +273,21 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo
--echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table
--echo
-eval SELECT COUNT(*) = 0 AS 'Expect 1'
+let $wait_condition=
+SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
AND $ip_localhost;
+--source include/wait_condition.inc
--echo
--echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table
--echo
-eval SELECT COUNT(*) = 0 AS 'Expect 1'
+let $wait_condition=
+SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
-
+--source include/wait_condition.inc
exit;
diff --git a/mysql-test/suite/perfschema/t/stage_mdl_global.test b/mysql-test/suite/perfschema/t/stage_mdl_global.test
index 8863d2da903..03c3d315899 100644
--- a/mysql-test/suite/perfschema/t/stage_mdl_global.test
+++ b/mysql-test/suite/perfschema/t/stage_mdl_global.test
@@ -9,7 +9,7 @@ flush tables with read lock;
connect (con2, localhost, user2, , );
-# Will wait on con1, "Waiting for global read lock"
+# Will wait on con1, "Waiting for backup lock"
--send
insert into test.t1 values (1), (2), (3);
@@ -26,7 +26,7 @@ let $wait_condition=
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user2'
- and PROCESSLIST_STATE = 'Waiting for global read lock';
+ and PROCESSLIST_STATE = 'Waiting for backup lock';
--source include/wait_condition.inc
call dump_one_thread('user1');
diff --git a/mysql-test/suite/plugins/r/audit_null.result b/mysql-test/suite/plugins/r/audit_null.result
index 75eb5a9f682..ada85b661ee 100644
--- a/mysql-test/suite/plugins/r/audit_null.result
+++ b/mysql-test/suite/plugins/r/audit_null.result
@@ -74,6 +74,9 @@ root[root] @ localhost [] >> create table t1 (a int)
root[root] @ localhost [] test.t1 : create
root[root] @ localhost [] >> insert t1 values (1), (2)
root[root] @ localhost [] test.t1 : write
+root[root] @ localhost [] mysql.table_stats : read
+root[root] @ localhost [] mysql.column_stats : read
+root[root] @ localhost [] mysql.index_stats : read
root[root] @ localhost [] >> select * from t1
root[root] @ localhost [] test.t1 : read
root[root] @ localhost [] >> rename table t1 to t2
@@ -90,6 +93,9 @@ root[root] @ localhost [] test.t2 : read
root[root] @ localhost [] >> select * from v1
root[root] @ localhost [] test.t2 : read
root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] mysql.table_stats : read
+root[root] @ localhost [] mysql.column_stats : read
+root[root] @ localhost [] mysql.index_stats : read
root[root] @ localhost [] >> drop view v1
root[root] @ localhost [] >> create temporary table t2 (a date)
root[root] @ localhost [] >> insert t2 values ('2020-10-09')
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
index 2d9bb81ae86..7b26530ed12 100644
--- a/mysql-test/suite/plugins/r/auth_ed25519.result
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -27,7 +27,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE AUTHENTICATION
PLUGIN_TYPE_VERSION 2.2
PLUGIN_LIBRARY auth_ed25519.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
index 6b4e30b3d81..1194e6eef5a 100644
--- a/mysql-test/suite/plugins/r/cracklib_password_check.result
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -6,7 +6,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_LIBRARY cracklib_password_check.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Password validation via CrackLib
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
index 8770ce19f49..330f4325f76 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_load.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
@@ -20,7 +20,7 @@ WHERE VARIABLE_NAME LIKE 'Collation used %'
ORDER BY VARIABLE_NAME;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
index 935ea11d67b..b09af006e70 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_send.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
@@ -20,8 +20,8 @@ WHERE VARIABLE_NAME LIKE 'Collation used %'
ORDER BY VARIABLE_NAME;
VARIABLE_VALUE>0 VARIABLE_NAME
1 Collation used binary
-1 Collation used latin1_bin
1 Collation used latin1_swedish_ci
+1 Collation used utf8mb4_bin
1 Collation used utf8_bin
1 Collation used utf8_general_ci
set global sql_mode=ONLY_FULL_GROUP_BY;
diff --git a/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result b/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result
new file mode 100644
index 00000000000..82d464e3cb2
--- /dev/null
+++ b/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result
@@ -0,0 +1,12 @@
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'named_pipe';
+set global max_password_errors=1;
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser,,,,,PIPE;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser,,,,,PIPE;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result b/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result
new file mode 100644
index 00000000000..eb7cb64167b
--- /dev/null
+++ b/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result
@@ -0,0 +1,12 @@
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'unix_socket';
+set global max_password_errors=1;
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
index 01392760317..b63419a6e9f 100644
--- a/mysql-test/suite/plugins/r/server_audit.result
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -261,11 +261,17 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
@@ -290,6 +296,9 @@ TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
@@ -302,6 +311,9 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
@@ -315,34 +327,34 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
diff --git a/mysql-test/suite/plugins/r/show_all_plugins.result b/mysql-test/suite/plugins/r/show_all_plugins.result
index dd6cbfce4c4..3bdaf39d0d0 100644
--- a/mysql-test/suite/plugins/r/show_all_plugins.result
+++ b/mysql-test/suite/plugins/r/show_all_plugins.result
@@ -4,8 +4,8 @@ Variable_name Value
Opened_plugin_libraries 0
select * from information_schema.all_plugins where plugin_library='ha_example.so';
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE LOAD_OPTION PLUGIN_MATURITY PLUGIN_AUTH_VERSION
-EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.13 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
-UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.13 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
+EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.14 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
+UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.14 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
show status like '%libraries%';
Variable_name Value
Opened_plugin_libraries 1
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index 91b1fef0745..2e706115bd1 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -6,7 +6,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
PLUGIN_TYPE_VERSION 1.0
PLUGIN_LIBRARY simple_password_check.so
-PLUGIN_LIBRARY_VERSION 1.13
+PLUGIN_LIBRARY_VERSION 1.14
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Simple password strength checks
PLUGIN_LICENSE GPL
@@ -139,7 +139,7 @@ grant select on *.* to foo2 identified with mysql_old_password using '';
ERROR HY000: Your password does not satisfy the current policy requirements
grant select on *.* to foo2 identified with mysql_old_password;
ERROR HY000: Your password does not satisfy the current policy requirements
-update mysql.user set password='xxx' where user='foo1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
set global strict_password_validation=0;
set password for foo1 = '';
ERROR HY000: Your password does not satisfy the current policy requirements
diff --git a/mysql-test/suite/plugins/r/sql_error_log.result b/mysql-test/suite/plugins/r/sql_error_log.result
index a583cf91a83..98dfe0374fd 100644
--- a/mysql-test/suite/plugins/r/sql_error_log.result
+++ b/mysql-test/suite/plugins/r/sql_error_log.result
@@ -30,7 +30,7 @@ drop procedure test_error;
SET SQL_MODE = STRICT_ALL_TABLES;
create table t1(id int);
insert into t1 values ('aa');
-ERROR 22007: Incorrect integer value: 'aa' for column 'id' at row 1
+ERROR 22007: Incorrect integer value: 'aa' for column `test`.`t1`.`id` at row 1
SET SQL_MODE = '';
drop table t1;
SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
@@ -53,5 +53,5 @@ TIME HOSTNAME ERROR 1146: Table 'test.temptab' doesn't exist : SELECT `c` FROM `
TIME HOSTNAME ERROR 1000: new message : RESIGNAL SQLSTATE '40000' SET
MYSQL_ERRNO = 1000,
MESSAGE_TEXT = 'new message'
-TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column 'id' at row 1 : insert into t1 values ('aa')
+TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column `test`.`t1`.`id` at row 1 : insert into t1 values ('aa')
TIME HOSTNAME ERROR 1146: Table 'test.non_exists' doesn't exist : INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */
diff --git a/mysql-test/suite/plugins/r/thread_pool_server_audit.result b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
index cf09ccb3a51..eceb2280ed4 100644
--- a/mysql-test/suite/plugins/r/thread_pool_server_audit.result
+++ b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
@@ -250,11 +250,17 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
@@ -279,6 +285,9 @@ TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
@@ -291,6 +300,9 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
@@ -304,34 +316,34 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
-TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
diff --git a/mysql-test/suite/plugins/t/feedback_plugin_load.test b/mysql-test/suite/plugins/t/feedback_plugin_load.test
index 8b4aee28362..cfaf68ce96d 100644
--- a/mysql-test/suite/plugins/t/feedback_plugin_load.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_load.test
@@ -28,11 +28,11 @@ select * from information_schema.feedback where variable_name like 'feed%'
and variable_name not like '%debug%';
# Embedded server does not use the table mysqld.user and thus
-# does not automatically use latin1_bin on startup. Use it manually.
+# does not automatically use utf8mb4 on startup. Use it manually.
--disable_query_log
if (`SELECT VERSION() LIKE '%embedded%'`)
{
- DO _latin1'test' COLLATE latin1_bin;
+ create temporary table t1 (a json);
}
--enable_query_log
SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt
new file mode 100644
index 00000000000..52bf94f3511
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.opt
@@ -0,0 +1 @@
+--loose-enable-named-pipe --plugin-load=$AUTH_NAMED_PIPE_SO
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test
new file mode 100644
index 00000000000..79aeb7d3cbe
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_named_pipe.test
@@ -0,0 +1,22 @@
+# Tests that max_password_errors has no effect on login errors with
+# passwordless plugins (Windows version / auth_named_pipe)
+
+--source include/not_embedded.inc
+--source include/have_auth_named_pipe.inc
+if (`SELECT '$USERNAME' = 'nosuchuser'`) {
+ skip skipped for nosuchuser;
+}
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'named_pipe';
+
+set global max_password_errors=1;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser,,,,,PIPE);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser,,,,,PIPE);
+
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt
new file mode 100644
index 00000000000..91bb73e34f7
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.opt
@@ -0,0 +1 @@
+--loose-enable-named-pipe --plugin-load=$AUTH_SOCKET_SO
diff --git a/mysql-test/suite/plugins/t/max_password_errors_auth_socket.test b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.test
new file mode 100644
index 00000000000..495a68a0b59
--- /dev/null
+++ b/mysql-test/suite/plugins/t/max_password_errors_auth_socket.test
@@ -0,0 +1,23 @@
+# Tests that max_password_errors has no effect on login errors with
+# passwordless plugins (Unix version / auth_unix_socket)
+
+--source include/not_embedded.inc
+--source include/have_unix_socket.inc
+
+if (`SELECT '$USER' = 'nosuchuser'`) {
+ skip USER is nosuchuser;
+}
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'unix_socket';
+
+set global max_password_errors=1;
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser);
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+error ER_ACCESS_DENIED_NO_PASSWORD_ERROR;
+connect(pipe_con,localhost,nosuchuser);
+
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/t/simple_password_check.test b/mysql-test/suite/plugins/t/simple_password_check.test
index 213d061247d..b7d631ab4bb 100644
--- a/mysql-test/suite/plugins/t/simple_password_check.test
+++ b/mysql-test/suite/plugins/t/simple_password_check.test
@@ -89,7 +89,7 @@ grant select on *.* to foo2 identified with mysql_old_password using '';
grant select on *.* to foo2 identified with mysql_old_password;
# direct updates are not protected
-update mysql.user set password='xxx' where user='foo1';
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
set global strict_password_validation=0;
diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result
index a163ee82f42..21aecdb9bc0 100644
--- a/mysql-test/suite/roles/create_and_drop_role.result
+++ b/mysql-test/suite/roles/create_and_drop_role.result
@@ -7,7 +7,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
create role test_role1;
create role test_role2, test_role3;
select user, host, is_role from user where user like 'test%';
-user host is_role
+User Host is_role
test_role1 Y
test_role2 Y
test_role3 Y
@@ -19,7 +19,7 @@ ERROR HY000: Operation CREATE ROLE failed for 'test_role1'
create role test_role1, test_role2;
ERROR HY000: Operation CREATE ROLE failed for 'test_role1'
select user, host, is_role from user where user like 'test%';
-user host is_role
+User Host is_role
test_role1 Y
test_role2 Y
drop role test_role1;
@@ -34,7 +34,7 @@ drop role dummy;
ERROR HY000: Operation DROP ROLE failed for 'dummy'
drop user dummy@'';
select user, host, is_role from user where user like 'test%';
-user host is_role
+User Host is_role
disconnect mysql;
connection default;
create role '';
diff --git a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
index afe00ed7729..5902ae0e16c 100644
--- a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
+++ b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.result
@@ -15,7 +15,6 @@ create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
set default role test_role for root@localhost;
-ERROR HY000: Column count of mysql.user is wrong. Expected 46, found 45. Created with MariaDB MYSQL_VERSION_ID, now running MYSQL_VERSION_ID. Please use mysql_upgrade to fix this error
drop role test_role;
drop user test_user@localhost;
alter table user add column default_role char(80) binary default '' not null
diff --git a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
index ebd75c34ca1..9cf0d7b4aff 100644
--- a/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
+++ b/mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
@@ -3,6 +3,7 @@
# that don't have 'default_role' column
#
source include/not_embedded.inc;
+source include/switch_to_mysql_user.inc;
connect (mysql, localhost, root,,);
use mysql;
@@ -29,8 +30,8 @@ after password_expired;
create role test_role;
create user test_user@localhost;
grant test_role to test_user@localhost;
---replace_regex /10\d\d\d\d/MYSQL_VERSION_ID/
---error ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
+#--replace_regex /10\d\d\d\d/MYSQL_VERSION_ID/
+#--error ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
set default role test_role for root@localhost;
drop role test_role;
drop user test_user@localhost;
@@ -46,3 +47,5 @@ update user set is_role='N';
flush privileges;
create role test_role;
drop role test_role;
+
+source include/switch_to_mysql_global_priv.inc;
diff --git a/mysql-test/suite/roles/default_create_user_not_role.result b/mysql-test/suite/roles/default_create_user_not_role.result
index 171015f6e82..3f32329b80c 100644
--- a/mysql-test/suite/roles/default_create_user_not_role.result
+++ b/mysql-test/suite/roles/default_create_user_not_role.result
@@ -2,7 +2,7 @@ connect mysql, localhost, root,,;
use mysql;
create user 'test'@'localhost';
select user, host, is_role from user where user='test' and host='localhost';
-user host is_role
+User Host is_role
test localhost N
drop user 'test'@'localhost';
disconnect mysql;
diff --git a/mysql-test/suite/roles/flush_roles-17898.result b/mysql-test/suite/roles/flush_roles-17898.result
new file mode 100644
index 00000000000..c142a496c10
--- /dev/null
+++ b/mysql-test/suite/roles/flush_roles-17898.result
@@ -0,0 +1,9 @@
+use mysql;
+insert db (db,user,select_priv) values ('foo','dwr_foo','Y'), ('bar','dwr_bar','Y');
+insert roles_mapping (user,role) values ('dwr_qux_dev','dwr_foo'),('dwr_qux_dev','dwr_bar');
+insert global_priv values ('','dwr_foo','{"is_role":true}'), ('','dwr_bar','{"is_role":true}'),
+('','dwr_qux_dev','{"access":16384,"is_role":true}');
+flush privileges;
+drop role dwr_foo;
+drop role dwr_bar;
+drop role dwr_qux_dev;
diff --git a/mysql-test/suite/roles/flush_roles-17898.test b/mysql-test/suite/roles/flush_roles-17898.test
new file mode 100644
index 00000000000..55611d31e7b
--- /dev/null
+++ b/mysql-test/suite/roles/flush_roles-17898.test
@@ -0,0 +1,12 @@
+#
+# MDEV-17898 FLUSH PRIVILEGES crashes server with segfault
+#
+use mysql;
+insert db (db,user,select_priv) values ('foo','dwr_foo','Y'), ('bar','dwr_bar','Y');
+insert roles_mapping (user,role) values ('dwr_qux_dev','dwr_foo'),('dwr_qux_dev','dwr_bar');
+insert global_priv values ('','dwr_foo','{"is_role":true}'), ('','dwr_bar','{"is_role":true}'),
+ ('','dwr_qux_dev','{"access":16384,"is_role":true}');
+flush privileges;
+drop role dwr_foo;
+drop role dwr_bar;
+drop role dwr_qux_dev;
diff --git a/mysql-test/suite/roles/grant_revoke_current.result b/mysql-test/suite/roles/grant_revoke_current.result
index 436bec92a8f..681c0857edb 100644
--- a/mysql-test/suite/roles/grant_revoke_current.result
+++ b/mysql-test/suite/roles/grant_revoke_current.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
grant select on *.* to current_role;
ERROR 0L000: Invalid definer
revoke select on *.* from current_role;
@@ -39,5 +40,5 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*34391
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
GRANT USAGE ON *.* TO 'r1'
set password='';
-update mysql.user set plugin='';
drop role r1;
+update mysql.global_priv set priv=@root_priv;
diff --git a/mysql-test/suite/roles/grant_revoke_current.test b/mysql-test/suite/roles/grant_revoke_current.test
index bffc04087b1..65a0809ac9c 100644
--- a/mysql-test/suite/roles/grant_revoke_current.test
+++ b/mysql-test/suite/roles/grant_revoke_current.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
--error ER_MALFORMED_DEFINER
grant select on *.* to current_role;
@@ -25,7 +26,7 @@ show grants;
grant r1 to current_user() identified by 'barfoo';
show grants;
set password='';
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
+#cleanup
drop role r1;
+update mysql.global_priv set priv=@root_priv;
diff --git a/mysql-test/suite/roles/grant_role_auto_create_user.result b/mysql-test/suite/roles/grant_role_auto_create_user.result
index 3f6139e84d0..61ce0359c0d 100644
--- a/mysql-test/suite/roles/grant_role_auto_create_user.result
+++ b/mysql-test/suite/roles/grant_role_auto_create_user.result
@@ -23,7 +23,7 @@ grant auto_create to foo@localhost;
ERROR 28000: Can't find any matching row in the user table
grant auto_create to bar@localhost identified by 'baz';
select user, host from mysql.user where user = 'bar';
-user host
+User Host
bar localhost
set sql_mode = '';
connect con1,localhost,bar,baz,;
diff --git a/mysql-test/suite/roles/i_s_applicable_roles_is_default.result b/mysql-test/suite/roles/i_s_applicable_roles_is_default.result
index 63127f8b176..32498d11390 100644
--- a/mysql-test/suite/roles/i_s_applicable_roles_is_default.result
+++ b/mysql-test/suite/roles/i_s_applicable_roles_is_default.result
@@ -78,3 +78,4 @@ drop role role3;
drop role role2;
drop role role1;
drop user foo;
+update mysql.global_priv set priv=json_remove(priv, '$.default_role');
diff --git a/mysql-test/suite/roles/i_s_applicable_roles_is_default.test b/mysql-test/suite/roles/i_s_applicable_roles_is_default.test
index 59ba1f8bf75..b6f6f9ba879 100644
--- a/mysql-test/suite/roles/i_s_applicable_roles_is_default.test
+++ b/mysql-test/suite/roles/i_s_applicable_roles_is_default.test
@@ -51,7 +51,6 @@ set default role role3;
--sorted_result
select * from information_schema.applicable_roles;
-
set default role none;
--sorted_result
select * from information_schema.applicable_roles;
@@ -60,3 +59,4 @@ drop role role3;
drop role role2;
drop role role1;
drop user foo;
+update mysql.global_priv set priv=json_remove(priv, '$.default_role');
diff --git a/mysql-test/suite/roles/none_public.result b/mysql-test/suite/roles/none_public.result
index 5dd1480e8c3..c253ae1478b 100644
--- a/mysql-test/suite/roles/none_public.result
+++ b/mysql-test/suite/roles/none_public.result
@@ -40,17 +40,9 @@ ERROR OP000: Invalid role specification `none`
create definer=public view test.v1 as select 1;
ERROR OP000: Invalid role specification `public`
drop role role1;
-optimize table mysql.user;
-Table Op Msg_type Msg_text
-mysql.user optimize status OK
-insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert mysql.global_priv values ('', 'none', '{"is_role":true}'), ('', 'public', '{"is_role":true}');
flush privileges;
Warnings:
Error 1959 Invalid role specification `none`
Error 1959 Invalid role specification `public`
-delete from mysql.user where is_role='Y';
+delete from mysql.global_priv where host='';
diff --git a/mysql-test/suite/roles/none_public.test b/mysql-test/suite/roles/none_public.test
index 838a4955df5..a0ec2315cfc 100644
--- a/mysql-test/suite/roles/none_public.test
+++ b/mysql-test/suite/roles/none_public.test
@@ -50,8 +50,6 @@ create definer=public view test.v1 as select 1;
drop role role1;
-optimize table mysql.user; # to remove deleted rows and have stable row order
-insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
+insert mysql.global_priv values ('', 'none', '{"is_role":true}'), ('', 'public', '{"is_role":true}');
flush privileges;
-delete from mysql.user where is_role='Y';
-
+delete from mysql.global_priv where host='';
diff --git a/mysql-test/suite/roles/prepare_stmt_with_role.result b/mysql-test/suite/roles/prepare_stmt_with_role.result
index 0352502c35c..758dca735e1 100644
--- a/mysql-test/suite/roles/prepare_stmt_with_role.result
+++ b/mysql-test/suite/roles/prepare_stmt_with_role.result
@@ -13,7 +13,7 @@ EXECUTE stmtCreateRole;
#
SELECT user, host,is_role FROM mysql.user
WHERE user = 'developers';
-user host is_role
+User Host is_role
developers Y
SHOW GRANTS;
Grants for root@localhost
@@ -73,7 +73,7 @@ EXECUTE stmtDropRole;
#
SELECT user, host,is_role FROM mysql.user
WHERE user = 'developers';
-user host is_role
+User Host is_role
SELECT * FROM mysql.roles_mapping;
Host User Role Admin_option
SHOW GRANTS;
@@ -89,7 +89,7 @@ GRANT USAGE ON *.* TO 'test_user'@'%'
EXECUTE stmtCreateRole;
SELECT user, host,is_role FROM mysql.user
WHERE user = 'developers';
-user host is_role
+User Host is_role
developers Y
SELECT * FROM mysql.roles_mapping;
Host User Role Admin_option
diff --git a/mysql-test/suite/roles/rename_user.result b/mysql-test/suite/roles/rename_user.result
index 987d90a5820..9550e15953a 100644
--- a/mysql-test/suite/roles/rename_user.result
+++ b/mysql-test/suite/roles/rename_user.result
@@ -12,7 +12,7 @@ localhost root test_role2 Y
localhost test_user test_role1 N
rename user 'test_user'@'localhost' to 'test_user_rm'@'newhost';
select user, host from user where user like 'test%';
-user host
+User Host
test_role1
test_role2
test_user_rm newhost
diff --git a/mysql-test/suite/roles/role_case_sensitive-10744.result b/mysql-test/suite/roles/role_case_sensitive-10744.result
index b898310e83c..baec3c5f2a1 100644
--- a/mysql-test/suite/roles/role_case_sensitive-10744.result
+++ b/mysql-test/suite/roles/role_case_sensitive-10744.result
@@ -11,7 +11,7 @@ create role test_role;
# Test if mysql.user has the roles created.
#
select user, host from mysql.user where is_role='y' and user like 'test%';
-user host
+User Host
test_ROLE
test_role
create database secret_db;
diff --git a/mysql-test/suite/roles/set_default_role_clear.result b/mysql-test/suite/roles/set_default_role_clear.result
index 7f54b5eabcc..70628059f65 100644
--- a/mysql-test/suite/roles/set_default_role_clear.result
+++ b/mysql-test/suite/roles/set_default_role_clear.result
@@ -10,7 +10,7 @@ set default role test_role;
select user, host, default_role from mysql.user;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
show grants;
Grants for test_user@localhost
@@ -18,16 +18,16 @@ GRANT test_role TO 'test_user'@'localhost'
GRANT USAGE ON *.* TO 'test_user'@'localhost'
GRANT SELECT ON *.* TO 'test_role'
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
set default role NONE;
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost
set default role invalid_role;
ERROR OP000: Invalid role specification `invalid_role`
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost
select user, host, default_role from mysql.user;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result
index 9880671ba09..706ba3fba7b 100644
--- a/mysql-test/suite/roles/set_default_role_for.result
+++ b/mysql-test/suite/roles/set_default_role_for.result
@@ -22,17 +22,17 @@ GRANT role_a TO 'user_a'@'localhost'
GRANT USAGE ON *.* TO 'user_a'@'localhost'
GRANT SELECT ON *.* TO 'role_a'
select user, host, default_role from mysql.user where user like 'user_%';
-user host default_role
+User Host default_role
user_a localhost role_a
user_b localhost role_b
set default role NONE for current_user;
select user, host, default_role from mysql.user where user like 'user_%';
-user host default_role
+User Host default_role
user_a localhost
user_b localhost role_b
set default role current_role for current_user;
select user, host, default_role from mysql.user where user like 'user_%';
-user host default_role
+User Host default_role
user_a localhost role_a
user_b localhost role_b
set default role role_b for current_user;
@@ -44,12 +44,6 @@ GRANT USAGE ON *.* TO 'user_b'@'localhost'
GRANT INSERT, UPDATE ON *.* TO 'role_b'
select user, host, default_role from mysql.user where user like 'user_%';
ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user'
-insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
set default role NONE for user_a@localhost;
show grants;
Grants for user_a@localhost
@@ -60,6 +54,5 @@ select user, host, default_role from mysql.user where user like 'user_%';
ERROR 42000: SELECT command denied to user 'user_a'@'localhost' for table 'user'
drop role role_a;
drop role role_b;
-delete from mysql.user where user = 'someuser' && host = 'somehost';
drop user user_a@localhost;
drop user user_b@localhost;
diff --git a/mysql-test/suite/roles/set_default_role_for.test b/mysql-test/suite/roles/set_default_role_for.test
index 985eaa16e3d..eff999a522b 100644
--- a/mysql-test/suite/roles/set_default_role_for.test
+++ b/mysql-test/suite/roles/set_default_role_for.test
@@ -65,8 +65,6 @@ show grants;
--error ER_TABLEACCESS_DENIED_ERROR
select user, host, default_role from mysql.user where user like 'user_%';
-# Make sure the default role setting worked from root.
-insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
# Since we have update privileges on the mysql.user table, we should
# be able to set a default role for a different user.
set default role NONE for user_a@localhost;
@@ -82,6 +80,5 @@ change_user 'root';
drop role role_a;
drop role role_b;
-delete from mysql.user where user = 'someuser' && host = 'somehost';
drop user user_a@localhost;
drop user user_b@localhost;
diff --git a/mysql-test/suite/roles/set_default_role_invalid.result b/mysql-test/suite/roles/set_default_role_invalid.result
index 5bcaa9acb86..77c317c6a02 100644
--- a/mysql-test/suite/roles/set_default_role_invalid.result
+++ b/mysql-test/suite/roles/set_default_role_invalid.result
@@ -17,7 +17,7 @@ set default role test_role;
select user, host, default_role from mysql.user;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user'
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
show grants;
Grants for test_user@localhost
@@ -25,12 +25,12 @@ GRANT test_role TO 'test_user'@'localhost'
GRANT USAGE ON *.* TO 'test_user'@'localhost'
GRANT SELECT ON *.* TO 'test_role'
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
set default role invalid_role;
ERROR OP000: Invalid role specification `invalid_role`
select user, host, default_role from mysql.user where user='test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
revoke test_role from test_user@localhost;
select user, host, default_role from mysql.user where user='test_user';
diff --git a/mysql-test/suite/roles/set_default_role_new_connection.result b/mysql-test/suite/roles/set_default_role_new_connection.result
index a59ecbd75f7..8590d33e16d 100644
--- a/mysql-test/suite/roles/set_default_role_new_connection.result
+++ b/mysql-test/suite/roles/set_default_role_new_connection.result
@@ -15,7 +15,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'us
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
connect c1, localhost, test_user,,;
show grants;
@@ -24,13 +24,13 @@ GRANT test_role TO 'test_user'@'localhost'
GRANT USAGE ON *.* TO 'test_user'@'localhost'
GRANT SELECT ON *.* TO 'test_role'
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
set default role NONE;
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost
connect c1, localhost, test_user,,;
show grants;
@@ -42,7 +42,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'us
disconnect c1;
connection default;
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost
set default role test_role for test_user@localhost;
connect c1, localhost, test_user,,;
@@ -52,7 +52,7 @@ GRANT test_role TO 'test_user'@'localhost'
GRANT USAGE ON *.* TO 'test_user'@'localhost'
GRANT SELECT ON *.* TO 'test_role'
select user, host, default_role from mysql.user where user = 'test_user';
-user host default_role
+User Host default_role
test_user localhost test_role
disconnect c1;
connection default;
diff --git a/mysql-test/suite/roles/set_default_role_ps-6960.result b/mysql-test/suite/roles/set_default_role_ps-6960.result
index c186e7bccb0..505861e89df 100644
--- a/mysql-test/suite/roles/set_default_role_ps-6960.result
+++ b/mysql-test/suite/roles/set_default_role_ps-6960.result
@@ -1,3 +1,4 @@
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
create role r1;
prepare stmt from "set password = '11111111111111111111111111111111111111111'";
execute stmt;
@@ -6,4 +7,4 @@ execute stmt;
set password = '';
set default role NONE;
drop role r1;
-update mysql.user set plugin='';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/suite/roles/set_default_role_ps-6960.test b/mysql-test/suite/roles/set_default_role_ps-6960.test
index 8af95c9e8a0..fd965c2aa75 100644
--- a/mysql-test/suite/roles/set_default_role_ps-6960.test
+++ b/mysql-test/suite/roles/set_default_role_ps-6960.test
@@ -4,6 +4,8 @@
--source include/not_embedded.inc
+select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
+
create role r1;
prepare stmt from "set password = '11111111111111111111111111111111111111111'";
execute stmt;
@@ -13,5 +15,6 @@ execute stmt;
set password = '';
set default role NONE;
drop role r1;
-#cleanup after MDEV-16238
-update mysql.user set plugin='';
+
+#cleanup
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
diff --git a/mysql-test/suite/roles/set_role-database-recursive.result b/mysql-test/suite/roles/set_role-database-recursive.result
index 479e553c3d1..2c8c21d97c3 100644
--- a/mysql-test/suite/roles/set_role-database-recursive.result
+++ b/mysql-test/suite/roles/set_role-database-recursive.result
@@ -5,7 +5,7 @@ grant test_role1 to test_user@localhost;
grant test_role2 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/set_role-database-simple.result b/mysql-test/suite/roles/set_role-database-simple.result
index e21a55edf2e..156a4453b69 100644
--- a/mysql-test/suite/roles/set_role-database-simple.result
+++ b/mysql-test/suite/roles/set_role-database-simple.result
@@ -2,7 +2,7 @@ create user 'test_user'@'localhost';
create role test_role1;
grant test_role1 to test_user@localhost;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_user localhost
select * from mysql.roles_mapping;
diff --git a/mysql-test/suite/roles/set_role-recursive.result b/mysql-test/suite/roles/set_role-recursive.result
index 2b34c3eeebe..0b37b1a3fc8 100644
--- a/mysql-test/suite/roles/set_role-recursive.result
+++ b/mysql-test/suite/roles/set_role-recursive.result
@@ -4,7 +4,7 @@ grant test_role1 to test_user@localhost;
create role test_role2;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/set_role-routine-simple.result b/mysql-test/suite/roles/set_role-routine-simple.result
index 3e17a78ad77..b86bf3045f3 100644
--- a/mysql-test/suite/roles/set_role-routine-simple.result
+++ b/mysql-test/suite/roles/set_role-routine-simple.result
@@ -6,7 +6,7 @@ grant test_role1 to test_user@localhost;
grant test_role3 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_role2
test_role3
diff --git a/mysql-test/suite/roles/set_role-simple.result b/mysql-test/suite/roles/set_role-simple.result
index 9af698c7b09..dec5a0b4436 100644
--- a/mysql-test/suite/roles/set_role-simple.result
+++ b/mysql-test/suite/roles/set_role-simple.result
@@ -2,7 +2,7 @@ create user test_user@localhost;
create role test_role1;
grant test_role1 to test_user@localhost;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_user localhost
select * from mysql.roles_mapping;
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 721bd3039a3..57c6ce01c9f 100644
--- a/mysql-test/suite/roles/set_role-table-column-priv.result
+++ b/mysql-test/suite/roles/set_role-table-column-priv.result
@@ -4,7 +4,7 @@ create role test_role2;
grant test_role1 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/set_role-table-simple.result b/mysql-test/suite/roles/set_role-table-simple.result
index f5688dbe62e..3ecc66ba7f0 100644
--- a/mysql-test/suite/roles/set_role-table-simple.result
+++ b/mysql-test/suite/roles/set_role-table-simple.result
@@ -4,7 +4,7 @@ create role test_role2;
grant test_role1 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/show_grants.result b/mysql-test/suite/roles/show_grants.result
index 5d46b038cf8..31df0113b8e 100644
--- a/mysql-test/suite/roles/show_grants.result
+++ b/mysql-test/suite/roles/show_grants.result
@@ -5,7 +5,7 @@ grant test_role1 to test_user@localhost;
grant test_role2 to test_user@localhost;
grant test_role2 to test_role1;
select user, host from mysql.user where user not like 'root';
-user host
+User Host
test_role1
test_role2
test_user localhost
diff --git a/mysql-test/suite/roles/show_grants_replicated.result b/mysql-test/suite/roles/show_grants_replicated.result
index cb9df65dbbd..7b090c982f0 100644
--- a/mysql-test/suite/roles/show_grants_replicated.result
+++ b/mysql-test/suite/roles/show_grants_replicated.result
@@ -17,7 +17,7 @@ connection slave;
# it's visible in mysql.user and I_S:
#
select user, host, is_role from mysql.user where user in ('u1', 'r1');
-user host is_role
+User Host is_role
r1 Y
u1 % N
select * from information_schema.applicable_roles;
diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def
index d4617398c64..9f43bc3c339 100644
--- a/mysql-test/suite/rpl/disabled.def
+++ b/mysql-test/suite/rpl/disabled.def
@@ -19,3 +19,4 @@ rpl_row_mysqlbinlog : MDEV-11095
rpl_row_index_choice : MDEV-11666
rpl_parallel2 : fails after MDEV-16172
rpl_semi_sync_after_sync : fails after MDEV-16172
+rpl_auto_increment_update_failure : disabled for now
diff --git a/mysql-test/suite/rpl/include/rpl_EE_err.test b/mysql-test/suite/rpl/include/rpl_EE_err.test
index 0b3fec1f605..fa135d12436 100644
--- a/mysql-test/suite/rpl/include/rpl_EE_err.test
+++ b/mysql-test/suite/rpl/include/rpl_EE_err.test
@@ -15,7 +15,7 @@
-- source include/master-slave.inc
eval create table t1 (a int) engine=$engine_type;
-flush tables;
+flush tables t1;
let $MYSQLD_DATADIR= `select @@datadir`;
remove_file $MYSQLD_DATADIR/test/t1.MYI ;
drop table if exists t1;
diff --git a/mysql-test/suite/rpl/include/rpl_row_001.test b/mysql-test/suite/rpl/include/rpl_row_001.test
deleted file mode 100644
index 4df2d793244..00000000000
--- a/mysql-test/suite/rpl/include/rpl_row_001.test
+++ /dev/null
@@ -1,96 +0,0 @@
-let $LOAD_FILE= $MYSQLTEST_VARDIR/std_data/words.dat;
-CREATE TABLE t1 (word CHAR(20) NOT NULL);
---replace_result $LOAD_FILE LOAD_FILE
-eval LOAD DATA INFILE '$LOAD_FILE' INTO TABLE t1;
---replace_result $LOAD_FILE LOAD_FILE
-eval LOAD DATA INFILE '$LOAD_FILE' INTO TABLE t1;
-SELECT * FROM t1 ORDER BY word LIMIT 10;
-
-#
-# Save password row for root
-#
-
-create temporary table tmp select * from mysql.user where host="localhost" and user="root";
-
-#
-# Test slave with wrong password
-#
-
-save_master_pos;
-connection slave;
-sync_with_master;
-STOP SLAVE;
-connection master;
-UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
-connection slave;
-START SLAVE;
-connection master;
-#
-# Give slave time to do at last one failed connect retry
-# This one must be short so that the slave will not stop retrying
-real_sleep 2;
-UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
-# Give slave time to connect (will retry every second)
-
-sleep 2;
-
-CREATE TABLE t3(n INT);
-INSERT INTO t3 VALUES(1),(2);
-sync_slave_with_master;
-SELECT * FROM t3 ORDER BY n;
-SELECT SUM(LENGTH(word)) FROM t1;
-connection master;
-DROP TABLE t1,t3;
-save_master_pos;
-connection slave;
-sync_with_master;
-
-# Test if the slave SQL thread can be more than 16K behind the slave
-# I/O thread (> IO_SIZE)
-
-connection master;
-# we'll use table-level locking to delay slave SQL thread
-eval CREATE TABLE t1 (n INT) ENGINE=$engine_type;
-sync_slave_with_master;
-connection master;
-RESET MASTER;
-connection slave;
-STOP SLAVE;
-RESET SLAVE;
-
-connection master;
-let $1=5000;
-# Generate 16K of relay log
-disable_query_log;
-while ($1)
-{
- eval INSERT INTO t1 VALUES($1);
- dec $1;
-}
-enable_query_log;
-SELECT COUNT(*) FROM t1;
-save_master_pos;
-
-# Try to cause a large relay log lag on the slave by locking t1
-connection slave;
-LOCK TABLES t1 READ;
-START SLAVE;
-UNLOCK TABLES;
-sync_with_master;
-SELECT COUNT(*) FROM t1;
-
-connection master;
-DROP TABLE t1;
-CREATE TABLE t1 (n INT);
-INSERT INTO t1 VALUES(3456);
-sync_slave_with_master;
-SELECT n FROM t1;
-
-connection master;
-DROP TABLE t1;
-
-# resttore old passwords
-replace into mysql.user select * from tmp;
-drop temporary table tmp;
-
-sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/include/rpl_row_annotate.test b/mysql-test/suite/rpl/include/rpl_row_annotate.test
index 317a9c86539..8b4b704cef9 100644
--- a/mysql-test/suite/rpl/include/rpl_row_annotate.test
+++ b/mysql-test/suite/rpl/include/rpl_row_annotate.test
@@ -147,7 +147,7 @@ let $start_pos= `select @binlog_start_pos`;
connection master;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
-FLUSH TABLES;
+FLUSH TABLES test1.t4;
SELECT * FROM test1.t4 ORDER BY a;
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test b/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test
index bad308ff814..03c7b5282a8 100644
--- a/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test
+++ b/mysql-test/suite/rpl/include/rpl_row_delayed_ins.test
@@ -10,7 +10,7 @@ eval create table t1(a int not null primary key) engine=$engine_type;
insert delayed into t1 values (1);
insert delayed into t1 values (2);
insert delayed into t1 values (3);
-flush tables;
+flush tables t1;
SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result
index 1f605935005..0b0ee84229f 100644
--- a/mysql-test/suite/rpl/r/rpl_EE_err.result
+++ b/mysql-test/suite/rpl/r/rpl_EE_err.result
@@ -1,7 +1,7 @@
include/master-slave.inc
[connection master]
create table t1 (a int) engine=myisam;
-flush tables;
+flush tables t1;
drop table if exists t1;
Warnings:
Warning 1017 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
diff --git a/mysql-test/suite/rpl/r/rpl_bug31076.result b/mysql-test/suite/rpl/r/rpl_bug31076.result
index c163cc552ab..8fcbba1c4cd 100644
--- a/mysql-test/suite/rpl/r/rpl_bug31076.result
+++ b/mysql-test/suite/rpl/r/rpl_bug31076.result
@@ -58,7 +58,7 @@ SET @@session.time_zone='UTC'/*!*/;
INSERT INTO visits (myid, user_id, src, ip, cc, org, ref, time, host, entry, visit_exit, visit_start)
VALUES ('3m3l4rhs6do0sf5p1i9lr94g928a272v', '', '', INET_ATON('71.118.124.98'), '', '', 'http://dev.mysql.com/downloads/connector/j/3.0.html', NULL, 'dev.mysql.com', '/get/Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip/from/pick', '/get/Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip/from/pick', NOW())/*!*/;
Warnings:
-Warning 1366 Incorrect integer value: '' for column 'user_id' at row 1
+Warning 1366 Incorrect integer value: '' for column `track`.`visits`.`user_id` at row 1
SELECT * FROM visits;
visits_id myid src ip cc org ref time host entry visit_exit user_id visit_start
21231039 3m3l4rhs6do0sf5p1i9lr94g928a272v 1198947426 http://dev.mysql.com/downloads/connector/j/3.0.html 2007-09-18 03:59:02 dev.mysql.com /get/Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip/from/pick /get/Downloads/Connector-J/mysql-connector-java-3.0.17-ga.zip/from/pick 0 2007-09-18 03:59:02
diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_user.result b/mysql-test/suite/rpl/r/rpl_create_drop_user.result
index f9069530e82..61b351b50df 100644
--- a/mysql-test/suite/rpl/r/rpl_create_drop_user.result
+++ b/mysql-test/suite/rpl/r/rpl_create_drop_user.result
@@ -18,13 +18,13 @@ u2@localhost
disconnect user_a;
connection master;
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
-user password plugin authentication_string
-u1 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
+User Password plugin authentication_string
+u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
u2 mysql_native_password
connection slave;
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
-user password plugin authentication_string
-u1 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
+User Password plugin authentication_string
+u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4
u2 mysql_native_password
connection master;
CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'abcdefghijk2';
@@ -36,13 +36,13 @@ u1@localhost
disconnect user_a;
connection master;
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
-user password plugin authentication_string
-u1 mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
+User Password plugin authentication_string
+u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
u2 mysql_native_password
connection slave;
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
-user password plugin authentication_string
-u1 mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
+User Password plugin authentication_string
+u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
u2 mysql_native_password
connection master;
CREATE USER u1@localhost;
@@ -51,8 +51,8 @@ DROP USER u3@localhost;
ERROR HY000: Operation DROP USER failed for 'u3'@'localhost'
connection slave;
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
-user password plugin authentication_string
-u1 mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
+User Password plugin authentication_string
+u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E
u2 mysql_native_password
connection master;
DROP USER IF EXISTS u1@localhost;
@@ -62,5 +62,5 @@ Warnings:
Note 1974 Can't drop user 'u3'@'localhost'; it doesn't exist
connection slave;
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ;
-user password plugin authentication_string
+User Password plugin authentication_string
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
index d74fd07189c..b31eacfc236 100644
--- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
+++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result
@@ -25,8 +25,6 @@ connection slave;
connection slave;
SHOW TABLES in mysqltest;
Tables_in_mysqltest
-t
-t1
SHOW EVENTS in mysqltest;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
mysqltest e root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/suite/rpl/r/rpl_ddl.result b/mysql-test/suite/rpl/r/rpl_ddl.result
index 68c5e91f42e..22ce9a288c1 100644
--- a/mysql-test/suite/rpl/r/rpl_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_ddl.result
@@ -1354,11 +1354,11 @@ MAX(f1)
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
connection master;
SELECT user FROM mysql.user WHERE user = 'user1';
-user
+User
user1
connection slave;
SELECT user FROM mysql.user WHERE user = 'user1';
-user
+User
user1
connection master;
@@ -1399,11 +1399,11 @@ MAX(f1)
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
connection master;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
rename1
connection slave;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
rename1
connection master;
@@ -1444,10 +1444,10 @@ MAX(f1)
TEST-INFO: SLAVE: The INSERT is committed (Succeeded)
connection master;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
connection slave;
SELECT user FROM mysql.user WHERE user = 'rename1';
-user
+User
use test;
connection master;
DROP TEMPORARY TABLE mysqltest1.t22;
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result
index 9f6328bce8e..5fa1002f9ac 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -1,14 +1,6 @@
include/master-slave.inc
[connection master]
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
-connection slave;
-delete from mysql.user where user=_binary'rpl_ignore_grant';
-delete from mysql.db where user=_binary'rpl_ignore_grant';
-flush privileges;
-connection master;
create user rpl_do_grant@localhost;
grant select on *.* to rpl_do_grant@localhost;
grant drop on test.* to rpl_do_grant@localhost;
@@ -20,11 +12,11 @@ GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost'
connection master;
set password for rpl_do_grant@localhost=password("does it work?");
connection slave;
-select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
-authentication_string<>_binary''
+select authentication_string<>'' from mysql.user where user='rpl_do_grant';
+authentication_string<>''
1
connection master;
-update mysql.user set authentication_string='' where user='rpl_do_grant';
+update mysql.global_priv set priv=json_remove(priv, '$.authentication_string') where user='rpl_do_grant';
flush privileges;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
authentication_string<>''
@@ -37,13 +29,8 @@ select authentication_string<>'' from mysql.user where user='rpl_do_grant';
authentication_string<>''
1
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
+drop user rpl_do_grant@localhost;
connection slave;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
connection master;
show grants for rpl_do_grant@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
@@ -328,5 +315,6 @@ Grantor
root@localhost
connection master;
DROP USER user_bug27606@localhost;
-update mysql.user set plugin='';
+select priv into @root_priv from mysql.global_priv where user='root' and host='127.0.0.1';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
index b59c21724b2..3aa7c07a845 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
@@ -194,7 +194,7 @@ INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
insert ignore into t31 set f1=1, f2=1, f3=2, f4='second',
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
Warnings:
-Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
+Warning 1366 Incorrect integer value: 'seven samurai' for column `test`.`t31`.`f10` at row 1
insert ignore into t31 values (1, 1, 3, 'third',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
index b9d254e1b42..0918364b28e 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
@@ -194,7 +194,7 @@ INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
insert ignore into t31 set f1=1, f2=1, f3=2, f4='second',
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
Warnings:
-Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
+Warning 1366 Incorrect integer value: 'seven samurai' for column `test`.`t31`.`f10` at row 1
insert ignore into t31 values (1, 1, 3, 'third',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result
index 0f546f7edc4..274a8505fb8 100644
--- a/mysql-test/suite/rpl/r/rpl_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_grant.result
@@ -4,7 +4,7 @@ connection master;
CREATE USER dummy@localhost;
CREATE USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
dummy localhost
dummy1 localhost
dummy2 localhost
@@ -14,7 +14,7 @@ COUNT(*)
connection slave;
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
dummy localhost
dummy1 localhost
dummy2 localhost
@@ -28,13 +28,13 @@ DROP USER nonexisting@localhost, dummy@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
connection slave;
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
-user host
+User Host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result
index 00307a8c104..5dffdd9809c 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result
@@ -16,36 +16,32 @@ INSERT INTO t1 VALUES (1);
connection slave;
connection slave;
include/stop_slave.inc
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,gtid_slave_pos_simulate_failed_delete";
SET sql_log_bin= 0;
-CALL mtr.add_suppression("Can't find file");
+CALL mtr.add_suppression("<DEBUG> Error deleting old GTID row");
SET sql_log_bin= 1;
include/start_slave.inc
connection master;
-INSERT INTO t1 VALUES (2);
-connection slave;
-include/wait_for_slave_sql_error.inc [errno=1942]
-STOP SLAVE IO_THREAD;
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
-ORDER BY domain_id, sub_id DESC LIMIT 1;
-domain_id server_id seq_no
-0 1 3
+connection slave;
+SELECT COUNT(*), MAX(seq_no) INTO @pre_count, @pre_max_seq_no
+FROM mysql.gtid_slave_pos;
+SELECT IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count));
+IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count))
+OK
SET GLOBAL debug_dbug= @old_dbug;
-include/start_slave.inc
connection master;
-INSERT INTO t1 VALUES (3);
-connection slave;
-connection slave;
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
-ORDER BY domain_id, sub_id DESC LIMIT 1;
-domain_id server_id seq_no
-0 1 4
-SELECT * FROM t1 ORDER BY i;
-i
-1
-2
-3
+connection slave;
+connection slave;
+SELECT IF(COUNT(*) >= 1, "OK", CONCAT("Error: too few rows seen after errors no longer injected: ", COUNT(*)))
+FROM mysql.gtid_slave_pos
+WHERE seq_no <= @pre_max_seq_no;
+IF(COUNT(*) >= 1, "OK", CONCAT("Error: too few rows seen after errors no longer injected: ", COUNT(*)))
+OK
connection master;
DROP TABLE t1;
+connection slave;
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
index 1647b6c998c..50f24d56e9a 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
@@ -171,7 +171,7 @@ include/start_slave.inc
*** MDEV-4692: mysql.gtid_slave_pos accumulates values for a domain ***
SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id COUNT(*)
-0 2
+0 3
1 2
connection server_1;
INSERT INTO t1 VALUES (11);
@@ -179,7 +179,7 @@ connection server_2;
FLUSH NO_WRITE_TO_BINLOG TABLES;
SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id COUNT(*)
-0 2
+0 4
1 2
include/start_slave.inc
connection server_1;
@@ -189,8 +189,8 @@ connection server_2;
FLUSH NO_WRITE_TO_BINLOG TABLES;
SELECT domain_id, COUNT(*) FROM mysql.gtid_slave_pos GROUP BY domain_id;
domain_id COUNT(*)
-0 2
-1 2
+0 3
+1 1
*** MDEV-4650: show variables; ERROR 1946 (HY000): Failed to load replication slave GTID position ***
connection server_2;
SET sql_log_bin=0;
diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result
index a9485ca8933..09e084ce448 100644
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result
@@ -79,8 +79,25 @@ a
-3
1
include/check_slave_no_error.inc
+connection slave;
+drop table t1, t2;
connection master;
DROP TABLE t1, t2;
connection slave;
+include/check_slave_no_error.inc
+create database d;
+create database e;
+connection master;
+create database d;
+create database if not exists e;
+connection slave;
+include/check_slave_no_error.inc
+drop database d;
+drop database e;
+connection master;
+drop database d;
+drop database if exists e;
+connection slave;
+include/check_slave_no_error.inc
SET @@global.slave_exec_mode= @old_slave_exec_mode;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result
index c86f2f4e4df..cc65d9dacfd 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result
@@ -4,26 +4,26 @@ connection master;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
-select_priv
+Select_priv
N
connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;
-select_priv
+Select_priv
N
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */;
-select_priv
+Select_priv
Y
connection master;
revoke select on *.* from 'user_foo';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
-select_priv
+Select_priv
N
connection slave;
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */;
-select_priv
+Select_priv
Y
connection slave;
revoke select on *.* FROM 'user_foo';
diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result
index 4eeb333d10c..511eff51d22 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result
@@ -1,7 +1,7 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Can't find record in 't.'");
-call mtr.add_suppression("Can't find record in 'user'");
+call mtr.add_suppression("Can't find record in 'global_priv'");
call mtr.add_suppression("Can't find record in 'tables_priv'");
**** Test case for BUG#16487 ****
connection master;
@@ -32,12 +32,7 @@ to mysqltest3@localhost;
create database mysqltest2;
create table mysqltest2.t2 (id int);
GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass';
-insert into mysql.user (user, host) values ("mysqltest5", "somehost");
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
+insert into mysql.global_priv (user, host) values ("mysqltest5", "somehost");
GRANT SELECT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON *.* TO mysqltest6@localhost;
GRANT INSERT ON test.* TO mysqltest6@localhost;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
index 45742c989c4..89f59deae73 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -481,77 +481,78 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
******************** CREATE USER ********************
CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection master;
******************** GRANT ********************
GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 Y
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 Y
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 Y
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 Y
connection master;
******************** REVOKE ********************
REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *1111111111111111111111111111111111111111 mysql_native_password *1111111111111111111111111111111111111111 N
connection master;
******************** SET PASSWORD ********************
SET PASSWORD FOR 'user_test_rpl'@'localhost' = '*0000000000000000000000000000000000000000';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection master;
******************** RENAME USER ********************
RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
-localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N
+Host User Password plugin authentication_string Select_priv
+localhost user_test_rpl_2 *0000000000000000000000000000000000000000 mysql_native_password *0000000000000000000000000000000000000000 N
connection master;
******************** DROP USER ********************
DROP USER 'user_test_rpl_2'@'localhost';
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
connection slave;
USE test_rpl;
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
-host user password plugin authentication_string select_priv
+Host User Password plugin authentication_string Select_priv
connection master;
INSERT INTO t1 VALUES(100, 'test');
******************** ANALYZE ********************
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test_rpl.t1 analyze status Engine-independent statistics collected
test_rpl.t1 analyze status OK
******************** CHECK TABLE ********************
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
index f900a8b0e9a..e768c5c6f7c 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
@@ -30,6 +30,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
Table Op Msg_type Msg_text
+test.nt_1 analyze status Engine-independent statistics collected
test.nt_1 analyze status Table is already up to date
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
diff --git a/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result b/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
new file mode 100644
index 00000000000..bedd103c2a0
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_mysql57_stm_temporal_round.result
@@ -0,0 +1,22 @@
+#
+# MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+#
+include/master-slave.inc
+[connection master]
+connection slave;
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+include/stop_slave.inc
+connection master;
+include/rpl_stop_server.inc [server_number=1]
+include/rpl_start_server.inc [server_number=1]
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+include/start_slave.inc
+connection master;
+connection slave;
+SELECT * FROM t1 ORDER BY id;
+id a
+1 2001-01-01 00:00:01.000
+include/stop_slave.inc
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result b/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
new file mode 100644
index 00000000000..23b3217895a
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_mysql80_stm_temporal_round.result
@@ -0,0 +1,23 @@
+#
+# MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+#
+include/master-slave.inc
+[connection master]
+connection slave;
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+include/stop_slave.inc
+connection master;
+include/rpl_stop_server.inc [server_number=1]
+include/rpl_start_server.inc [server_number=1]
+connection slave;
+CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+include/start_slave.inc
+connection master;
+connection slave;
+SELECT * FROM t1 ORDER BY id;
+id a
+1 2001-01-01 00:00:01.000
+2 2001-01-01 00:00:00.999
+include/stop_slave.inc
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
index d994e4fdef6..9258deadaca 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel.result
@@ -1517,6 +1517,7 @@ SET SESSION debug_dbug="+d,binlog_force_commit_id";
SET @commit_id= 10000;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t3 VALUES (120, 0);
SET @commit_id= 10001;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
index ca202a66b0e..bf7a8192f56 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
@@ -12,6 +12,8 @@ SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 1000000;
connection server_1;
INSERT INTO t1 VALUES(1,1);
BEGIN;
@@ -131,6 +133,11 @@ c
204
205
206
+SELECT IF(COUNT(*) >= 30, "OK", CONCAT("Error: too few old rows found: ", COUNT(*)))
+FROM mysql.gtid_slave_pos;
+IF(COUNT(*) >= 30, "OK", CONCAT("Error: too few old rows found: ", COUNT(*)))
+OK
+SET GLOBAL gtid_cleanup_batch_size=1;
*** Test @@skip_parallel_replication. ***
connection server_2;
include/stop_slave.inc
@@ -358,6 +365,7 @@ connection server_1;
ALTER TABLE t2 COMMENT "123abc";
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
INSERT INTO t1 VALUES (1,2);
INSERT INTO t1 VALUES (2,2);
@@ -478,6 +486,7 @@ SET @old_server_id= @@SESSION.server_id;
SET SESSION server_id= 100;
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SET SESSION server_id= @old_server_id;
INSERT INTO t1 VALUES (37,0);
@@ -651,9 +660,10 @@ DROP TABLE t1, t2, t3;
include/save_master_gtid.inc
connection server_2;
include/sync_with_master_gtid.inc
-Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos
-select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id;
-count(4) <= 4
+SELECT COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
+FROM mysql.gtid_slave_pos;
+COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
1
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
connection server_1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
index f6c7e4ad54e..5230283fd6c 100644
--- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result
+++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
@@ -79,10 +79,10 @@ load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated
Warnings:
Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
-Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
+Warning 1366 Incorrect integer value: 'error ' for column `test`.`t1`.`a` at row 3
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
Note 1265 Data truncated for column 'a' at row 4
-Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5
+Warning 1366 Incorrect integer value: 'wrong end ' for column `test`.`t1`.`a` at row 5
Warning 1262 Row 5 was truncated; it contained more data than there were input columns
connection slave;
connection slave;
@@ -101,7 +101,7 @@ Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
Note 1265 Data truncated for column 'a' at row 3
Warning 1366 Incorrect integer value: '
-' for column 'a' at row 4
+' for column `test`.`t1`.`a` at row 4
Warning 1261 Row 4 doesn't contain data for all columns
connection slave;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result
index f7684d5ad97..976ac0996bf 100644
--- a/mysql-test/suite/rpl/r/rpl_row_001.result
+++ b/mysql-test/suite/rpl/r/rpl_row_001.result
@@ -1,44 +1,6 @@
include/master-slave.inc
[connection master]
-CREATE TABLE t1 (word CHAR(20) NOT NULL);
-LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
-LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
-SELECT * FROM t1 ORDER BY word LIMIT 10;
-word
-Aarhus
-Aarhus
-Aarhus
-Aarhus
-Aaron
-Aaron
-Aaron
-Aaron
-Ababa
-Ababa
-create temporary table tmp select * from mysql.user where host="localhost" and user="root";
-connection slave;
-STOP SLAVE;
-connection master;
-UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root';
-connection slave;
-START SLAVE;
-connection master;
-UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root';
-CREATE TABLE t3(n INT);
-INSERT INTO t3 VALUES(1),(2);
-connection slave;
-SELECT * FROM t3 ORDER BY n;
-n
-1
-2
-SELECT SUM(LENGTH(word)) FROM t1;
-SUM(LENGTH(word))
-1022
-connection master;
-DROP TABLE t1,t3;
-connection slave;
-connection master;
-CREATE TABLE t1 (n INT) ENGINE=MYISAM;
+CREATE TABLE t1 (n INT);
connection slave;
connection master;
RESET MASTER;
@@ -66,7 +28,5 @@ n
3456
connection master;
DROP TABLE t1;
-replace into mysql.user select * from tmp;
-drop temporary table tmp;
connection slave;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_annotate_do.result b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result
index 52f7b180fae..ba1922566bf 100644
--- a/mysql-test/suite/rpl/r/rpl_row_annotate_do.result
+++ b/mysql-test/suite/rpl/r/rpl_row_annotate_do.result
@@ -180,7 +180,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
connection master;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
-FLUSH TABLES;
+FLUSH TABLES test1.t4;
SELECT * FROM test1.t4 ORDER BY a;
a b
1 1
diff --git a/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result
index c657cf2fbb5..65535d5d417 100644
--- a/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result
+++ b/mysql-test/suite/rpl/r/rpl_row_annotate_dont.result
@@ -160,7 +160,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
connection master;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
-FLUSH TABLES;
+FLUSH TABLES test1.t4;
SELECT * FROM test1.t4 ORDER BY a;
a b
1 1
diff --git a/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff b/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff
new file mode 100644
index 00000000000..2ff34004702
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_big_table_id,32bit.rdiff
@@ -0,0 +1,31 @@
+--- r/rpl_row_big_table_id.result 2019-01-23 19:58:07.204914873 +0200
++++ r/rpl_row_big_table_id_32bit.result 2019-01-23 19:43:54.590640934 +0200
+@@ -22,22 +22,22 @@
+ master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
+ master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+ master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 1
+-master-bin.000002 # Table_map 1 # table_id: 4294967298 (test.t)
+-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967298 flags: STMT_END_F
++master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t)
++master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
+ master-bin.000002 # Query 1 # COMMIT
+ master-bin.000002 # Gtid 1 # GTID #-#-#
+ master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
+ master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+ master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 2
+-master-bin.000002 # Table_map 1 # table_id: 4294967299 (test.t)
+-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967299 flags: STMT_END_F
++master-bin.000002 # Table_map 1 # table_id: 1 (test.t)
++master-bin.000002 # Write_rows_v1 1 # table_id: 1 flags: STMT_END_F
+ master-bin.000002 # Query 1 # COMMIT
+ master-bin.000002 # Gtid 1 # GTID #-#-#
+ master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
+ master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+ master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 3
+-master-bin.000002 # Table_map 1 # table_id: 4294967300 (test.t)
+-master-bin.000002 # Write_rows_v1 1 # table_id: 4294967300 flags: STMT_END_F
++master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t)
++master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
+ master-bin.000002 # Query 1 # COMMIT
+ connection slave;
+ connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_big_table_id.result b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
new file mode 100644
index 00000000000..7a0a964dc5e
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result
@@ -0,0 +1,46 @@
+include/master-slave.inc
+[connection master]
+connection master;
+include/rpl_restart_server.inc [server_number=1]
+SET @@debug_dbug="d,simulate_big_table_id";
+CREATE TABLE t (a int);
+INSERT INTO t SET a= 0;
+ALTER TABLE t comment '';
+INSERT INTO t SET a= 1;
+ALTER TABLE t comment '';
+INSERT INTO t SET a= 2;
+ALTER TABLE t comment '';
+INSERT INTO t SET a= 3;
+show binlog events in <file> from <pos>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 0
+master-bin.000002 # Table_map 1 # table_id: 4294967294 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967294 flags: STMT_END_F
+master-bin.000002 # Query 1 # COMMIT
+master-bin.000002 # Gtid 1 # GTID #-#-#
+master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
+master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 1
+master-bin.000002 # Table_map 1 # table_id: 4294967298 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967298 flags: STMT_END_F
+master-bin.000002 # Query 1 # COMMIT
+master-bin.000002 # Gtid 1 # GTID #-#-#
+master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
+master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 2
+master-bin.000002 # Table_map 1 # table_id: 4294967299 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967299 flags: STMT_END_F
+master-bin.000002 # Query 1 # COMMIT
+master-bin.000002 # Gtid 1 # GTID #-#-#
+master-bin.000002 # Query 1 # use `test`; ALTER TABLE t comment ''
+master-bin.000002 # Gtid 1 # BEGIN GTID #-#-#
+master-bin.000002 # Annotate_rows 1 # INSERT INTO t SET a= 3
+master-bin.000002 # Table_map 1 # table_id: 4294967300 (test.t)
+master-bin.000002 # Write_rows_v1 1 # table_id: 4294967300 flags: STMT_END_F
+master-bin.000002 # Query 1 # COMMIT
+connection slave;
+connection master;
+DROP TABLE t;
+connection slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
index 978c3d30dbd..4d439c202f5 100644
--- a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
+++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result
@@ -5,7 +5,7 @@ create table t1(a int not null primary key) engine=myisam;
insert delayed into t1 values (1);
insert delayed into t1 values (2);
insert delayed into t1 values (3);
-flush tables;
+flush tables t1;
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
index ef393873b97..a2f3bb44ae1 100644
--- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
@@ -30,6 +30,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
Table Op Msg_type Msg_text
+test.nt_1 analyze status Engine-independent statistics collected
test.nt_1 analyze status Table is already up to date
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result
index 47567ef7b72..9ef2ca3bc53 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_000001.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result
@@ -19,12 +19,12 @@ abandons
connection slave;
stop slave;
connection master;
-create temporary table tmp select * from mysql.user where host="localhost" and user="root";
+create temporary table tmp select * from mysql.global_priv where host="localhost" and user="root";
set password for root@"localhost" = password('foo');
connection slave;
start slave;
connection master;
-replace into mysql.user select * from tmp;
+replace into mysql.global_priv select * from tmp;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave
drop temporary table tmp;
@@ -43,7 +43,7 @@ connection master;
drop table t1,t3;
connection slave;
connection master;
-create table t1 (n int) engine=myisam;
+create table t1 (n int);
connection slave;
connection master;
reset master;
@@ -81,31 +81,4 @@ count(*)
5000
connection master1;
drop table t1;
-create table t1 (n int);
-insert into t1 values(3456);
-insert ignore into mysql.user (Host, User, Password)
-VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
-Warnings:
-Warning 1364 Field 'ssl_cipher' doesn't have a default value
-Warning 1364 Field 'x509_issuer' doesn't have a default value
-Warning 1364 Field 'x509_subject' doesn't have a default value
-Warning 1364 Field 'authentication_string' doesn't have a default value
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-select_priv user
-N blafasel2
-update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-select_priv user
-Y blafasel2
-connection slave;
-select n from t1;
-n
-3456
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-select_priv user
-Y blafasel2
-connection master1;
-drop table t1;
-delete from mysql.user where user="blafasel2";
-connection slave;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
index f900a8b0e9a..e768c5c6f7c 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
@@ -30,6 +30,7 @@ test.tt_2 preload_keys note The storage engine for the table doesn't support pre
INSERT INTO tt_1(ddl_case) VALUES (39);
ANALYZE TABLE nt_1;
Table Op Msg_type Msg_text
+test.nt_1 analyze status Engine-independent statistics collected
test.nt_1 analyze status Table is already up to date
INSERT INTO tt_1(ddl_case) VALUES (38);
CHECK TABLE nt_1;
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_round.result b/mysql-test/suite/rpl/r/rpl_temporal_round.result
new file mode 100644
index 00000000000..df8cc431a74
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_temporal_round.result
@@ -0,0 +1,50 @@
+include/master-slave.inc
+[connection master]
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+CREATE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES ('2011-01-01 23:59:59.999999');
+CREATE TABLE t2 (id SERIAL, a DATETIME(4));
+INSERT INTO t2 (a) VALUES (now(6));
+INSERT INTO t2 (a) VALUES ('2011-01-01 23:59:59.999999');
+CREATE TABLE t3 (id SERIAL, a TIME(4));
+INSERT INTO t3 (a) VALUES (now(6));
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+INSERT INTO t3 (a) VALUES ('2011-01-01 23:59:59.999999');
+Warnings:
+Note 1265 Data truncated for column 'a' at row 1
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t2;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t3;
+id a
+1 24:00:00.0000
+2 24:00:00.0000
+connection slave;
+connection slave;
+SET time_zone='+00:00';
+SELECT * FROM t1;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t2;
+id a
+1 2011-01-01 00:00:00.0000
+2 2011-01-02 00:00:00.0000
+SELECT * FROM t3;
+id a
+1 24:00:00.0000
+2 24:00:00.0000
+connection master;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
index e8e95ab7c4c..45070949f79 100644
--- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
+++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
@@ -145,43 +145,43 @@ UNLOCK TABLE;
DROP DATABASE mysqltest2;
LOCK TABLE t1 WRITE;
CREATE USER test_1@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("CREATE USER test_1@localhost with table locked");
UNLOCK TABLE;
CREATE USER test_2@localhost;
LOCK TABLE t1 WRITE;
GRANT SELECT ON t1 TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT select on table to user with table locked");
GRANT ALL ON f2 TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT ALL ON f2 TO test_2 with table locked");
GRANT ALL ON p2 TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT ALL ON p2 TO test_2 with table locked");
GRANT USAGE ON *.* TO test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("GRANT USAGE ON *.* TO test_2 with table locked");
REVOKE ALL PRIVILEGES ON f2 FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE ALL PRIVILEGES on function to user with table locked");
REVOKE ALL PRIVILEGES ON p2 FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE ALL PRIVILEGES on procedure to user with table locked");
REVOKE ALL PRIVILEGES ON t1 FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'tables_priv' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE ALL PRIVILEGES on table to user with table locked");
REVOKE USAGE ON *.* FROM test_2@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("REVOKE USAGE ON *.* TO test_2 with table locked");
RENAME USER test_2@localhost TO test_3@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("RENAME USER test_2 TO test_3 with table locked");
UNLOCK TABLE;
RENAME USER test_2@localhost TO test_3@localhost;
LOCK TABLE t1 WRITE;
DROP USER test_3@localhost;
-ERROR HY000: Table 'user' was not locked with LOCK TABLES
+ERROR HY000: Table 'db' was not locked with LOCK TABLES
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
UNLOCK TABLE;
CREATE DATABASE db;
diff --git a/mysql-test/suite/rpl/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result
index 34f15d41209..2a8bf69501c 100644
--- a/mysql-test/suite/rpl/r/rpl_user.result
+++ b/mysql-test/suite/rpl/r/rpl_user.result
@@ -31,6 +31,13 @@ Host User
fakehost barbar
fakehost foofoo
connection master;
+alter user 'foofoo'@'fakehost' identified by 'foo';
+alter user 'non_exist_user1'@'fakehost' identified by 'foo', 'barbar'@'fakehost' identified by 'bar';
+ERROR HY000: Operation ALTER USER failed for 'non_exist_user1'@'fakehost'
+alter user 'non_exist_user1'@'fakehost' identified by 'foo', 'non_exist_user2'@'fakehost' identified by 'bar';
+ERROR HY000: Operation ALTER USER failed for 'non_exist_user1'@'fakehost','non_exist_user2'@'fakehost'
+connection slave;
+connection master;
drop user 'foofoo'@'fakehost';
drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost';
ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost'
@@ -51,6 +58,10 @@ master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofo
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost'
master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; alter user 'foofoo'@'fakehost' identified by 'foo'
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; alter user 'non_exist_user1'@'fakehost' identified by 'foo', 'barbar'@'fakehost' identified by 'bar'
+master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost'
diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test
index ba70eda6358..1350585ff93 100644
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test
@@ -3,18 +3,6 @@
-- source include/master-slave.inc
-# do not be influenced by other tests.
-connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
-sync_slave_with_master;
-# if these DELETE did nothing on the master, we need to do them manually on the
-# slave.
-delete from mysql.user where user=_binary'rpl_ignore_grant';
-delete from mysql.db where user=_binary'rpl_ignore_grant';
-flush privileges;
-
# test replication of GRANT
connection master;
create user rpl_do_grant@localhost;
@@ -27,13 +15,13 @@ show grants for rpl_do_grant@localhost;
connection master;
set password for rpl_do_grant@localhost=password("does it work?");
sync_slave_with_master;
-select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
+select authentication_string<>'' from mysql.user where user='rpl_do_grant';
#
# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
#
connection master;
-update mysql.user set authentication_string='' where user='rpl_do_grant';
+update mysql.global_priv set priv=json_remove(priv, '$.authentication_string') where user='rpl_do_grant';
flush privileges;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
set sql_mode='ANSI_QUOTES';
@@ -42,18 +30,10 @@ set sql_mode='';
sync_slave_with_master;
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
-
# clear what we have done, to not influence other tests.
connection master;
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
+drop user rpl_do_grant@localhost;
sync_slave_with_master;
-# The mysql database is not replicated, so we have to do the deletes
-# manually on the slave as well.
-delete from mysql.user where user=_binary'rpl_do_grant';
-delete from mysql.db where user=_binary'rpl_do_grant';
-flush privileges;
# End of 4.1 tests
@@ -363,6 +343,8 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
--connection master
DROP USER user_bug27606@localhost;
-update mysql.user set plugin='';
+select priv into @root_priv from mysql.global_priv where user='root' and host='127.0.0.1';
+update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
+
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test
index 5cf28b6e49a..3c5542f4b2f 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test
@@ -162,6 +162,7 @@ EOF
wait
EOF
START SLAVE;
+--error 0,2006,2013
SET GLOBAL debug_dbug="+d,crash_commit_before";
--connection server_1
@@ -186,6 +187,7 @@ EOF
wait
EOF
START SLAVE;
+--error 0,2006,2013
SET GLOBAL debug_dbug="+d,crash_commit_after";
--connection server_1
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test
index 1e5d1abbb3b..5c17653da8a 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test
@@ -28,37 +28,79 @@ INSERT INTO t1 VALUES (1);
# Inject an artificial error deleting entries, and check that the error handling code works.
--connection slave
--source include/stop_slave.inc
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,gtid_slave_pos_simulate_failed_delete";
SET sql_log_bin= 0;
-CALL mtr.add_suppression("Can't find file");
+CALL mtr.add_suppression("<DEBUG> Error deleting old GTID row");
SET sql_log_bin= 1;
--source include/start_slave.inc
--connection master
-INSERT INTO t1 VALUES (2);
+--disable_query_log
+let $i = 20;
+while ($i) {
+ eval INSERT INTO t1 VALUES ($i+10);
+ dec $i;
+}
+--enable_query_log
+--save_master_pos
--connection slave
---let $slave_sql_errno= 1942
---source include/wait_for_slave_sql_error.inc
-STOP SLAVE IO_THREAD;
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
- ORDER BY domain_id, sub_id DESC LIMIT 1;
+--sync_with_master
+
+# Now wait for the slave background thread to try to delete old rows and
+# hit the error injection.
+--let _TEST_MYSQLD_ERROR_LOG=$MYSQLTEST_VARDIR/log/mysqld.2.err
+--perl
+ open F, '<', $ENV{'_TEST_MYSQLD_ERROR_LOG'} or die;
+ outer: while (1) {
+ inner: while (<F>) {
+ last outer if /<DEBUG> Error deleting old GTID row/;
+ }
+ # Easy way to do sub-second sleep without extra modules.
+ select(undef, undef, undef, 0.1);
+ }
+EOF
+
+# Since we injected error in the cleanup code, the rows should remain in
+# mysql.gtid_slave_pos. Check that we have at least 20 (more robust against
+# non-deterministic cleanup and future changes than checking for exact number).
+SELECT COUNT(*), MAX(seq_no) INTO @pre_count, @pre_max_seq_no
+ FROM mysql.gtid_slave_pos;
+SELECT IF(@pre_count >= 20, "OK", CONCAT("Error: too few rows seen while errors injected: ", @pre_count));
SET GLOBAL debug_dbug= @old_dbug;
---source include/start_slave.inc
--connection master
-INSERT INTO t1 VALUES (3);
+--disable_query_log
+let $i = 20;
+while ($i) {
+ eval INSERT INTO t1 VALUES ($i+40);
+ dec $i;
+}
+--enable_query_log
--sync_slave_with_master
--connection slave
-SELECT domain_id, server_id, seq_no FROM mysql.gtid_slave_pos
- ORDER BY domain_id, sub_id DESC LIMIT 1;
-SELECT * FROM t1 ORDER BY i;
-
+# Now check that 1) rows are being deleted again after removing error
+# injection, and 2) old rows are left that failed their delete while errors
+# where injected (again compensating for non-deterministic deletion).
+# Deletion is async and slightly non-deterministic, so we wait for at
+# least 10 of the 20 new rows to be deleted.
+let $wait_condition=
+ SELECT COUNT(*) <= 20-10
+ FROM mysql.gtid_slave_pos
+ WHERE seq_no > @pre_max_seq_no;
+--source include/wait_condition.inc
+SELECT IF(COUNT(*) >= 1, "OK", CONCAT("Error: too few rows seen after errors no longer injected: ", COUNT(*)))
+ FROM mysql.gtid_slave_pos
+ WHERE seq_no <= @pre_max_seq_no;
# Clean up
--connection master
DROP TABLE t1;
+--connection slave
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test
index fcfe6f65e6d..12dec236d45 100644
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test
@@ -77,9 +77,30 @@ SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
--source include/check_slave_no_error.inc
+connection slave;
+drop table t1, t2;
+
connection master;
DROP TABLE t1, t2;
sync_slave_with_master;
+--source include/check_slave_no_error.inc
+create database d;
+create database e;
+
+connection master;
+create database d;
+create database if not exists e;
+
+sync_slave_with_master;
+--source include/check_slave_no_error.inc
+drop database d;
+drop database e;
+
+connection master;
+drop database d;
+drop database if exists e;
+sync_slave_with_master;
+--source include/check_slave_no_error.inc
SET @@global.slave_exec_mode= @old_slave_exec_mode;
diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test
index 3360b789475..a3fcfc95901 100644
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test
@@ -3,7 +3,7 @@ source include/have_collation.inc;
source include/master-slave.inc;
call mtr.add_suppression("Can't find record in 't.'");
-call mtr.add_suppression("Can't find record in 'user'");
+call mtr.add_suppression("Can't find record in 'global_priv'");
call mtr.add_suppression("Can't find record in 'tables_priv'");
#
@@ -69,7 +69,7 @@ create table mysqltest2.t2 (id int);
GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass';
# Create a grant manually
-insert into mysql.user (user, host) values ("mysqltest5", "somehost");
+insert into mysql.global_priv (user, host) values ("mysqltest5", "somehost");
# Partial replicate 3 with *.*
GRANT SELECT ON *.* TO mysqltest6@localhost;
diff --git a/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test b/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test
new file mode 100644
index 00000000000..675b7db0603
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test
@@ -0,0 +1,58 @@
+--source include/have_binlog_format_statement.inc
+
+--echo #
+--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+--echo #
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection slave
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+--source include/stop_slave.inc
+
+--connection master
+--let $datadir= `SELECT @@datadir`
+
+--let $rpl_server_number= 1
+--source include/rpl_stop_server.inc
+
+--remove_file $datadir/master-bin.000001
+
+#
+# Simulate MySQL 5.7.x master
+#
+# mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded against a
+# table with this structure:
+#CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+# (note, the CREATE statement is not inside the binary log)
+#
+# using this command line:
+# mysqld --log-bin --binlog-format=statement
+# with the following single SQL statement:
+#
+#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
+#
+
+--copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001 $datadir/master-bin.000001
+
+--let $rpl_server_number= 1
+--source include/rpl_start_server.inc
+
+--source include/wait_until_connected_again.inc
+
+--connection slave
+--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
+eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+
+--source include/start_slave.inc
+
+--connection master
+--sync_slave_with_master
+SELECT * FROM t1 ORDER BY id;
+
+--source include/stop_slave.inc
+DROP TABLE t1;
+
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test b/mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test
new file mode 100644
index 00000000000..ad6df9d9993
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mysql80_stm_temporal_round.test
@@ -0,0 +1,62 @@
+--source include/have_binlog_format_statement.inc
+
+--echo #
+--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
+--echo #
+
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--connection slave
+CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+--source include/stop_slave.inc
+
+--connection master
+--let $datadir= `SELECT @@datadir`
+
+--let $rpl_server_number= 1
+--source include/rpl_stop_server.inc
+
+--remove_file $datadir/master-bin.000001
+
+#
+# Simulate MySQL 8.0.x master
+#
+# mysql-8.0.13-stm-temporal-round-binlog.000001 was recorded against a
+# table with this structure:
+#CREATE TABLE t1 (id SERIAL, a DATETIME(3));
+# (note, the CREATE statement is not inside the binary log)
+#
+# using this command line:
+# mysqld --log-bin --binlog-format=statement --server-id=1 --character-set-server=latin1
+# with the following SQL script:
+#
+#SET NAMES latin1 COLLATE latin1_swedish_ci;
+#SET sql_mode='';
+#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
+#SET sql_mode=TIME_TRUNCATE_FRACTIONAL;
+#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
+#
+
+--copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001 $datadir/master-bin.000001
+
+--let $rpl_server_number= 1
+--source include/rpl_start_server.inc
+
+--source include/wait_until_connected_again.inc
+
+--connection slave
+--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
+eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
+
+--source include/start_slave.inc
+
+--connection master
+--sync_slave_with_master
+SELECT * FROM t1 ORDER BY id;
+
+--source include/stop_slave.inc
+DROP TABLE t1;
+
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
index e08472d5f51..0060cf4416c 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -21,6 +21,10 @@ SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_use_gtid=slave_pos;
SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode;
SET GLOBAL slave_parallel_mode='optimistic';
+# Run the first part of the test with high batch size and see that
+# old rows remain in the table.
+SET @old_gtid_cleanup_batch_size= @@GLOBAL.gtid_cleanup_batch_size;
+SET GLOBAL gtid_cleanup_batch_size= 1000000;
--connection server_1
@@ -108,7 +112,12 @@ SELECT * FROM t3 ORDER BY c;
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
SELECT * FROM t3 ORDER BY c;
-#SHOW STATUS LIKE 'Slave_retried_transactions';
+# Check that we have a bunch of old rows left-over - they were not deleted
+# due to high @@gtid_cleanup_batch_size. Then set a low
+# @@gtid_cleanup_batch_size so we can test that rows start being deleted.
+SELECT IF(COUNT(*) >= 30, "OK", CONCAT("Error: too few old rows found: ", COUNT(*)))
+ FROM mysql.gtid_slave_pos;
+SET GLOBAL gtid_cleanup_batch_size=1;
--echo *** Test @@skip_parallel_replication. ***
@@ -557,25 +566,18 @@ DROP TABLE t1, t2, t3;
--connection server_2
--source include/sync_with_master_gtid.inc
-# Check for left-over rows in table mysql.gtid_slave_pos (MDEV-12147).
-#
-# There was a bug when a transaction got a conflict and was rolled back. It
-# might have also handled deletion of some old rows, and these deletions would
-# then also be rolled back. And since the deletes were never re-tried, old no
-# longer needed rows would accumulate in the table without limit.
-#
-# The earlier part of this test file have plenty of transactions being rolled
-# back. But the last DROP TABLE statement runs on its own and should never
-# conflict, thus at this point the mysql.gtid_slave_pos table should be clean.
-#
-# To support @@gtid_pos_auto_engines, when a row is inserted in the table, it
-# is associated with the engine of the table at insertion time, and it will
-# only be deleted during record_gtid from a table of the same engine. Since we
-# alter the table from MyISAM to InnoDB at the start of this test, we should
-# end up with 4 rows: two left-over from when the table was MyISAM, and two
-# left-over from the InnoDB part.
---echo Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos
-select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id;
+# Check that old rows are deleted from mysql.gtid_slave_pos.
+# Deletion is asynchronous, so use wait_condition.inc.
+# Also, there is a small amount of non-determinism in the deletion of old
+# rows, so it is not guaranteed that there can never be more than
+# @@gtid_cleanup_batch_size rows in the table; so allow a bit of slack
+# here.
+let $wait_condition=
+ SELECT COUNT(*) <= 5*@@GLOBAL.gtid_cleanup_batch_size
+ FROM mysql.gtid_slave_pos;
+--source include/wait_condition.inc
+eval $wait_condition;
+SET GLOBAL gtid_cleanup_batch_size= @old_gtid_cleanup_batch_size;
--connection server_1
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_001.test b/mysql-test/suite/rpl/t/rpl_row_001.test
index 06d01f2476e..f66c61ffb6e 100644
--- a/mysql-test/suite/rpl/t/rpl_row_001.test
+++ b/mysql-test/suite/rpl/t/rpl_row_001.test
@@ -2,10 +2,50 @@
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
########################################################
-- source include/have_binlog_format_row.inc
-# Slow test, don't run during staging part
--- source include/not_staging.inc
-- source include/master-slave.inc
-let $engine_type=MYISAM;
--- source include/rpl_row_001.test
+# Test if the slave SQL thread can be more than 16K behind the slave
+# I/O thread (> IO_SIZE)
+
+# we'll use table-level locking to delay slave SQL thread
+eval CREATE TABLE t1 (n INT);
+sync_slave_with_master;
+connection master;
+RESET MASTER;
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
+
+connection master;
+let $1=5000;
+# Generate 16K of relay log
+disable_query_log;
+while ($1)
+{
+ eval INSERT INTO t1 VALUES($1);
+ dec $1;
+}
+enable_query_log;
+SELECT COUNT(*) FROM t1;
+save_master_pos;
+
+# Try to cause a large relay log lag on the slave by locking t1
+connection slave;
+LOCK TABLES t1 READ;
+START SLAVE;
+UNLOCK TABLES;
+sync_with_master;
+SELECT COUNT(*) FROM t1;
+
+connection master;
+DROP TABLE t1;
+CREATE TABLE t1 (n INT);
+INSERT INTO t1 VALUES(3456);
+sync_slave_with_master;
+SELECT n FROM t1;
+
+connection master;
+DROP TABLE t1;
+
+sync_slave_with_master;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_big_table_id.test b/mysql-test/suite/rpl/t/rpl_row_big_table_id.test
new file mode 100644
index 00000000000..0c6f9d5e862
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_big_table_id.test
@@ -0,0 +1,57 @@
+##################################################################
+# rpl_row_big_table_id
+#
+# MDEV-17803 Row-based event is not applied when
+# table map id is greater 32 bit int
+#
+# Verify row-based events applying when table map id value is about and greater
+# than 1 << 32.
+##################################################################
+--source include/word_size.inc
+--source include/have_debug.inc
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+--connection master
+# To reset last table id
+--let $rpl_server_number= 1
+--source include/rpl_restart_server.inc
+
+SET @@debug_dbug="d,simulate_big_table_id";
+CREATE TABLE t (a int);
+
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $binlog_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+INSERT INTO t SET a= 0;
+ALTER TABLE t comment '';
+INSERT INTO t SET a= 1;
+ALTER TABLE t comment '';
+INSERT INTO t SET a= 2;
+ALTER TABLE t comment '';
+INSERT INTO t SET a= 3;
+
+# display simulated big table_id
+--let $_in_from=in '$binlog_file' from $binlog_pos
+--replace_result "$_in_from" "in <file> from <pos>"
+--replace_column 2 # 5 #
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /file_id=[0-9]+/file_id=#/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
+--eval show binlog events in '$binlog_file' from $binlog_pos
+
+
+--sync_slave_with_master
+
+if (`SELECT sum(a) != 6 FROM t`)
+{
+ --echo *** unexpected result; check slave applier ***
+ --die
+}
+
+
+# Cleanup
+
+--connection master
+DROP TABLE t;
+
+--sync_slave_with_master
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test
index 72c89789af4..62b5c5b1cd0 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_000001.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test
@@ -4,7 +4,6 @@
-- source include/master-slave.inc
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
---let $engine_type= myisam
# Load some data into t1
create table t1 (word char(20) not null);
@@ -19,7 +18,7 @@ select * from t1 limit 10;
sync_slave_with_master;
stop slave;
connection master;
-create temporary table tmp select * from mysql.user where host="localhost" and user="root";
+create temporary table tmp select * from mysql.global_priv where host="localhost" and user="root";
set password for root@"localhost" = password('foo');
connection slave;
start slave;
@@ -28,7 +27,7 @@ connection master;
# Give slave time to do at last one failed connect retry
# This one must be short so that the slave will not stop retrying
real_sleep 2;
-replace into mysql.user select * from tmp;
+replace into mysql.global_priv select * from tmp;
drop temporary table tmp;
flush privileges;
# Give slave time to connect (will retry every second)
@@ -48,7 +47,7 @@ sync_slave_with_master;
connection master;
# we'll use table-level locking to delay slave SQL thread
-eval create table t1 (n int) engine=$engine_type;
+eval create table t1 (n int);
sync_slave_with_master;
connection master;
reset master;
@@ -114,20 +113,6 @@ connection slave;
select count(*) from t1;
connection master1;
drop table t1;
-create table t1 (n int);
-insert into t1 values(3456);
-insert ignore into mysql.user (Host, User, Password)
- VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-sync_slave_with_master;
-select n from t1;
-select select_priv,user from mysql.user where user = _binary'blafasel2';
-connection master1;
-drop table t1;
-delete from mysql.user where user="blafasel2";
-sync_slave_with_master;
# End of 4.1 tests
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_temporal_round.test b/mysql-test/suite/rpl/t/rpl_temporal_round.test
new file mode 100644
index 00000000000..c13c18bddb5
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_temporal_round.test
@@ -0,0 +1,35 @@
+--source include/master-slave.inc
+
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET time_zone='+00:00';
+SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
+
+CREATE TABLE t1 (id SERIAL, a TIMESTAMP(4));
+INSERT INTO t1 (a) VALUES (now(6));
+INSERT INTO t1 (a) VALUES ('2011-01-01 23:59:59.999999');
+
+CREATE TABLE t2 (id SERIAL, a DATETIME(4));
+INSERT INTO t2 (a) VALUES (now(6));
+INSERT INTO t2 (a) VALUES ('2011-01-01 23:59:59.999999');
+
+CREATE TABLE t3 (id SERIAL, a TIME(4));
+INSERT INTO t3 (a) VALUES (now(6));
+INSERT INTO t3 (a) VALUES ('2011-01-01 23:59:59.999999');
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+sync_slave_with_master;
+connection slave;
+SET time_zone='+00:00';
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+connection master;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test
index caa17b47733..079c2bf27d5 100644
--- a/mysql-test/suite/rpl/t/rpl_user.test
+++ b/mysql-test/suite/rpl/t/rpl_user.test
@@ -42,6 +42,17 @@ sync_slave_with_master;
select Host,User from mysql.user where Host='fakehost';
#
+# Test alter user
+#
+connection master;
+alter user 'foofoo'@'fakehost' identified by 'foo';
+--error ER_CANNOT_USER
+alter user 'non_exist_user1'@'fakehost' identified by 'foo', 'barbar'@'fakehost' identified by 'bar';
+--error ER_CANNOT_USER
+alter user 'non_exist_user1'@'fakehost' identified by 'foo', 'non_exist_user2'@'fakehost' identified by 'bar';
+sync_slave_with_master;
+
+#
# Test drop user
#
connection master;
diff --git a/mysql-test/suite/storage_engine/type_bool.result b/mysql-test/suite/storage_engine/type_bool.result
index 87308ed63fc..10cfc08102f 100644
--- a/mysql-test/suite/storage_engine/type_bool.result
+++ b/mysql-test/suite/storage_engine/type_bool.result
@@ -42,8 +42,8 @@ b1 b2
0 0
INSERT INTO t1 (b1,b2) VALUES ('a','b');
Warnings:
-Warning 1366 Incorrect integer value: 'a' for column 'b1' at row 1
-Warning 1366 Incorrect integer value: 'b' for column 'b2' at row 1
+Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`b1` at row 1
+Warning 1366 Incorrect integer value: 'b' for column `test`.`t1`.`b2` at row 1
SELECT b1,b2 FROM t1;
b1 b2
-1 -2
diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
index 1798bd5d6e0..f833f417290 100644
--- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
+++ b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result
@@ -70,6 +70,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 17 Using where; Using join buffer (flat, BNL join)
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SET MAX_SEEKS_FOR_KEY=1;
EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b;
diff --git a/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result b/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
index cae0e68765b..75fe06e2faf 100644
--- a/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
+++ b/mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
@@ -20,6 +20,7 @@ INSERT INTO t1 SELECT NULL FROM t1;
SET myisam_stats_method = nulls_unequal;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -38,6 +39,7 @@ INSERT INTO t1 VALUES (11);
DELETE FROM t1 WHERE a = 11;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -49,7 +51,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
-t1 1 a 1 a A 5 NULL NULL YES BTREE
+t1 1 a 1 a A 10 NULL NULL YES BTREE
'Set nulls to be ignored'
SET myisam_stats_method = nulls_ignored;
SHOW VARIABLES LIKE 'myisam_stats_method';
@@ -66,6 +68,7 @@ INSERT INTO t1 VALUES ('bce','def1', 'yuu', NULL);
INSERT INTO t1 VALUES ('bce','def2', NULL, 'quux');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
@@ -76,6 +79,7 @@ t1 1 a 4 d A 4 NULL NULL YES BTREE
DELETE FROM t1;
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result b/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
index a030bae3750..941b7699747 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result
@@ -1,33 +1,33 @@
SET @start_global_value = @@global.optimizer_use_condition_selectivity;
SELECT @start_global_value;
@start_global_value
-1
+4
SET @start_session_value = @@session.optimizer_use_condition_selectivity;
SELECT @start_session_value;
@start_session_value
-1
+4
'#--------------------FN_DYNVARS_115_01-------------------------#'
SET @@global.optimizer_use_condition_selectivity = DEFAULT;
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
-1
+4
SET @@session.optimizer_use_condition_selectivity = DEFAULT;
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
-1
+4
'#--------------------FN_DYNVARS_115_02-------------------------#'
SET @@global.optimizer_use_condition_selectivity = DEFAULT;
SELECT @@global.optimizer_use_condition_selectivity = 1;
@@global.optimizer_use_condition_selectivity = 1
-1
+0
SET @@session.optimizer_use_condition_selectivity = DEFAULT;
SELECT @@session.optimizer_use_condition_selectivity = 1;
@@session.optimizer_use_condition_selectivity = 1
-1
+0
'#--------------------FN_DYNVARS_115_03-------------------------#'
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
-1
+4
SET @@global.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
@@ -63,7 +63,7 @@ SELECT @@global.optimizer_use_condition_selectivity;
'#--------------------FN_DYNVARS_115_04-------------------------#'
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
-1
+4
SET @@session.optimizer_use_condition_selectivity = 0;
Warnings:
Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0'
@@ -134,8 +134,8 @@ SELECT @@local.optimizer_use_condition_selectivity = @@session.optimizer_use_con
SET @@global.optimizer_use_condition_selectivity = @start_global_value;
SELECT @@global.optimizer_use_condition_selectivity;
@@global.optimizer_use_condition_selectivity
-1
+4
SET @@session.optimizer_use_condition_selectivity = @start_session_value;
SELECT @@session.optimizer_use_condition_selectivity;
@@session.optimizer_use_condition_selectivity
-1
+4
diff --git a/mysql-test/suite/sys_vars/r/sql_mode_basic.result b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
index a200f620a7c..d911e80b780 100644
--- a/mysql-test/suite/sys_vars/r/sql_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
@@ -367,7 +367,15 @@ SELECT @@global.sql_mode;
@@global.sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT
SET @@global.sql_mode = 17179869184;
-ERROR 42000: Variable 'sql_mode' can't be set to the value of '17179869184'
+SELECT @@global.sql_mode;
+@@global.sql_mode
+TIME_ROUND_FRACTIONAL
+SET @@global.sql_mode = 34359738367;
+SELECT @@global.sql_mode;
+@@global.sql_mode
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT,TIME_ROUND_FRACTIONAL
+SET @@global.sql_mode = 34359738368;
+ERROR 42000: Variable 'sql_mode' can't be set to the value of '34359738368'
SET @@global.sql_mode = 0.4;
ERROR 42000: Incorrect argument type to variable 'sql_mode'
'#---------------------FN_DYNVARS_152_08----------------------#'
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 835145531b9..926ac8b2668 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -881,10 +881,10 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
+SESSION_VALUE 10
+GLOBAL_VALUE 10
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
+DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.
@@ -2210,6 +2210,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_PASSWORD_ERRORS
+SESSION_VALUE NULL
+GLOBAL_VALUE 4294967295
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 4294967295
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT If there is more than this number of failed connect attempts due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PREPARED_STMT_COUNT
SESSION_VALUE NULL
GLOBAL_VALUE 16382
@@ -2729,10 +2743,10 @@ ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
-SESSION_VALUE 1
-GLOBAL_VALUE 1
+SESSION_VALUE 4
+GLOBAL_VALUE 4
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
+DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
@@ -3066,9 +3080,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
SESSION_VALUE NULL
-GLOBAL_VALUE 200
+GLOBAL_VALUE 202
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 200
+DEFAULT_VALUE 202
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
@@ -3845,7 +3859,7 @@ VARIABLE_COMMENT Sets the sql mode
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT
+ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT,TIME_ROUND_FRACTIONAL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_NOTES
@@ -4151,7 +4165,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
-NUMERIC_MAX_VALUE 524288
+NUMERIC_MAX_VALUE 2097152
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -4507,17 +4521,17 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME USE_STAT_TABLES
-SESSION_VALUE NEVER
-GLOBAL_VALUE NEVER
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NEVER
+SESSION_VALUE PREFERABLY
+GLOBAL_VALUE PREFERABLY
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE PREFERABLY_FOR_QUERIES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how to use system statistics tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY
+ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY,COMPLEMENTARY_FOR_QUERIES,PREFERABLY_FOR_QUERIES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WAIT_TIMEOUT
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 26acbfad9c6..219b550d83e 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -895,10 +895,10 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT
-SESSION_VALUE 0
-GLOBAL_VALUE 0
+SESSION_VALUE 10
+GLOBAL_VALUE 10
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
+DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.
@@ -1202,6 +1202,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME GTID_CLEANUP_BATCH_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 64
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 64
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Normally does not need tuning. How many old rows must accumulate in the mysql.gtid_slave_pos table before a background job will be run to delete them. Can be increased to reduce number of commits if using many different engines with --gtid_pos_auto_engines, or to reduce CPU overhead if using a huge number of different gtid_domain_ids. Can be decreased to reduce number of old rows in the table.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2147483647
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME GTID_CURRENT_POS
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -2406,6 +2420,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_PASSWORD_ERRORS
+SESSION_VALUE NULL
+GLOBAL_VALUE 4294967295
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 4294967295
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT If there is more than this number of failed connect attempts due to invalid password, user will be blocked from further connections until FLUSH_PRIVILEGES.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_PREPARED_STMT_COUNT
SESSION_VALUE NULL
GLOBAL_VALUE 16382
@@ -2939,10 +2967,10 @@ ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
-SESSION_VALUE 1
-GLOBAL_VALUE 1
+SESSION_VALUE 4
+GLOBAL_VALUE 4
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
+DEFAULT_VALUE 4
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
@@ -3276,9 +3304,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
SESSION_VALUE NULL
-GLOBAL_VALUE 200
+GLOBAL_VALUE 202
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 200
+DEFAULT_VALUE 202
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
@@ -4755,7 +4783,7 @@ VARIABLE_COMMENT Sets the sql mode
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT
+ENUM_VALUE_LIST REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,IGNORE_BAD_TABLE_OPTIONS,ONLY_FULL_GROUP_BY,NO_UNSIGNED_SUBTRACTION,NO_DIR_IN_CREATE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,MYSQL323,MYSQL40,ANSI,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,HIGH_NOT_PRECEDENCE,NO_ENGINE_SUBSTITUTION,PAD_CHAR_TO_FULL_LENGTH,EMPTY_STRING_IS_NULL,SIMULTANEOUS_ASSIGNMENT,TIME_ROUND_FRACTIONAL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SQL_NOTES
@@ -5103,7 +5131,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
-NUMERIC_MAX_VALUE 524288
+NUMERIC_MAX_VALUE 2097152
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -5557,17 +5585,17 @@ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME USE_STAT_TABLES
-SESSION_VALUE NEVER
-GLOBAL_VALUE NEVER
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NEVER
+SESSION_VALUE PREFERABLY
+GLOBAL_VALUE PREFERABLY
+GLOBAL_VALUE_ORIGIN CONFIG
+DEFAULT_VALUE PREFERABLY_FOR_QUERIES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Specifies how to use system statistics tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY
+ENUM_VALUE_LIST NEVER,COMPLEMENTARY,PREFERABLY,COMPLEMENTARY_FOR_QUERIES,PREFERABLY_FOR_QUERIES
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WAIT_TIMEOUT
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index db932ae8223..ac83a0a8c7f 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -211,6 +211,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_IGNORE_APPLY_ERRORS
+SESSION_VALUE NULL
+GLOBAL_VALUE 7
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 7
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Ignore replication errors
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 7
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_LOAD_DATA_SPLITTING
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -218,7 +232,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT To commit LOAD DATA transaction after every 10K rows inserted
+VARIABLE_COMMENT To commit LOAD DATA transaction after every 10K rows inserted (deprecating)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -519,6 +533,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_SR_STORE
+SESSION_VALUE NULL
+GLOBAL_VALUE table
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE table
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Storage for streaming replication fragments
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST none,table
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_SST_AUTH
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -617,3 +645,31 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME WSREP_TRX_FRAGMENT_SIZE
+SESSION_VALUE 0
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Size of transaction fragments for streaming replication (measured in units of 'wsrep_trx_fragment_unit')
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 2147483647
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME WSREP_TRX_FRAGMENT_UNIT
+SESSION_VALUE bytes
+GLOBAL_VALUE bytes
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE bytes
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Unit for streaming replication transaction fragments' size: bytes, rows, statements
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST bytes,rows,statements
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
diff --git a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
index 54b50c5ff75..69f3d42d2fb 100644
--- a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
+++ b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result
@@ -28,14 +28,14 @@ Warning 1292 Truncated incorrect table_definition_cache value: '2'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
400
-SET @@global.table_definition_cache = 524287;
+SET @@global.table_definition_cache = 2097151;
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524287
-SET @@global.table_definition_cache = 524288;
+2097151
+SET @@global.table_definition_cache = 2097152;
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524288
+2097152
'#--------------------FN_DYNVARS_019_04-------------------------#'
SET @@global.table_definition_cache = 0;
Warnings:
@@ -49,18 +49,18 @@ Warning 1292 Truncated incorrect table_definition_cache value: '-1024'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
400
-SET @@global.table_definition_cache = 524289;
+SET @@global.table_definition_cache = 2097153;
Warnings:
-Warning 1292 Truncated incorrect table_definition_cache value: '524289'
+Warning 1292 Truncated incorrect table_definition_cache value: '2097153'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524288
+2097152
SET @@global.table_definition_cache = 42949672950;
Warnings:
Warning 1292 Truncated incorrect table_definition_cache value: '42949672950'
SELECT @@global.table_definition_cache;
@@global.table_definition_cache
-524288
+2097152
SET @@global.table_definition_cache = 21221204.10;
ERROR 42000: Incorrect argument type to variable 'table_definition_cache'
SET @@global.table_definition_cache = ON;
diff --git a/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result b/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result
index 64f6d868fa6..1de75b65caf 100644
--- a/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result
+++ b/mysql-test/suite/sys_vars/r/use_stat_tables_basic.result
@@ -1,16 +1,16 @@
SET @start_global_value = @@global.use_stat_tables;
SELECT @start_global_value;
@start_global_value
-NEVER
+PREFERABLY
SET @start_session_value = @@session.use_stat_tables;
SELECT @start_session_value;
@start_session_value
-NEVER
+PREFERABLY
SET @@global.use_stat_tables = 2;
SET @@global.use_stat_tables = DEFAULT;
SELECT @@global.use_stat_tables;
@@global.use_stat_tables
-NEVER
+PREFERABLY_FOR_QUERIES
SET @@global.use_stat_tables = 0;
SELECT @@global.use_stat_tables;
@@global.use_stat_tables
@@ -87,9 +87,9 @@ USE_STAT_TABLES COMPLEMENTARY
SET @@global.use_stat_tables = @start_global_value;
SELECT @@global.use_stat_tables;
@@global.use_stat_tables
-NEVER
+PREFERABLY
SET @@session.use_stat_tables = @start_session_value;
SELECT @@session.use_stat_tables;
@@session.use_stat_tables
-NEVER
+PREFERABLY
set sql_mode='';
diff --git a/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result b/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
index b2e07c55b38..15949a14e39 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
@@ -2,9 +2,6 @@
# wsrep_provider_options
#
call mtr.add_suppression("WSREP: Failed to get provider options");
-SET @@global.wsrep_provider = @@global.wsrep_provider;
-# save the initial value
-SET @wsrep_provider_options_global_saved = @@global.wsrep_provider_options;
# default
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
@@ -16,18 +13,21 @@ ERROR HY000: Variable 'wsrep_provider_options' is a GLOBAL variable
SET @@global.wsrep_provider_options='option1';
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
-option1
+
# valid values
SET @@global.wsrep_provider_options='name1=value1;name2=value2';
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
-name1=value1;name2=value2
+
SET @@global.wsrep_provider_options='hyphenated-name:value';
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
-hyphenated-name:value
+
SET @@global.wsrep_provider_options=default;
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
@@ -42,8 +42,5 @@ SET @@global.wsrep_provider_options=NULL;
Got one of the listed errors
SELECT @@global.wsrep_provider_options;
@@global.wsrep_provider_options
-NULL
-# restore the initial value
-SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved;
# End of test
diff --git a/mysql-test/suite/sys_vars/r/wsrep_sst_method_basic.result b/mysql-test/suite/sys_vars/r/wsrep_sst_method_basic.result
index cbdac640c36..51f167b8f47 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_sst_method_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_sst_method_basic.result
@@ -33,6 +33,10 @@ SET @@global.wsrep_sst_method="xtrabackup-v2";
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
xtrabackup-v2
+SET @@global.wsrep_sst_method="mariabackup";
+SELECT @@global.wsrep_sst_method;
+@@global.wsrep_sst_method
+mariabackup
SET @@global.wsrep_sst_method=default;
SELECT @@global.wsrep_sst_method;
@@global.wsrep_sst_method
diff --git a/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test b/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test
index e962dcf178d..07f0c431138 100644
--- a/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test
+++ b/mysql-test/suite/sys_vars/t/aria_used_for_temp_tables_basic.test
@@ -1,5 +1,6 @@
# bool readonly
+--source include/have_aria_used_for_temp_tables.inc
--source include/have_maria.inc
#
# show the global and session values;
diff --git a/mysql-test/suite/sys_vars/t/sql_mode_basic.test b/mysql-test/suite/sys_vars/t/sql_mode_basic.test
index b4841ecd3ff..68be8ba969b 100644
--- a/mysql-test/suite/sys_vars/t/sql_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/sql_mode_basic.test
@@ -310,8 +310,14 @@ SELECT @@global.sql_mode;
SET @@global.sql_mode = 17179869183;
SELECT @@global.sql_mode;
---Error ER_WRONG_VALUE_FOR_VAR
SET @@global.sql_mode = 17179869184;
+SELECT @@global.sql_mode;
+
+SET @@global.sql_mode = 34359738367;
+SELECT @@global.sql_mode;
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.sql_mode = 34359738368;
# use of decimal values
diff --git a/mysql-test/suite/sys_vars/t/sysvars_aria.test b/mysql-test/suite/sys_vars/t/sysvars_aria.test
index 5ff5c0d4b2b..67fb0baa4f1 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_aria.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_aria.test
@@ -1,4 +1,5 @@
--source include/have_aria.inc
+--source include/have_aria_used_for_temp_tables.inc
--source include/word_size.inc
--vertical_results
diff --git a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
index dc0903c5d40..d7a6ff25a0b 100644
--- a/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
+++ b/mysql-test/suite/sys_vars/t/table_definition_cache_basic.test
@@ -64,9 +64,9 @@ SET @@global.table_definition_cache = 1;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = 2;
SELECT @@global.table_definition_cache;
-SET @@global.table_definition_cache = 524287;
+SET @@global.table_definition_cache = 2097151;
SELECT @@global.table_definition_cache;
-SET @@global.table_definition_cache = 524288;
+SET @@global.table_definition_cache = 2097152;
SELECT @@global.table_definition_cache;
@@ -79,7 +79,7 @@ SET @@global.table_definition_cache = 0;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = -1024;
SELECT @@global.table_definition_cache;
-SET @@global.table_definition_cache = 524289;
+SET @@global.table_definition_cache = 2097153;
SELECT @@global.table_definition_cache;
SET @@global.table_definition_cache = 42949672950;
SELECT @@global.table_definition_cache;
diff --git a/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test b/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test
index bf93b4646d9..9c1e596d3e4 100644
--- a/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test
+++ b/mysql-test/suite/sys_vars/t/tmp_disk_table_size_func.test
@@ -1,5 +1,7 @@
###################### tmp_memory_table_size_func.test ########################
+--source include/have_aria_used_for_temp_tables.inc
+
--source include/load_sysvars.inc
--source include/have_sequence.inc
diff --git a/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test b/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
index d2ea32a0637..6eb3a94b6a4 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
@@ -6,11 +6,6 @@
call mtr.add_suppression("WSREP: Failed to get provider options");
-SET @@global.wsrep_provider = @@global.wsrep_provider;
-
---echo # save the initial value
-SET @wsrep_provider_options_global_saved = @@global.wsrep_provider_options;
-
--echo # default
SELECT @@global.wsrep_provider_options;
@@ -24,13 +19,13 @@ SELECT @@global.wsrep_provider_options;
--echo
--echo # valid values
---error 0,ER_WRONG_ARGUMENTS
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='name1=value1;name2=value2';
SELECT @@global.wsrep_provider_options;
---error 0,ER_WRONG_ARGUMENTS
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options='hyphenated-name:value';
SELECT @@global.wsrep_provider_options;
---error 0,ER_WRONG_ARGUMENTS
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_provider_options=default;
SELECT @@global.wsrep_provider_options;
@@ -43,9 +38,4 @@ SELECT @@global.wsrep_provider_options;
SET @@global.wsrep_provider_options=NULL;
SELECT @@global.wsrep_provider_options;
---echo
---echo # restore the initial value
---error 0,ER_WRONG_ARGUMENTS
-SET @@global.wsrep_provider_options = @wsrep_provider_options_global_saved;
-
--echo # End of test
diff --git a/mysql-test/suite/sys_vars/t/wsrep_sst_method_basic.test b/mysql-test/suite/sys_vars/t/wsrep_sst_method_basic.test
index 3f40a3922dd..be038eb4baf 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_sst_method_basic.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_sst_method_basic.test
@@ -23,10 +23,15 @@ SET @@global.wsrep_sst_method=rsync;
SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method=mysqldump;
SELECT @@global.wsrep_sst_method;
+# The xtrabackup and xtrabackup-v2 methods are obsolete,
+# but we can still select them (they will be automatically
+# replaced to mariabackup):
SET @@global.wsrep_sst_method=xtrabackup;
SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method="xtrabackup-v2";
SELECT @@global.wsrep_sst_method;
+SET @@global.wsrep_sst_method="mariabackup";
+SELECT @@global.wsrep_sst_method;
SET @@global.wsrep_sst_method=default;
SELECT @@global.wsrep_sst_method;
diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result
index 5a6355e1773..5b67c9dd0f7 100644
--- a/mysql-test/suite/vcol/r/update.result
+++ b/mysql-test/suite/vcol/r/update.result
@@ -122,7 +122,7 @@ select * from t;
a b c d e
10 5 5 5 5
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -130,7 +130,7 @@ select * from t;
a b c d e
10 6 6 6 6
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/vcol/r/update_binlog.result b/mysql-test/suite/vcol/r/update_binlog.result
index d4102fc460a..c29200513b0 100644
--- a/mysql-test/suite/vcol/r/update_binlog.result
+++ b/mysql-test/suite/vcol/r/update_binlog.result
@@ -124,7 +124,7 @@ select * from t;
a b c d e
10 5 5 5 5
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -132,7 +132,7 @@ select * from t;
a b c d e
10 6 6 6 6
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -304,7 +304,7 @@ select * from t;
a b c d e
10 5 5 5 5
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -312,7 +312,7 @@ select * from t;
a b c d e
10 6 6 6 6
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/vcol/r/upgrade.result b/mysql-test/suite/vcol/r/upgrade.result
index 75684bf0e41..527bc5f3abf 100644
--- a/mysql-test/suite/vcol/r/upgrade.result
+++ b/mysql-test/suite/vcol/r/upgrade.result
@@ -16,3 +16,19 @@ select * from vcol_autoinc;
pk v3
1 1
drop table vcol_autoinc;
+check table t1 for upgrade;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+flush tables;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `Date` datetime(6) NOT NULL,
+ `Data` varbinary(2000) NOT NULL,
+ `a` varchar(100) GENERATED ALWAYS AS (column_get(`Data`,1 as char(100) charset latin1)) VIRTUAL,
+ PRIMARY KEY (`Date`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ PARTITION BY RANGE (to_days(`Date`))
+(PARTITION `p20181029` VALUES LESS THAN (737361) ENGINE = MyISAM,
+ PARTITION `p20181128` VALUES LESS THAN (737391) ENGINE = MyISAM)
+drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index bd013da9b03..0b257d12ca0 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -277,6 +277,7 @@ a b c d
delete from t1 where b=12;
analyze table t1;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index f3edfa9c026..9eb4616949c 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -182,16 +182,36 @@ a b c
2 3 y
0 1 y,n
drop table t1,t2;
-CREATE TABLE t1 (
+SET @old_debug= @@global.debug;
+SET @old_debug= @@global.debug;
+SET GLOBAL debug_dbug= "+d,write_delay_wakeup";
+CREATE TABLE t1 (a int,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
) ENGINE=MyISAM;
-INSERT INTO t1 (tsv) VALUES (DEFAULT);
-INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT);
+# First test FLUSH TABLES
+INSERT INTO t1 (a,tsv) VALUES (1,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (2,DEFAULT);
FLUSH TABLES;
+SELECT COUNT(*) > 0 FROM t1;
+COUNT(*) > 0
+1
+# Then test FLUSH TABLES t1;
+INSERT INTO t1 (a,tsv) VALUES (3,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (4,DEFAULT);
+FLUSH TABLES t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+4
+# Then test FLUSH TABLES WITH READ LOCK;
+INSERT INTO t1 (a,tsv) VALUES (5,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (6,DEFAULT);
+FLUSH TABLES WITH READ LOCK;
SELECT COUNT(*) FROM t1;
COUNT(*)
-2
+6
+set GLOBAL debug_dbug= @old_debug;
+unlock tables;
DROP TABLE t1;
#
# MDEV-4823 Server crashes in Item_func_not::fix_fields on
diff --git a/mysql-test/suite/vcol/t/update.test b/mysql-test/suite/vcol/t/update.test
index 53189ee3219..e1351986968 100644
--- a/mysql-test/suite/vcol/t/update.test
+++ b/mysql-test/suite/vcol/t/update.test
@@ -93,10 +93,10 @@ check table t; select * from t;
insert t(a,b,d) select 10,4,4 on duplicate key update b=5, d=5;
check table t; select * from t;
replace delayed t (a,b,d) values (10,6,6);
-flush tables;
+flush tables t;
check table t; select * from t;
insert delayed t(a,b,d) values (10,6,6) on duplicate key update b=7, d=7;
-flush tables;
+flush tables t;
check table t; select * from t;
--write_file $MYSQLTEST_VARDIR/tmp/vblobs.txt
10 8 foo 8 foo
diff --git a/mysql-test/suite/vcol/t/upgrade.test b/mysql-test/suite/vcol/t/upgrade.test
index 3e221747dfa..146495d8ed0 100644
--- a/mysql-test/suite/vcol/t/upgrade.test
+++ b/mysql-test/suite/vcol/t/upgrade.test
@@ -11,3 +11,18 @@ select * from vcol_autoinc;
insert vcol_autoinc (pk) values (1);
select * from vcol_autoinc;
drop table vcol_autoinc;
+
+#
+# MDEV-17909 Problem by MariaDB Update 10.1.32 -> 10.2.19 (Incorrect information in file: .frm)
+#
+source include/have_partition.inc;
+copy_file std_data/mdev17909#P#p20181029.MYD $datadir/test/t1#P#p20181029.MYD;
+copy_file std_data/mdev17909#P#p20181029.MYI $datadir/test/t1#P#p20181029.MYI;
+copy_file std_data/mdev17909#P#p20181128.MYD $datadir/test/t1#P#p20181128.MYD;
+copy_file std_data/mdev17909#P#p20181128.MYI $datadir/test/t1#P#p20181128.MYI;
+copy_file std_data/mdev17909.frm $datadir/test/t1.frm;
+copy_file std_data/mdev17909.par $datadir/test/t1.par;
+check table t1 for upgrade;
+flush tables;
+show create table t1;
+drop table t1;
diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test
index b351e1eb4a6..95b707e3e12 100644
--- a/mysql-test/suite/vcol/t/vcol_misc.test
+++ b/mysql-test/suite/vcol/t/vcol_misc.test
@@ -1,4 +1,5 @@
--source include/have_ucs2.inc
+--source include/have_debug.inc
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -184,19 +185,35 @@ drop table t1,t2;
# Bug mdev-3938: INSERT DELAYED for a table with virtual columns
#
-CREATE TABLE t1 (
+SET @old_debug= @@global.debug;
+SET @old_debug= @@global.debug;
+SET GLOBAL debug_dbug= "+d,write_delay_wakeup";
+CREATE TABLE t1 (a int,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
) ENGINE=MyISAM;
-INSERT INTO t1 (tsv) VALUES (DEFAULT);
-
-INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT);
-
+--echo # First test FLUSH TABLES
+INSERT INTO t1 (a,tsv) VALUES (1,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (2,DEFAULT);
FLUSH TABLES;
+# Count may be 1 or 2, depending on FLUSH happened before or after delayed
+SELECT COUNT(*) > 0 FROM t1;
+--echo # Then test FLUSH TABLES t1;
+INSERT INTO t1 (a,tsv) VALUES (3,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (4,DEFAULT);
+FLUSH TABLES t1;
SELECT COUNT(*) FROM t1;
+--echo # Then test FLUSH TABLES WITH READ LOCK;
+
+INSERT INTO t1 (a,tsv) VALUES (5,DEFAULT);
+INSERT DELAYED INTO t1 (a,tsv) VALUES (6,DEFAULT);
+FLUSH TABLES WITH READ LOCK;
+SELECT COUNT(*) FROM t1;
+set GLOBAL debug_dbug= @old_debug;
+unlock tables;
DROP TABLE t1;
--echo #
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index 7cddc374f5f..350ebf260ac 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -527,7 +527,7 @@ ERROR HY000: Table `t` is already system-versioned
use mysql;
create or replace table t (x int) with system versioning;
ERROR HY000: System versioning tables in the `mysql` database are not suported
-alter table user add system versioning;
+alter table db add system versioning;
ERROR HY000: System versioning tables in the `mysql` database are not suported
use test;
# MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column
diff --git a/mysql-test/suite/versioning/r/cte.result b/mysql-test/suite/versioning/r/cte.result
index fc070a70120..44135a83eb6 100644
--- a/mysql-test/suite/versioning/r/cte.result
+++ b/mysql-test/suite/versioning/r/cte.result
@@ -138,7 +138,7 @@ where e.mgr = a.emp_id
select name from emp where emp_id in (select emp_id from ancestors for system_time as of timestamp @ts_1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery4> ALL distinct_key NULL NULL NULL 4 100.00
-1 PRIMARY emp ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY emp ALL PRIMARY NULL NULL NULL 4 100.00 Using where; Using join buffer (flat, BNL join)
4 MATERIALIZED <derived2> ALL NULL NULL NULL NULL 4 100.00
2 DERIVED e ALL NULL NULL NULL NULL 4 100.00 Using where
3 RECURSIVE UNION e ALL mgr-fk NULL NULL NULL 4 100.00 Using where
diff --git a/mysql-test/suite/versioning/r/foreign.result b/mysql-test/suite/versioning/r/foreign.result
index 8169ddeaa92..a5dbd3fca36 100644
--- a/mysql-test/suite/versioning/r/foreign.result
+++ b/mysql-test/suite/versioning/r/foreign.result
@@ -292,3 +292,12 @@ select count(*) from subchild;
count(*)
0
drop table subchild, child, parent;
+CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=InnoDB;
+CREATE TABLE t2 (f2 INT, FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=InnoDB WITH SYSTEM VERSIONING;
+SET FOREIGN_KEY_CHECKS= OFF;
+INSERT IGNORE INTO t2 VALUES (1);
+SET FOREIGN_KEY_CHECKS= ON;
+UPDATE t2 SET f2= 2;
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`))
+DELETE FROM t2;
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/versioning/r/online.result b/mysql-test/suite/versioning/r/online.result
index 580500544d6..e78db22bd2c 100644
--- a/mysql-test/suite/versioning/r/online.result
+++ b/mysql-test/suite/versioning/r/online.result
@@ -124,5 +124,33 @@ alter table t add index idx(a), lock=none;
alter table t drop column s, drop column e;
alter table t drop system versioning, lock=none;
ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED
+#
+# MDEV-17697 Broken versioning info after instant drop column
+#
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+alter table t1 drop column b, algorithm=instant;
+alter table t1 drop system versioning;
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+alter table t1 drop system versioning;
+#
+# MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
+#
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (pk integer primary key, a int, b int, v int as (a))
+with system versioning;
+alter table t1 force;
+alter table t1 drop column b;
+#
+# MDEV-18122 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
+#
+create or replace table t1 (
+x int,
+v int as (x) virtual,
+y int
+) with system versioning;
+alter table t1 drop system versioning;
drop database test;
create database test;
diff --git a/mysql-test/suite/versioning/r/sysvars.result b/mysql-test/suite/versioning/r/sysvars.result
index b23742462d1..79aa8fce746 100644
--- a/mysql-test/suite/versioning/r/sysvars.result
+++ b/mysql-test/suite/versioning/r/sysvars.result
@@ -53,7 +53,7 @@ Variable_name Value
system_versioning_asof 1900-01-01 00:00:00.000000
set global system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
Warnings:
-Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
+Note 1292 Truncated incorrect DATETIME value: '1911-11-11 11:11:11.1111119'
show global variables like 'system_versioning_asof';
Variable_name Value
system_versioning_asof 1911-11-11 11:11:11.111111
@@ -80,7 +80,7 @@ Variable_name Value
system_versioning_asof 1900-01-01 00:00:00.000000
set system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
Warnings:
-Note 1292 Truncated incorrect datetime value: '1911-11-11 11:11:11.1111119'
+Note 1292 Truncated incorrect DATETIME value: '1911-11-11 11:11:11.1111119'
show variables like 'system_versioning_asof';
Variable_name Value
system_versioning_asof 1911-11-11 11:11:11.111111
@@ -130,3 +130,14 @@ show status like "Feature_system_versioning";
Variable_name Value
Feature_system_versioning 2
drop table t;
+#
+# MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
+#
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET @@global.system_versioning_asof= timestamp'2001-12-31 23:59:59.9999999';
+Warnings:
+Note 1292 Truncated incorrect DATETIME value: '2001-12-31 23:59:59.9999999'
+SELECT @@global.system_versioning_asof;
+@@global.system_versioning_asof
+2002-01-01 00:00:00.000000
+SET @@global.system_versioning_asof= DEFAULT;
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 05bd6019a32..01cb2d72f8d 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -450,7 +450,7 @@ use mysql;
--error ER_VERS_DB_NOT_SUPPORTED
create or replace table t (x int) with system versioning;
--error ER_VERS_DB_NOT_SUPPORTED
-alter table user add system versioning;
+alter table db add system versioning;
use test;
--echo # MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column
diff --git a/mysql-test/suite/versioning/t/foreign.test b/mysql-test/suite/versioning/t/foreign.test
index 566d481c2a8..075f15a216c 100644
--- a/mysql-test/suite/versioning/t/foreign.test
+++ b/mysql-test/suite/versioning/t/foreign.test
@@ -317,4 +317,18 @@ select count(*) from subchild;
drop table subchild, child, parent;
+CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=InnoDB;
+CREATE TABLE t2 (f2 INT, FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=InnoDB WITH SYSTEM VERSIONING;
+
+SET FOREIGN_KEY_CHECKS= OFF;
+INSERT IGNORE INTO t2 VALUES (1);
+
+SET FOREIGN_KEY_CHECKS= ON;
+--error ER_NO_REFERENCED_ROW_2
+UPDATE t2 SET f2= 2;
+DELETE FROM t2;
+
+DROP TABLE t2, t1;
+
+
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/online.test b/mysql-test/suite/versioning/t/online.test
index 9de4937d8da..02fde474d55 100644
--- a/mysql-test/suite/versioning/t/online.test
+++ b/mysql-test/suite/versioning/t/online.test
@@ -148,5 +148,49 @@ alter table t drop column s, drop column e;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t drop system versioning, lock=none;
+--echo #
+--echo # MDEV-17697 Broken versioning info after instant drop column
+--echo #
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+alter table t1 drop column b, algorithm=instant;
+alter table t1 drop system versioning;
+
+create or replace table t1 (a int, b int) with system versioning;
+insert into t1 values (1, 1);
+
+if ($have_debug) {
+--disable_query_log
+--disable_result_log
+set debug_dbug='+d,ib_commit_inplace_fail_1';
+--error ER_INTERNAL_ERROR
+alter table t1 drop column b, algorithm=instant;
+set debug_dbug= default;
+--enable_query_log
+--enable_result_log
+}
+alter table t1 drop system versioning;
+
+--echo #
+--echo # MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
+--echo #
+set @@system_versioning_alter_history= keep;
+create or replace table t1 (pk integer primary key, a int, b int, v int as (a))
+with system versioning;
+
+alter table t1 force;
+alter table t1 drop column b;
+
+--echo #
+--echo # MDEV-18122 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
+--echo #
+create or replace table t1 (
+ x int,
+ v int as (x) virtual,
+ y int
+) with system versioning;
+alter table t1 drop system versioning;
+
drop database test;
create database test;
diff --git a/mysql-test/suite/versioning/t/sysvars.test b/mysql-test/suite/versioning/t/sysvars.test
index 160af12fe02..52fab81b8e6 100644
--- a/mysql-test/suite/versioning/t/sysvars.test
+++ b/mysql-test/suite/versioning/t/sysvars.test
@@ -87,3 +87,13 @@ select * from t for system_time between '0-0-0' and current_timestamp(6);
show status like "Feature_system_versioning";
drop table t;
+
+
+--echo #
+--echo # MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
+--echo #
+
+SET sql_mode=TIME_ROUND_FRACTIONAL;
+SET @@global.system_versioning_asof= timestamp'2001-12-31 23:59:59.9999999';
+SELECT @@global.system_versioning_asof;
+SET @@global.system_versioning_asof= DEFAULT;
diff --git a/mysql-test/suite/wsrep/disabled.def b/mysql-test/suite/wsrep/disabled.def
index c7c8f2c6216..61142398372 100644
--- a/mysql-test/suite/wsrep/disabled.def
+++ b/mysql-test/suite/wsrep/disabled.def
@@ -1,2 +1,3 @@
wsrep.foreign_key : Sporadic failure "WSREP has not yet prepared node for application use"
-
+wsrep.pool_of_threads : Sporadic failure "WSREP has not yet prepared node for application use"
+wsrep.variables : Global wsrep_on manipulation causes debug asserts
diff --git a/mysql-test/suite/wsrep/my.cnf b/mysql-test/suite/wsrep/my.cnf
index 7e51b0750a1..e90686850a9 100644
--- a/mysql-test/suite/wsrep/my.cnf
+++ b/mysql-test/suite/wsrep/my.cnf
@@ -1,10 +1,8 @@
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
-[mysqld]
-wsrep-on=1
-
[mysqld.1]
+wsrep-on=OFF
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index cb371b33bfd..388fe7b8f4f 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -139,9 +139,6 @@ wsrep_local_state_comment #
SHOW STATUS LIKE 'x';
Variable_name Value
SET GLOBAL wsrep_provider=none;
-#
-# MDEV#6079: xtrabackup SST failing with maria-10.0-galera
-#
SHOW STATUS LIKE 'wsrep_local_state_uuid';
Variable_name Value
diff --git a/mysql-test/suite/wsrep/r/wsrep-recover,binlogon.rdiff b/mysql-test/suite/wsrep/r/wsrep-recover,binlogon.rdiff
new file mode 100644
index 00000000000..8b1b1e4c035
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/wsrep-recover,binlogon.rdiff
@@ -0,0 +1,28 @@
+--- r/wsrep-recover.result 2019-01-11 16:22:46.329012579 +0200
++++ r/wsrep-recover.reject 2019-01-11 16:23:55.313137675 +0200
+@@ -48,19 +48,17 @@
+ SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+ connection default;
+ # Kill the server
+-Expect seqno 9
+-9
++Expect seqno 7
++7
+ disconnect con1;
+ disconnect con2;
+ disconnect con_ctrl;
+ connection default;
+-SELECT VARIABLE_VALUE `expect 10` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+-expect 10
+-10
+-Expect rows 5, 9, 10
++SELECT VARIABLE_VALUE `expect 8` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
++expect 8
++8
++Expect row 5
+ SELECT * FROM t1;
+ f1
+ 5
+-9
+-10
+ DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/r/wsrep-recover.result b/mysql-test/suite/wsrep/r/wsrep-recover.result
new file mode 100644
index 00000000000..10ad4e58fc5
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/wsrep-recover.result
@@ -0,0 +1,66 @@
+# Kill the server
+Expect seqno 1
+1
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+# Kill the server
+Expect seqno 3
+3
+INSERT INTO t1 VALUES (5);
+# Kill the server
+Expect seqno 5
+5
+SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 6
+6
+connect con1, localhost, root;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue";
+INSERT INTO t1 VALUES (7);
+connect con_ctrl, localhost, root;
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+connect con2, localhost, root;
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached WAIT_FOR continue";
+INSERT INTO t1 VALUES (8);
+connection con_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached";
+connection default;
+# Kill the server
+Expect seqno 6
+6
+disconnect con1;
+disconnect con2;
+disconnect con_ctrl;
+connection default;
+SELECT VARIABLE_VALUE `expect 7` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 7
+7
+connect con1, localhost, root;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_1 WAIT_FOR continue_before_commit_order_1";
+INSERT INTO t1 VALUES (9);
+connect con_ctrl, localhost, root;
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+connect con2, localhost, root;
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_2 WAIT_FOR continue_before_commit_order_2";
+INSERT INTO t1 VALUES (10);
+connection con_ctrl;
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_2";
+SET DEBUG_SYNC = "now SIGNAL continue_after_certification";
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+connection default;
+# Kill the server
+Expect seqno 9
+9
+disconnect con1;
+disconnect con2;
+disconnect con_ctrl;
+connection default;
+SELECT VARIABLE_VALUE `expect 10` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+expect 10
+10
+Expect rows 5, 9, 10
+SELECT * FROM t1;
+f1
+5
+9
+10
+DROP TABLE t1;
diff --git a/mysql-test/suite/wsrep/suite.pm b/mysql-test/suite/wsrep/suite.pm
index 03e23b8d7cb..fbaf5aa2b22 100644
--- a/mysql-test/suite/wsrep/suite.pm
+++ b/mysql-test/suite/wsrep/suite.pm
@@ -9,9 +9,9 @@ return "Not run for embedded server" if $::opt_embedded_server;
return "WSREP is not compiled in" unless defined $::mysqld_variables{'wsrep-on'};
my ($provider) = grep { -f $_ } $ENV{WSREP_PROVIDER},
- "/usr/lib64/galera-3/libgalera_smm.so",
+ "/usr/lib64/galera-4/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so",
- "/usr/lib/galera-3/libgalera_smm.so",
+ "/usr/lib/galera-4/libgalera_smm.so",
"/usr/lib/galera/libgalera_smm.so";
return "No wsrep provider library" unless -f $provider;
diff --git a/mysql-test/suite/wsrep/t/binlog_format.cnf b/mysql-test/suite/wsrep/t/binlog_format.cnf
new file mode 100644
index 00000000000..7ec24c14d80
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/binlog_format.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+innodb_autoinc_lock_mode=2
+
diff --git a/mysql-test/suite/wsrep/t/binlog_format.opt b/mysql-test/suite/wsrep/t/binlog_format.opt
deleted file mode 100644
index e3f2470c6e5..00000000000
--- a/mysql-test/suite/wsrep/t/binlog_format.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm://
diff --git a/mysql-test/suite/wsrep/t/binlog_format.test b/mysql-test/suite/wsrep/t/binlog_format.test
index 07001b17a84..695859a2ad3 100644
--- a/mysql-test/suite/wsrep/t/binlog_format.test
+++ b/mysql-test/suite/wsrep/t/binlog_format.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.cnf b/mysql-test/suite/wsrep/t/mdev_10186.cnf
new file mode 100644
index 00000000000..3c4ca003f76
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_10186.cnf
@@ -0,0 +1,6 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=OFF
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.opt b/mysql-test/suite/wsrep/t/mdev_10186.opt
deleted file mode 100644
index e2655959c62..00000000000
--- a/mysql-test/suite/wsrep/t/mdev_10186.opt
+++ /dev/null
@@ -1 +0,0 @@
---wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=0
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.test b/mysql-test/suite/wsrep/t/mdev_10186.test
index 98ea5192634..f86c69f8a5b 100644
--- a/mysql-test/suite/wsrep/t/mdev_10186.test
+++ b/mysql-test/suite/wsrep/t/mdev_10186.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/mdev_6832.cnf b/mysql-test/suite/wsrep/t/mdev_6832.cnf
new file mode 100644
index 00000000000..0bf01f81fc5
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_6832.cnf
@@ -0,0 +1,7 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+
diff --git a/mysql-test/suite/wsrep/t/mdev_6832.opt b/mysql-test/suite/wsrep/t/mdev_6832.opt
deleted file mode 100644
index 16f8962dba2..00000000000
--- a/mysql-test/suite/wsrep/t/mdev_6832.opt
+++ /dev/null
@@ -1 +0,0 @@
---wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1
diff --git a/mysql-test/suite/wsrep/t/mdev_6832.test b/mysql-test/suite/wsrep/t/mdev_6832.test
index 9efccface57..226be1b788c 100644
--- a/mysql-test/suite/wsrep/t/mdev_6832.test
+++ b/mysql-test/suite/wsrep/t/mdev_6832.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.cnf b/mysql-test/suite/wsrep/t/mdev_7798.cnf
new file mode 100644
index 00000000000..0bf01f81fc5
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_7798.cnf
@@ -0,0 +1,7 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.opt b/mysql-test/suite/wsrep/t/mdev_7798.opt
deleted file mode 100644
index 1007d5c0b78..00000000000
--- a/mysql-test/suite/wsrep/t/mdev_7798.opt
+++ /dev/null
@@ -1 +0,0 @@
---wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.test b/mysql-test/suite/wsrep/t/mdev_7798.test
index 9dfff0959bc..b9938d936cc 100644
--- a/mysql-test/suite/wsrep/t/mdev_7798.test
+++ b/mysql-test/suite/wsrep/t/mdev_7798.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/suite/wsrep/t/pool_of_threads.cnf b/mysql-test/suite/wsrep/t/pool_of_threads.cnf
new file mode 100644
index 00000000000..b63e3324796
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/pool_of_threads.cnf
@@ -0,0 +1,8 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+wsrep-provider=@ENV.WSREP_PROVIDER
+wsrep-cluster-address=gcomm://
+thread_handling=pool-of-threads
+
diff --git a/mysql-test/suite/wsrep/t/pool_of_threads.opt b/mysql-test/suite/wsrep/t/pool_of_threads.opt
deleted file mode 100644
index 814417e5b0f..00000000000
--- a/mysql-test/suite/wsrep/t/pool_of_threads.opt
+++ /dev/null
@@ -1 +0,0 @@
---innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
index f74b26167b2..c13a8c5f281 100644
--- a/mysql-test/suite/wsrep/t/variables.test
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -49,15 +49,11 @@ SHOW STATUS LIKE 'x';
# Reset it back.
SET GLOBAL wsrep_provider=none;
---echo #
---echo # MDEV#6079: xtrabackup SST failing with maria-10.0-galera
---echo #
-
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
--enable_query_log
-# The following 2 variables are used in innobackupex during xtrabackup-based
+# The following 2 variables are used by mariabackup
# SST.
--echo
--replace_column 2 #
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover-step.inc b/mysql-test/suite/wsrep/t/wsrep-recover-step.inc
new file mode 100644
index 00000000000..22669438fe0
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover-step.inc
@@ -0,0 +1,41 @@
+#
+# Macro to run wsrep recovery step. This is adapted from
+# suite/galera/include/galera_wsrep_recover.inc, with additional
+# option to pass binlog argument to recovery command. The macro
+# returns recovered position split in uuid and seqno parts.
+#
+# Arguments:
+#
+# wsrep_recover_binlog_opt - Binlog options to recovery command
+#
+# Return:
+#
+# wsrep_recover_start_position_uuid - UUID corresponding to recovered position
+# wsrep_recover_start_position_seqno - seqno corresponding to recovered position
+#
+
+--exec $MYSQLD --defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.log --innodb --wsrep-recover $wsrep_recover_binlog_opt --core-file > $MYSQL_TMP_DIR/galera_wsrep_recover.log 2>&1
+
+--perl
+ use strict;
+ my $wsrep_start_position = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
+ chomp($wsrep_start_position);
+ die if $wsrep_start_position eq '';
+ open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
+ my ($uuid, $seqno) = split /:/, $wsrep_start_position;
+ print FILE "--let \$wsrep_recover_start_position_uuid = $uuid\n";
+ print FILE "--let \$wsrep_recover_start_position_seqno = $seqno\n";
+ close FILE;
+EOF
+
+--source $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
+
+if ($wsrep_recover_start_position_uuid == '') {
+ --die "Could not obtain start_position_uuid."
+}
+
+if ($wsrep_recover_start_position_seqno == '') {
+ --die "Could not obtain start_position_seqno."
+}
+
+--remove_file $MYSQL_TMP_DIR/galera_wsrep_start_position.inc
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover.cnf b/mysql-test/suite/wsrep/t/wsrep-recover.cnf
new file mode 100644
index 00000000000..19986cd97bc
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover.cnf
@@ -0,0 +1,9 @@
+!include ../my.cnf
+
+[mysqld.1]
+wsrep-on=ON
+binlog-format=ROW
+innodb-flush-log-at-trx-commit=1
+wsrep-cluster-address=gcomm://
+wsrep-provider=@ENV.WSREP_PROVIDER
+innodb-autoinc-lock-mode=2 \ No newline at end of file
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover.combinations b/mysql-test/suite/wsrep/t/wsrep-recover.combinations
new file mode 100644
index 00000000000..1ce3b45aa1a
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover.combinations
@@ -0,0 +1,4 @@
+[binlogon]
+log-bin
+
+[binlogoff]
diff --git a/mysql-test/suite/wsrep/t/wsrep-recover.test b/mysql-test/suite/wsrep/t/wsrep-recover.test
new file mode 100644
index 00000000000..8f00f19c27f
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/wsrep-recover.test
@@ -0,0 +1,204 @@
+#
+# Verify that the wsrep XID gets updated in InnoDB rollback segment
+# properly and can be recovered with --wsrep-recover
+#
+# The test runs the following scenarios:
+#
+# 1) The server is started but no SQL is run
+# 2) DDL is executed
+# 3) INSERT is executed
+# 4) Two INSERTs are executed so that the first one in order will be
+# blocked after certification and the second one before entering
+# commit order critical section.
+# 5) Two DMLs are executed so that the prepare step is run out of order.
+# Both transactions are blocked before commit order critical section.
+#
+# After each scenario server is killed and the recovered position
+# is validated.
+#
+
+--source include/have_wsrep.inc
+--source include/have_innodb.inc
+--source include/have_wsrep_provider.inc
+--source include/have_debug_sync.inc
+
+#
+# Binlog option for recovery run. This must be set in the test because
+# combinations file causes log-bin option to be set from command line,
+# not via my.cnf.
+#
+--let $log_bin = `SELECT @@log_bin`
+if ($log_bin) {
+--let $wsrep_recover_binlog_opt = --log-bin
+}
+
+#
+# Scenario 1
+# The expected recovered seqno is 1 corresponding to initial cluster
+# configuration change.
+#
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 1
+--echo $wsrep_recover_start_position_seqno
+
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+#
+# Senario 2
+# The expected recovered seqno is 3 corresponding to two configuration
+# change events and CREATE TABLE.
+#
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 3
+--echo $wsrep_recover_start_position_seqno
+
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+#
+# Scenario 3
+# The expected recovered seqno is 5 corresponding to three configuration
+# change events, CREATE TABLE and INSERT.
+#
+# The expected wsrep_last_committed after the server is restarted is 6.
+#
+
+INSERT INTO t1 VALUES (5);
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 5
+--echo $wsrep_recover_start_position_seqno
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+SELECT VARIABLE_VALUE `expect 6` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+
+#
+# Scenario 4
+#
+# This will cause the following
+#
+# Seqno 7 - the first INSERT is blocked after it is certified but before
+# it gets prepared
+# Seqno 8 - the second INSERT is blocked before it will be ordered for
+# commit, so it becomes prepared
+#
+# As an outcome, the recovery process should return seqno 6 because
+# the range of prepared transactions found after the crash recovery
+# is not continuous up to 8.
+#
+# The expected wsrep_last_committed after server is restarted is 7.
+#
+
+# Send INSERT which will block after certification
+--connect con1, localhost, root
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue";
+--send INSERT INTO t1 VALUES (7)
+
+--connect con_ctrl, localhost, root
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+
+# Send INSERT which will block before commit order critical section
+--connect con2, localhost, root
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached WAIT_FOR continue";
+--send INSERT INTO t1 VALUES (8)
+
+--connection con_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached";
+
+--connection default
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+--echo Expect seqno 6
+--echo $wsrep_recover_start_position_seqno
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+--disconnect con1
+--disconnect con2
+--disconnect con_ctrl
+--connection default
+
+SELECT VARIABLE_VALUE `expect 7` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+
+#
+# Scenario 5
+#
+# This scenario will run two INSERTs in parallel so that they are
+# prepared out of order. The execution is stopped before commit
+# and the server is killed. The outcome of this scenario depends
+# on binlog settings:
+#
+# If binlog is off, the transactions will be recovered from InnoDB and
+# committed during recovery. The expected recovered seqno is 9, the
+# expected wsrep_last_committed after server is restarted is 10.
+#
+# If binlog is on, the transactions will be recovered from InnoDB but
+# will be rolled back since they are not logged yet in binlog. The
+# expected recovered seqno is 7, the expected wsrep_last_committed
+# after server is restarted is 8.
+#
+
+--connect con1, localhost, root
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_1 WAIT_FOR continue_before_commit_order_1";
+--send INSERT INTO t1 VALUES (9)
+
+--connect con_ctrl, localhost, root
+SET DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+
+--connect con2, localhost, root
+SET DEBUG_SYNC = "wsrep_before_commit_order_enter SIGNAL before_commit_order_reached_2 WAIT_FOR continue_before_commit_order_2";
+--send INSERT INTO t1 VALUES (10)
+
+--connection con_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_2";
+SET DEBUG_SYNC = "now SIGNAL continue_after_certification";
+SET DEBUG_SYNC = "now WAIT_FOR before_commit_order_reached_1";
+
+--connection default
+--source include/kill_mysqld.inc
+--source wsrep-recover-step.inc
+if ($log_bin) {
+ --echo Expect seqno 7
+}
+if (!$log_bin) {
+ --echo Expect seqno 9
+}
+--echo $wsrep_recover_start_position_seqno
+--let $restart_parameters = --wsrep-start-position=$wsrep_recover_start_position_uuid:$wsrep_recover_start_position_seqno
+--source include/start_mysqld.inc
+--source include/wait_wsrep_ready.inc
+
+--disconnect con1
+--disconnect con2
+--disconnect con_ctrl
+--connection default
+
+if ($log_bin) {
+ SELECT VARIABLE_VALUE `expect 8` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+}
+if (!$log_bin) {
+ SELECT VARIABLE_VALUE `expect 10` FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed';
+}
+
+#
+# Final sanity check: The successful inserts into t1 should result
+if ($log_bin) {
+ --echo Expect row 5
+}
+if (!$log_bin) {
+ --echo Expect rows 5, 9, 10
+}
+SELECT * FROM t1;
+
+DROP TABLE t1;